Media Encoding‎ > ‎

mencoder for iriver E10

The mplayer project has a great encoder called mencoder. I've used this to encode video for the iriver E10 mp3/video player and for the Xbox 360 Media post Spring (Autumn where I live!!) Update 2007.

The command line syntax is quite long and complex so here is a short cheat-sheet for my examples.

Switch Example Value Description
-ofps 15 Output Frames per Second. Some devices (E10) expect a certain frame-rate. It can also be used to reduce file size if you don't need a high FPS.
-ovc lavc Output Video Codec. This is the video encoder to use, common choices are lavc (multi-codec), xvid and x264.
-oac mp3lame Output Audio Codec. This is the audio encoder to use, common choices are mp3lame (MP3), lavc (multi-codec) and copy (copy from source).
-lameopts cbr:mode=2:br=128 Options for the mp3lame codec. You have to actualy use this codec before this switch does anything! See bellow for syntax as it's more complex.
-lavcopts vcodec=mpeg4:... Options for the lavc codec. You have to use this codec before this switch does anything. See bellow for syntax as it's more complex.
-af
resample=44100 Audio Filter. Used to do procssing on audio after it's been decoded but before it's encoded or output.
-srate
44100 Output Sample Rate. This doesn't resample the audio, you need to use a filter for that but indicates what it should be output at.
-vf
scale=128:72 Video Filter. Used to do procssing on video after it's been decoded but before it's encoded or output.
-vf-add
expand=:128 Video Filter. This filter is processed after the filter specified by -vf.
-ffourcc 
XVID Force Four Codec Code. The FourCC is a ID that is part of the outputs header that identifies what teh format is. This switch allows you to force this code and is normaly done to indicate what codec is used by teh playback software.
-o 
file.avi Output file or device.
-dvd-device 
z: DVD Device. Can be a drive letter on Windows, or a device under *ix.

dvd://0 
Media source. No switch is used for this and multiple sources can be included.


Comments