正确命令如下:
ffmpeg -i D:/trans/bad.mp4 -c:v libx264 -profile:v main -b:v 0.5M -pass 1 -fastfirstpass 0 -passlogfile D:/TEST/passLog1 -an -f MP4 -y NUL &
ffmpeg -i D:/trans/bad.mp4 -c:v libx264 -profile:v main -b:v 0.5M -pass 2 -fastfirstpass 0 -passlogfile D:/TEST/passLog1 -an -r 25 -y D:/trans_case/bad_out_2_pass.mp4
原因:
在第一条命令中没有指定 输出format.
参考:
https://trac.ffmpeg.org/wiki/Encode/H.264
- In pass 1, you need to specify an output format (with -f) that matches the output format you will use in pass 2.