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:
- Transcode the file into an MPEG II audio and MPEG I video stream
- Recombine the audio and video streams into one file
- Create a VCD image out of the resulting file
- 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
1 2 3 4 5 6 7 8 9 10 11 |
|
Note the third line of the output, “format=0x11”, meaning that the software couldn’t figure out what the codec was. I ended up converting it to PCM with
1
|
|
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:
1
|
|
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
1
|
|
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:
1 2 |
|
where there is a file called “template” containing the words
1
|
|
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:
1
|
|
The VCDs can then be burned with:
1
|
|
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