[FFmpeg-user] 回复: How to control the bitrate between a min and maxin VBR encoding

Mike F paziu at yahoo.com
Tue Apr 2 20:16:22 CEST 2013


you could also try to play with 

refs, subq, qmin
this is what I do for a single pass variable

ffmpeg -y -i sample.mkv -vcodec libx264 -coder 1 -bf 3 -refs 16 -subq 10 -partitions +parti4x4+parti8x8+partp8x8 -g 200 -keyint_min 25 -qmin 20 -qmax 51 -trellis 2 -b_strategy 2 -sc_threshold 40 -acodec libaacplus -ab 64k -ar 44100 -ac 2 -f flv sample.flv

the encoding is SLOW ( 45 fps on a quad e3-1245 xeon * 8 threads ), the bitrate for a 720p does not exceed 500-650kbit/s, the quality is very good for such low bitrate.
play with qmin, subq, to get the desired the bitrate and quality

........and lower refs to speed up the encoding process ( default refs is 3 I think ) - 16 reference frames kills the cpu most.






----- Original Message -----
> From: 韩瑞松 <550399108 at qq.com>
> To: FFmpeg user questions <ffmpeg-user at ffmpeg.org>
> Cc: 
> Sent: Tuesday, April 2, 2013 2:01 AM
> Subject: [FFmpeg-user] 回复:  How to control the bitrate between a min and maxin VBR encoding
> 
>T hank you for answer first.
> 
> 
> Now I use command below:
>     ffmpeg -y -i input.mp4 -analyzeduration 2G -pass 1 -vcodec libx264 -vpre 
> fastfirstpass -b 1024k -s 1056x576 -aspect 1056:576 -r 25 -psnr -an -f flv 
> -map_chapters -1:-1 -g 50 /dev/null
>     ffmpeg -y -i input.mp4 -analyzeduration 2G -pass 2 -vcodec libx264 -vpre 
> normal -b 1024k -s 1056x576 -aspect 1056:576 -r 25 -psnr -acodec copy -f flv 
> -map_chapters -1:-1 -g 50 output.flv
> 
> 
> The output.flv is a video with VBR,The part of maxbitrate is bigger than 1024k 
> ,I want to control the bitrate between 1500k because of my poor boundwidth.
> 
> 
> I searchd more on google .There are some options can be used.Such as -minrate 
> -maxrate -bufsize.
> I used them,but the quality of the output is not satisfactory.
> 
> 
> Someone said that this command only effective in CBR mode.
> 
> 
> Is there any other options can make me control the bitrate?
> 
> 
> 
> 
> 
> 
> 
> 
> ------------------ 原始邮件 ------------------
> 发件人: "Carl Eugen Hoyos"<cehoyos at ag.or.at>;
> 发送时间: 2013年4月2日(星期二) 中午1:37
> 收件人: "ffmpeg-user"<ffmpeg-user at ffmpeg.org>; 
> 
> 主题: Re: [FFmpeg-user] How to control the bitrate between a min and maxin VBR 
> encoding
> 
> 
> 
> 韩瑞松 <550399108 <at> qq.com> writes:
> 
>>  How can I make the bitrate under control?
> 
> -vb allows to control the bitrate.
> 
>>  Which version of ffmpeg can be useful?
> 
> On this mailing list, only current git head is supported.
> 
> Carl Eugen
> 
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 


More information about the ffmpeg-user mailing list