[FFmpeg-user] 2 pass CBR or VBR not really fixing the bitrate?
barsnick at gmx.net
Sun Jul 30 01:37:41 EEST 2017
On Sat, Jul 29, 2017 at 17:35:39 -0400, Eric Wilde wrote:
> At 10:51 PM 7/29/2017 +0200, Moritz Barsnick wrote:
> >Have you tried using the identical video encoding settings for pass 1
> >and pass 2? I seem to recall that that is important.
> Interesting that you say that. I use "-an" for the first pass and then
> "-codec:a libmp3lame -b:a 128k" for the second pass when doing two-pass
> recording, and it works fine. My impression was that audio was
> irrelevant for the first pass, since you were only building a set of
> compression guide data for the video compressor to use in pass two.
Please note that I wrote "identical video encoding settings". Indeed,
the docs say it's okay to omit the audio on first pass, while other
sources say it makes a difference, as does the target container.
> The parameters above work for me. I tried VBR and could never get audio
> that was synchronized properly with the video, using LAME. Since 128k,
> CBR gives acceptable sound, to my ear, and good compression, I wasn't
Are you talking audio? Yes, libmp3lame hits the target bitrate (be it
ABR or CBR) pretty much spot on. But Manuel obviously asked about
> ffmpeg -I <input> -c:v libx264 -pass 1 -f mp4 /dev/null
> ffmpeg -I <input> -c:v libx264 -b:v avg -maxrate max -minrate min -bufsize buf -pass 2 <output>
And x264 and x265 (or possibly H.264 and H.265) are known to be tricky.
More information about the ffmpeg-user