Transcode Video For The HTC Incredible on Linux

August 30, 2010 by
Filed under: HowTo, linux, Ubuntu 

If you regularly follow my blog you know that I recently got an HTC Droid Incredible smartphone. This phone has a native screen resolution of 480x320 pixels. MPEG4 video with AAC audio is supported in both the .mp4 and .3gp container formats.

To do the transcoding we'll need the ffmpeg and libfaac packages. Check your distro's repositories for the correct packages. If you're using Ubuntu Lucid (10.04), you can install it from the terminal with:

sudo apt-get install ffmpeg libfaac0

Once the install is done, navigate to the directory with your input file. You can then transcode the file from the command line with something like this.

ffmpeg -i input_file_name.avi -s 480x320 -vcodec mpeg4 -acodec libfaac -ac 2 -ar 16000 -r 14 -ab 32000 output_file_name.mp4

What this command does:

Affiliate Link
    input file: input_file_name.avi
    output video size: 480x320 pixels
    video codec: MPEG4
    audio codec: AAC
    audio channels: 2
    audio sample rate: 16000 Hz
    video frame rate: 14 fps
    audio bitrate: 32000 bps

You can make adjustments to the command to suit your preferences for video quality and file size.

One more option you may want to consider is the -qscale option. This option allows you to choose a constant quality level between 1 (best) and 31 (worst). You would use it like this.

ffmpeg -i input_file_name.avi -s 480x320 -vcodec mpeg4 -qscale 5 -acodec libfaac -ac 2 -ar 16000 -r 14 -ab 32000 output_file_name.mp4

Once you're done transcoding the video you can copy it to your device using the USB data cable.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>