[FFmpeg-user] Trouble compiling mp4 with two pass encoding

Lou lou at lrcd.com
Tue Sep 4 19:43:11 CEST 2012


On Tue, 4 Sep 2012 11:16:13 -0300
Thyen Hong Guedes Chang <thyenhong at gmail.com> wrote:

> Hello,
> 
> I'm having trouble compiling a .avi file into a .mp4 file with two pass
> encoding.
> I'm following this tutorial http://h264.code-shop.com/trac/wiki/Encoding and
> receiving the results:
> 
>   infile ="video.avi"
>   tmpfile="video_tmp.mp4"
>   outfile="video.mp4"
>   options="-vcodec libx264 -b 512k -flags +loop+mv4 -cmp 256 \
> 	   -partitions +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 \
> 	   -me_method hex -subq 7 -trellis 1 -refs 5 -bf 3 \
> 	   -flags2 +bpyramid+wpred+mixed_refs+dct8x8 -coder 1 -me_range 16 \
>            -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -qmin 10\
> 	   -qmax 51 -qdiff 4"
[trimmed]

That guide is outdated and uses the really old, messy way of encoding
with libx264. It is recommended to use the libx264 encoding presets
instead of declaring each (depreciated) option. See examples here:

https://ffmpeg.org/trac/ffmpeg/wiki/x264EncodingGuide


More information about the ffmpeg-user mailing list