About the author

My photo

Java, Scala, and everything

Tuesday, June 9, 2009

Encoding movies (in ubuntu)

Example command to encode movies in ubuntu.
mencoder input-movie.avi -o output-movie.avi -oac mp3lame -mc 0 -ovc x264 -x264encopts bitrate=45000
You need to have mencoder installed. mp3lame is audio codec, x264 is video codec. To see other possible codecs type
mencoder -ovc help -ova help 
-mc 0 is for not messing with audio synchronization. Without it mencoder tries to synchronize audio with video, and it can break the synchronization. So if in source movie audio was synchronized well include this option. After -x264encopts there are x264 codec options. Other codecs have other options.

Mencoder howto site was helpful while looking for all this information.

No comments: