DivX -> VCD conversion
For a while now I’ve been wondering how to convert an .AVI file into a VCD, having tried once or twice but ending up stuck. Recently, a friend sent me a show he taped from TV, which prompted me to try again. I succeeded, and here’s how I did it.
The basic steps in converting any digital movie into a VCD seem to be the following:
1. Transcode the file into an MPEG II audio and MPEG I video stream
2. Recombine the audio and video streams into one file
3. Create a VCD image out of the resulting file
4. Burn the image to CD
Note that there are lots of other things that can be done, such as titles, effects, multiple movies, etc, but this is the simplest case.
The first step is what caused me the most grief, since the file I had wasn’t in a format that transcode knew about
# tcprobe -i RevolutionOS.avi
[tcprobe] RIFF data, AVI video
[avilib] V: 29.970 fps, codec=DX50, frames=3595, width=720, height=480
[avilib] A: 44100 Hz, format=0x11, bits=4, channels=2, bitrate=355 kbps,
[avilib] 3595 chunks, 3681280 bytes, CBR
[tcprobe] summary for RevolutionOS.avi, (*) = not default, 0 = not detected
import frame size: -g 720x480 [720x576] (*)
frame rate: -f 29.970 [25.000] frc=4 (*)
audio track: -a 0 [0] -e 44100,4,2 [48000,16,2] -n 0x11 [0x2000] (*)
bitrate=355 kbps
length: 3595 frames, frame_time=33 msec, duration=0:01:59.953
Note the third line of the output, “format=0×11″, meaning that the software couldn’t figure out what the codec was. I ended up converting it to PCM with
mencoder RevolutionOS.avi -o RevolutionOS_pcm.avi -noskip -ovc copy -oac pcm
Then, I could transcode and create the vcd with this script (note that this site offers an easier version that uses mplayer for everything… wish I knew about that!)
Basically, this script tries to calculate all the clipping needed to scale your video into the size needed for VCDs. It also figures out how many CDs you need.
The basic transcoding goes like this:
transcode -i FILE -x VIDEOCODEC,AUDIOCODEC -y mpeg2enc,mp2enc -o BASENAME
The input A/V codecs can be autodetected. After the transcode step, you’ll have two files, BASENAME.{m1v,mpa} containing the video and audio streams respectively.
Note, to extract the audio to an mp3, you can do something like
transcode -i FILE -x NULL -y null,lame -o foo
which will generate foo.mpg. You can use -E and -b to specify the sampling frequency and bitrate respectively.
After you have the video and audio streams, you put them back together:
tcmplex -i BASENAME.m1v -p BASENAME.mpa -o BASENAME.mpg \
-m 1 -F template
where there is a file called “template” containing the words
maxFileSize = 795
for an 80 min CD, or 735 for a 74 min CD. This multiplexes the streams as a VCD into BASENAME-nn.mpg
Then, convert each .mpg to a VCD:
vcdimager -t vcd2 -c BASENAME-nn.cue -b BASENAME-nn.bin BASENAME-nn.mpg
The VCDs can then be burned with:
cdrdao write --device 1,0,0 --speed 8 BASENAME-nn.cue
1,0,0 is the SCSI ID of your burner, you can get it by running “cdrecord –scanbus”.
Again, most of this is automated through divx2vcd… However if you run into problems like I did, you may have to do it the long way.
All the software such as transcode was obtained from Freshrpms.net.
Sean
DVD to iPod Conversion. How to convert DVD to iPod Video? DVD to iPod Converter. Enjoy watching movies on your iPod anywhere, anytime. Convert DVDs, VCDs, AVI, DivX movies to iPod Video (iPod Nano, iPod Touch, iPod Classic, iPhone)

Will a VCD play on the average DVD player?
November 26th, 2003 at 8:40 amA lot of DVD players support MP3 and VCD discs, I’m not sure if that falls into the “average” category, though. There should be either a CDRW or VCD logo on the player if it does.
November 26th, 2003 at 8:45 am