[FFmpeg-user] FFmpeg from avi to 3gp

Leo Izen leo.izen at gmail.com
Sat Apr 30 19:06:47 CEST 2011

On Fri, Apr 29, 2011 at 11:59 PM, 2407365 <forum at epifanio.org> wrote:

> [libx264 @ 0x9f1e7f0] broken ffmpeg default settings detected
> [libx264 @ 0x9f1e7f0] use an encoding preset (e.g. -vpre medium)
> [libx264 @ 0x9f1e7f0] preset usage: -vpre <speed> -vpre <profile>
> [libx264 @ 0x9f1e7f0] speed presets are listed in x264 --help
> [libx264 @ 0x9f1e7f0] profile is optional; x264 defaults to high

Just like libx264 says, use and encoding preset. This means specify -vpre
<preset> after specifying -vcodec libx264. The presets are ultrafast,
veryfast, faster, fast, medium, slow, slower, veryslow, and placebo.  Also,
to constrain to the main profile instead of high use -vpre main AFTER the
speed preset, and to constrain to the baseline profile use -vpre baseline
AFTER the speed preset. Slower speeds yield better quality for the same
bitrate, but placebo is pointlessly slow and has a less than 1% visual
difference from veryslow, so use veryslow instead of placebo in any case.
Also, when use x264, there's a unique option -crf, to set quality. -crf 15
is virtually lossless, but as the number increases it gets more visual, so
-crf 25 has noticeable compression artifacts. You still need to specify a
preset, but with -crf generally better quality/bitrate is achieved. Slower
speeds with crf give a lower bitrate for the same quality.

So: an example is:

ffmpeg -strict experimental -i file.avi -vcodec libx264 -vpre slow -s qvga
-b 6438912 -r 16 -acodec aac -ab 393216 -ar 32000 -ac 1 -y file.3gp

Notice the -vpre slow in there.

Also, 6.4M is a waaaaay unnecessarily high bitrate for a video with a frame
rate of 16 and qvga size, and 393k is a waaaaay huge audio bitrate for 32
kHz single channel audio. Consider reducing these, and quality won't really
drop at all.

More information about the ffmpeg-user mailing list