Thursday, December 27, 2007

Encoding of media files in Linux

mencoder
---------------
$mencoder -oac -ovc -o

audio-output-format option is given as

-oac copy no encoding, just streamcopy
-oac pcm encode to uncompressed PCM
-oac mp3lame encode to MP3 (using Lame)


video-output-format is given as

-ovc copy no encoding, just streamcopy
-ovc divx4 encode to DivX4/DivX5
-ovc rawrgb encode to uncompressed RGB24
-ovc lavc encode with a libavcodec codecs

To cut a movie file give the following command
$mencoder -ss -endpos -o -oac -ovc -o

here end-postion can be given as
-endpos 56 encode only 56 seconds
-endpos 01:10:00 encode only 1 hour 10 minutes
-endpos 100mb encode only 100 MBytes
for start-position
-ss 56 encode from 56 sec
other options are similar as above.

for more option type
$man mplayer

No comments: