

You don't need to use this option unless you want to use a custom log file name instead of the default ( ffmpeg2pass-0.log). passlogfile Sets the two-pass log file name. Makes sense for the first pass, otherwise it will ask you File '/dev/null' already exists. y Overwrite output files without asking for confirmation. See FFmpeg Wiki: H.264 - Two-Pass for more info and examples. You could output to /dev/null (Linux & macOS) or NUL (Windows) instead and avoid making a temporary file: ffmpeg -y -i input.mkv -c:v libx264 -vf "scale=1920:1080" -b:v 3.5M -pass 1 -an -f mp4 /dev/nullįfmpeg -y -i input.mkv -c:v libx264 -vf "scale=1920:1080" -b:v 3.5M -pass 2 -c:a aac output.mp4 I know that this command will give the output for the first pass also. Otherwise, just do a single pass with -crf.

Two-passes will to a better job targeting a specific output file size. I learned that 2 Pass encoding will do the job better.

2-pass does not make a better quality or smaller file: it only lets you set the output file size (but not the quality), whereas -crf lets you choose the quality (but not the file size).Tl dr - Just use -crf with 1-pass unless you need a specific file size
