Whiskey Kilo Linux  •  Exploring GNU/Linux and F/OSS
styline.jpg

Friday 30th July 2010

drupal member logo

drupal logo

ubuntu logo

gnome logo

opensource logo

Create mp4 with ffmpeg for Samsung SGH-E900

Samsung E900My phone plays video's so I decided to convert an old Will & Grace episode from a PAL resolution AVI to a 320x240 MP4 with ffmpeg. Here's the command:

ffmpeg -i will_and_grace.avi -f mp4 -vcodec mpeg4 -maxrate 1000 -b 700 -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec aac -ab 128 -s 320x240 -aspect 4:3 out.mp4

I had to compile a new ffmpeg though as the ffmpeg that comes with Ubuntu doesn't support mp3 or aac encoding. Here's the configure command:

./configure --disable-debug --disable-network --disable-vhook --disable-ffserver --disable-ffplay --enable-libmp3lame --enable-libfaac

UPDATE: You might want to add the following before the -s to crop wide videos to a 4:3 aspect ratio. The number of pixels to crop depends on the size of the original video of course. Try this: cropsize = (original width - original height x 1.33) / 2. Cropsize has to be a multiple of 2.

-cropright 60 -cropleft 60

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may link to images on this site using a special syntax

More information about formatting options

CAPTCHA
This question is used to make sure you are a human visitor and to prevent spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.