Looks like this phone can play MPEG4-AVC (specifications). This means that you can use the libx264 presets which can result in some excellent quality video:
One-Pass CRF
One-pass CRF lets you specify a quality to encode at, but the file size will be unknown:
Code:
ffmpeg -i input.avi -acodec libfaac -ab 128k -vcodec libx264 -vpre hq -vpre baseline -s 320x240 -threads 0 -crf 26 output.mp4
Perhaps the phone doesn't need the baseline limitation:
Code:
ffmpeg -i input.avi -acodec libfaac -ab 128k -vcodec libx264 -vpre hq -s 320x240 -threads 0 -crf 26 output.mp4
You may want to just encode a set amount of time to test this video instead of the whole thing. You can do that with the "-t" option. This example will encode the first 10 seconds:
Code:
ffmpeg -t 10 -i input.avi -acodec libfaac -ab 128k -vcodec libx264 -vpre hq -vpre baseline -s 320x240 -threads 0 -crf 26 output.mp4
The most important option is crf. The lower the number, the higher the quality, and 18-30 is a sane range.
Unfortunately, to take advantage of the presets you will need to compile FFmpeg yourself, although it isn't hard:
HOWTO: Install and use the latest FFmpeg and x264
See the above thread for some two-pass examples. Two-pass encoding lets you specify a bitrate (and thus a final file size), but the quality can vary.
Bookmarks