[FFmpeg-user] gain the highest quality with H264 at a certain bit rate

chronek chronek at interia.eu
Mon Mar 27 23:04:21 EEST 2017

W dniu 2017-03-27 o 19:24, negin tebyani pisze:
> and yes, I need to use constant bitrate. do I need to use 2 pass with
> constant bitrate?

You do not need second pass with constant bitrate, but with 2 pass - in 
first pass it log where it need bitrate and use that knowledge to 
distrubuate in second pass, because even with constant bitrate you have 
small variations along time.
I add deblock filter before because reencoding favors block artifacts.

 From source info what you post i saw that you have the same 
resolutions, you do not need scale. So you doing 1280:720/50fps/yuv422p 
4,4 Mbps -> 1280:720/50fps/yuv422p 2 Mbps ?
I saw both samples and your was even more crispy sometimes, found that 
you doing 5 reframes, when others 6 (it help with bitrate a bit).
So what you want improve? Dark parts? Or artifacts? Or fast motion scene 
blocks? Or more sharpen?

Try that:
ffmpeg -y -i in.mp4 -an -c:v libx264 -preset veryslow -b:v 2048k -bf 
8**-qcomp 0.8 -pass 1 /dev/null
ffmpeg -y -i in.mp4 -c:a aac -b:a 128k -c:v libx264 -preset veryslow 
-b:v 2048k -bf 8 -qcomp 0.8 -pass 2 out.mp4

More information about the ffmpeg-user mailing list