Gentoo Wiki



Feel free to share simple examples about how to use transcode to encode videos, DVDS, images, whatever. Just be sure to post what the output will be, and what non-default USE flags you'll need.

VOB to MPEG4 (Two-pass XviD)

Final results:

This example assumes you've already ripped the VOB file from the DVD, with something like mplayer, vobcopy, or dvdbackup.

transcode -a 0 -b 128,0,0 -i movie.vob -w 1800,250,100 -A -N 0x2000 -M 2 -Y 4,4,4,4 -B 1,11,8 -R 1 -x vob -y xvid4,null
transcode -a 0 -b 128,0,0 -i movie.vob -w 1800,250,100 -A -N 0x2000 -M 2 -Y 4,4,4,4 -B 1,11,8 -R 2 -x vob -y xvid4 -o movie.avi

One thing to note is that for DVDs, this will output the FPS to 29.97. If you want to do 23.97 (and you *know* the DVD is that framerate) then add "-f 24,1" to the mix of flags.

If your framerate is wrong, you'll notice pretty easily -- the video will skip a little bit though the audio will be fine.

One easy way to determine for sure what the FPS of the source video, is to actually play it with MPlayer where you can see the output.

$ mplayer movie.vob

If you see it start out at 29.97 and later say it switched to 23.97, then you know it's 23.97. However, if it constantly changes back and forth between the two (Star Trek: The Next Generation DVDs are one example), then these are "progressive NTSC streams" and you don't want to force output it to 23.97.

Resize the video

Lets say you have a 848x480 avi and you need to resize it to the proper size.

All you really need to do, is change the width and height.

$ transcode -i INPUT.avi -y ffmpeg,ffmpeg -F mpeg4 -Z 640x,fast --export_asr 3 -o OUTPUT.avi -E 44100,16,2 -b 224

'--export_asr 3' is for 16:9 aspect ratio. See 'man transcode' for more options.

Retrieved from ""

Last modified: Wed, 21 Jun 2006 19:11:00 +0000 Hits: 13,947