[FFmpeg-user] FFMPEG Video Conversion

Lou lou at lrcd.com
Wed Jan 30 04:08:20 CET 2013

On Wed, 30 Jan 2013 02:59:24 +0530
Palaniappan N <palani at i-waves.com> wrote:

> ]# ffmpeg -y -i /var/www/html/WorkFiles/uploads/movfile.mov -acodec libfaac
> -ar 48000 -ab 128k -ac 2 -s 352x240 -vcodec libx264 -b:a 720k -flags
> +loop+mv4 -cmp 256 -partitions +parti4x4+partp8x8+partb8x8 -subq 7 -trellis
> 1 -refs 5 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor
> 0.71 -bt 1200k -maxrate 1200k -bufsize 1200k -rc_eq 'blurCplx^(1-qComp)'
> -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 16:9 -r 30 -g 90
> -async 2 /var/www/html/WorkFiles/output/sample2_new.mp4oder 0 -me_range 16
> -keyint_min 25 -sc_threshold 40

Declaring each libx264 encoding option is not recommended. Do you know
what most of these options do, or are you simply copying them from some
random and outdated guide? Use the encoding presets instead as shown at
the FFmpeg and x264 Encoding Guide:


You have a bewildering set of options (some conflicting), but a
modern and sane version based on some of your options would be:

ffmpeg -y -i input -c:a aac -strict experimental -b:a 128k -ac 2 \
-c:v libx264 -preset medium -crf 23 -vf scale=352:-1 -movflags \
+faststart output.mp4

As it appears you may be encoding for displaying the video on the web I
added "-movflags +faststart" so the video can begin playback before it
is completely downloaded.

More information about the ffmpeg-user mailing list