[Ffmpeg-devel] Re: Differences between mencoder andffmpegwhenencoding using x264

Bob Pankratz rpankratz
Wed Mar 15 10:46:29 CET 2006


Bob Pankratz <rpankratz <at> mac.com> writes:


> In the same spirit we've been trying to adapt a recipe 
> for using ffmpeg to transcode videos to h.264 for 
> iPod users. We've got optimal settings for 1-pass
>  using native x264->ipod done. Given the speed and 
> direct to mp4 feature from ffmpeg it is of course
>  preferred to x264. So here is the setting table. If 
> anyone wants to help us convert this please jump on in.
> 
> ffmpeg command line to follow....
> 

Ok here they are 90% of the way.  Still can't get bframes to
 activate nor chroma_me. Any suggests would be welcomed.


Constant Target BitRate:
ffmpeg -i SOURCEFILE -v 1 -vcodec h264 -b BITRATE -bt BITRATE -refs5
 -loop 1 -deblockalpha 0 -deblockbeta 0 -parti4x4 1 -partp8x8 1 -partb8x8 1 
-me umh -subq 6 -brdo 1 -me_range 21 -chroma 1 -threads 2 -slice 2 -bf 1 
-bframebias 1 -b_strategy 1 -g 250 -keyint_min 25 -sc_threshold 40 
-rc_eq 'blurCplx^(1-qComp)' -qcomp 0.60 -qmin 7 -qmax 35 -max_qdiff 4
-i_quant_factor 0.71428572 -b_quant_factor 0.76923078 -rc_max_rate 0 
-rc_buffer_size 0 -aspect ASPECTRATIO -s WIDTHxHEIGHT -r FRAMERATE 
-acodec aac -ab 96 -ar 48000 -ac 2 OUTPUTFILE.mp4


VARIABLE BIT RATE:
ffmpeg -i SOURCEFILE -v 1 -vcodec h264 -crf QUALITYLEVEL -refs 5 
-loop 1 -deblockalpha 0 -deblockbeta 0 -parti4x4 1 -partp8x8 1 -partb8x8 1 
-me umh -subq 6 -brdo 1 -me_range 21 -chroma 1 -threads 2 -slice 2 -bf 1 
-bframebias 1 -b_strategy 1 -g 250 -keyint_min 25 -sc_threshold 40 
-rc_eq 'blurCplx^(1-qComp)' -qcomp 0.60 -qmin 7 -qmax 35 -max_qdiff 4 
-i_quant_factor 0.71428572 -b_quant_factor 0.76923078 -rc_max_rate 0 
-rc_buffer_size 0 -aspect ASPECTRATIO -s WIDTHxHEIGHT -r FRAMERATE 
-acodec aac -ab 96 -ar 48000 -ac 2 OUTPUTFILE.mp4



Working samples
ffmpeg -i b.avi -v 1 -vcodec h264 -b 320 -bt 320 -refs 5 
-loop 1 -deblockalpha 0 -deblockbeta 0 -parti4x4 1 -partp8x8 1 -partb8x8 1 
-me umh -subq 6 -brdo 1 -me_range 21 -chroma 1 -threads 2 -slice 2 
-bf 1 -bframebias 1 -b_strategy 1 -g 250 -keyint_min 25 -sc_threshold 40 
-rc_eq 'blurCplx^(1-qComp)' -qcomp 0.60 -qmin 7 -qmax 35 -max_qdiff 4 
-i_quant_factor 0.71428572 -b_quant_factor 0.76923078 -rc_max_rate 0 
-rc_buffer_size 0 -aspect 16:9 -s 320x176 -r ntsc-film 
-acodec aac -ab 96 -ar 48000 -ac 2 output.mp4

ffmpeg -i b.avi -v 1 -vcodec h264 -crf 19 -refs 5 -loop 1 -deblockalpha 0 
-deblockbeta 0 -parti4x4 1 -partp8x8 1 -partb8x8 1 -me umh -subq 6 
-brdo 1 -me_range 21 -chroma 1 -threads 2 -slice 2 -bf 1 -bframebias 1 
-b_strategy 1 -g 250 -keyint_min 25 -sc_threshold 40 
-rc_eq 'blurCplx^(1-qComp)' -qcomp 0.60 -qmin 7 -qmax 35 -max_qdiff 4 
-i_quant_factor 0.71428572 -b_quant_factor 0.76923078 -rc_max_rate 0 
-rc_buffer_size 0 -aspect 16:9 -s 320x176 -r ntsc-film 
-acodec aac -ab 96 -ar 48000 -ac 2 output.mp4









More information about the ffmpeg-devel mailing list