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 448x436 –vpre slower_fastfirstpass -pass 1 "output.mp4" -threads 1
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.