Skip to content

Commit

Permalink
Limit dynamic buffer size
Browse files Browse the repository at this point in the history
  • Loading branch information
dfaker authored Nov 23, 2020
1 parent 11ba90e commit 250bd37
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ffmpegService.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,10 @@ def encoderFunction(br,passNumber,passReason,passPhase=0, requestId=None):
ffmpegcommand+=['-pass', '2', '-passlogfile', outLogFilename ]



bufsize = "3000k"
if sizeLimitMax != 0.0:
bufsize = str(br*2)
bufsize = str(min(2000000000.0,br*2))

ffmpegcommand+=["-shortest", "-slices", "8", "-copyts"
,"-start_at_zero", "-c:v","libvpx","-c:a","libvorbis"
Expand Down Expand Up @@ -292,7 +293,7 @@ def encoderFunction(br,passNumber,passReason,passPhase=0, requestId=None):

bufsize = "3000k"
if sizeLimitMax != 0.0:
bufsize = str(br*2)
bufsize = str(min(2000000000.0,br*2))

ffmpegcommand+=["-shortest", "-slices", "8", "-copyts"
,"-start_at_zero", "-c:v","libvpx-vp9","-c:a","libvorbis"
Expand Down

0 comments on commit 250bd37

Please sign in to comment.