Posted by Wim Koorenneef on 2006-11-17 20:17 CET
My 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