[FFmpeg-user] 2-pass ENcoding with mpeg (switching from mencoder)
jpboard2 at yahoo.com
Wed Aug 7 16:37:10 CEST 2013
>> The only thing in the ffmpeg output from the 2ns pass that looks problematic is:
>> [libx264 @ 0x206f040] constant rate-factor is incompatible with 2pass
>> Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
>CRF is one way of controlling the resulting bitrate, target bit rate
>and 2-pass encoding is another. You can't use both at the same time.
I'm not using both. At least not intentionally. Here were my commands:
ffmpeg -y -i IN.avi -c:v libx264 -preset medium -b:v 10m -pass 1 -an -f mp4 /dev/null
ffmpeg -y -i IN.avi -c:v libx264 -preset medium -b:v 10m -pass 2 -an OUT.mp4
Is the -preset option setting CRF? I don't know. I cut-and-pasted that command from
examples I found on the web.
What would be an example for doing 2-pass encoding, with the libx264 codec, at a video
rate of 10 million bits per second, and merely copy the audio from input file to output file, and using
an mp4 format?
More information about the ffmpeg-user