Saturday, May 07, 2011

VCD or SVCD from multiple avi mp4 and more

DVDs are great but for small videos it is just a waste of media. SVCD is a good well supported by all modern DVD players in the market.

Making a VCD or SVCD on MAC OSX can be achieved using a combination of ffmpeg, vcdimager and Burn. In Linux you can use k3b instead of Burn.

My son's teacher wanted to give as a present for Mother's day a video of each child to his/her Mom. She had several mp4 and avi files (one per student) and she thought creating a VCD from those short videos was going to be easy so after some attempts using Windows Vista Movie Maker she asked me for help. I told her that I could do that easier in my MAC and then she agreed for me to do the job.

Here are the steps to follow if you run OSX and you want to burn several VCDs, one per media file:
  1. You will need to install ffmpeg and vcdimager. I use MacPorts so:
    $ sudo port install ffmpeg
    $ sudo port install vcdimager
  2. Put all AVI, MP4 or any other supported by FFMPEG format in a folder and from that folder run the below command. If you have less than 30 minutes then pick the highest quality (SVCD)
    $ for i in *.*; do ffmpeg -i "$i" -target ntsc-svcd "${i/.*}.mpg"; vcdimager -t svcd -l "${i/.*}" -c ${i/.*}.cue -b ${i/.*}.bin ${i/.*}.mpg; done
  3. If you have to burn more than 30 minutes in just one CD you will need to lose quality and then go for VCD
    $ for i in *.*; do ffmpeg -i "$i" -target ntsc-vcd "${i/.*}.mpg"; vcdimager -t vcd2 -l "${i/.*}" -c ${i/.*}.cue -b ${i/.*}.bin ${i/.*}.mpg; done
  4. Now you will end up with some mpg, bin and cue files. The cue files contain the information about the (S)VCD image (bin files) which in turn are a packaged version of the mpg files. All you need to do is to burn the bin files and for that in OSX you use the Burn program. Just open it, click on the Copy tab and drop the cue file into the container area. Insert a blank CD-R and hit Burn.

No comments: