diff --git a/ffmpegService.py b/ffmpegService.py index a6b4f36..183710a 100644 --- a/ffmpegService.py +++ b/ffmpegService.py @@ -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" @@ -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"