Saturday, February 23, 2008

Ubuntu: Encoding video files

So you have an iPod/Phone or some other poratable media player and you want to encode your huge avi/dvd/mpeg flicks into the formats these devices support.
There are tonnes of easy to use encoders for Windows. For Linux, let us look at some great alternatives...

MEncoder and ffmpeg are the two common encoders. Both of them use the libavcodec and support a decent list of output containers.

To encode DVDs, try AcidRip which is a gtk frontend to MEncoder.

Check out their websites for more instruction on how to go about using them.
For instructions on encoding to video iPod, go here

Here are some examples using MEncoder

apt-get install MEncoder

Mencoder - input to 15fps 320x240 avi/mp3 (phones)
mencoder <input> -ofps 15 -vf expand=:::::4/3,scale=320:240 -ovc xvid -xvidencopts bitrate=150:profile=sp2 -oac mp3lame -lameopts cbr:br=96 -o <output.avi>

avi to flv
mencoder <input.avi> -o <output.flv> -of lavf -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3

[img src: Zoran]

No comments: