Sirber
Sirber

Reputation: 3428

ffmpeg (webm) doesn't respect requested bitrate

On a 2 minute clip:

ffmpeg.exe -pass 1 -passlogfile pass.log -i E002.avi -b 368k -maxrate 1000k -ab 62 -y out.webm ffmpeg.exe -pass 2 -passlogfile pass.log -i E002.avi -b 368k -maxrate 1000k -ab 62 -y out.webm

the bitrate still goes up to 2mbps. I tryed with -qscale 24 and it does the same thing.

edit

log: frame= 1323 fps= 20 q=0.0 size= 12348kB time=55.22 bitrate=1831.8kbits/s

Upvotes: 2

Views: 2817

Answers (2)

Arie Skliarouk
Arie Skliarouk

Reputation: 463

I got error when tried to specify qmax:

[NULL @ 0x641230]Value 63.000000 for parameter 'qmax' out of range
Invalid value '63' for option 'qmax'

I tried to specify bitrate explicitly while converting the 278kbit/s wmv video into webm using two passes, but still, the resulting bitrate was way higher (413kbit/s) than what I have requested (250+32 = 282kbit/s):

ffmpeg -i $Source -b 250k -pass 1 -ab 32k -aq 80 $Target
ffmpeg -y -i $Source -b 250k -pass 2 -ab 32k -aq 80 $Target

What can be done to improve the webm encoding rate control?

Upvotes: 0

Sirber
Sirber

Reputation: 3428

-g 320 -qmax 63 seemed to do it!

'-g gop_size' Set the group of pictures size. default: 12

'-qmax q' maximum video quantizer scale (VBR)

Upvotes: 2

Related Questions