[Home]Examples DVD To Xvid4

Showing revision 4
Let's assume that the VOB files are already on the hard drive, so that it's possible to operate on all of them in parallel. Transcode loves to have a lot of processing power, so giving it many separate processors will make it very happy.

export COUNT=$1
export IN=/input_dir/VTS_01_$COUNT.VOB
export OUT=/output_dir/VTS_01_$COUNT.avi

The reason to use a separate work directory here is that xvid4 creates a file called "divx4.log" in the current working directory, so otherwise it would become overwritten if multiple instances of this script were to run:

cd /work_dir/$COUNT

Set the resize parameter. Quite a confusing parameter indeed.

export RESIZE="-B 12,10,8"

Use a bitrate ranging from as low as 500 to as high as 2500, depending on how large a screen you intend to playback the resulting xvid:

export BITRATE="-w 1500,250,100"

If you see thin horizontal lines on fast motion, you need to deinterlace:

export DEINTERLACE="-I 3"

If you want to keep the original AC3 soundtrack rather than encode it to mp3, e.g. if you are using an external "receiver", use this:

export AC3PASSTHRU="-A -N 0x2000"

Invoke the first pass of transcode, this is to allow the xvid encoder to figure out the best amount of compression to use, depending on the content of the source. The use of the "-M 2" flag can help to keep the audio in sync with the video:

transcode -i $IN -M 2 $BITRATE $DEINTERLACE -a 0 -b 128,0,0 $AC3PASSTHRU -V -f 25 $RESIZE -R 1 -x vob,null -o /dev/null -y xvid4

Invoke the second transcode pass, this reads the "divx4.log" file:

transcode -i $IN -M 2 $BITRATE $DEINTERLACE -a 0 -b 128,0,0 $AC3PASSTHRU -V -f 25 $RESIZE -R 2 -x vob -o $OUT -y xvid4


Transcode Wiki | Recent Changes | Preferences
Password required to edit | View other revisions | View current revision
Edited November 27, 2004 1:13 am by PeterKnaggs (diff)
Search: