Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Compression Techniques FFMPEG 2 PASS Encoding

  • FFMPEG 2 PASS Encoding

    Posted by James Zeng on July 17, 2012 at 11:03 am

    Hi, for about a week, I am trying to make FFMPEG 2 Pass encoding work, but with no success. It drives me nuts and the fact there is not much support on this topic out there makes me feel sorry for developers like me.

    Here is what I want to do. I want to convert a video AVI to MP4 with the video codec libx264. I’ve probably tried nearly every single possible example I found on the internet. By the way, I am encoding with Windows FFMPEG Build.

    So here is what I have done so far:

    For the first pass, I used the commands: FFMPEG -i “input.avi” -an -y -b 1024k -r 25 -vcodec libx264 -s 448×436 –vpre slower_fastfirstpass -pass 1 “output.mp4” -threads 1

    and for the second pass:

    FFMPEG -i “input.avi” -y -b 1024k -r 25 -s 448×436 -vcodec libx264 -deinterlace -acodec libvo_aacenc -ab 128k -ar 44100 -ac 2 –vpre slower -pass 2 “output.mp4” -threads 1

    By using the above commands, I always get the same error message: [NULL @ 02c63e60] Unable to find a suitable output format for ‘–vpre’
    –vpre: Invalid argument

    Also, I have changed the preset to fastfirstpass or something similar, and got a message relating to the fact that there are some presets missing.

    So, I am asking the community here. I am stuck, and need your help to successfully encode my file twice using x264. Thanks in advance.

    Reuben Martin replied 13 years, 10 months ago 2 Members · 1 Reply
  • 1 Reply
  • Reuben Martin

    July 18, 2012 at 4:14 am

    Why do you need to do 2 pass encoding? The only reason you would want to do 2 pass encoding is if you have to shoe-horn a video into a limited space like optical media.

    2 pass doesn’t do anything to improve quality. All it does is help the encoder better determine where in the video is the best place to degrade the quality in order to make it small enough to fit within the target size.

    Use CRF mode. It will probably result in a file that is more uniform in quality and smaller in size.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy