Handy Linux video trick: mini-DVD to DV AVI
After the MiniDV videotape camcorders and before the explosion of hard disk camcorders,
several manufacturers were making these camcorders that would record directly to DVD media. A handful of them recorded to full-size DVD media, but most recorded to a small (~3 inches in diameter) mini-DVD media. One of these discs can hold about 30 minutes of SD (740x480, 30 frames per second) video or about 1.4GB of data.
A couple years ago, I was working on a video editing project and one of my sources was from one of these mini-DVD camcorders. One of the perks of the mini-DVD format is you can throw it right into a DVD player and it plays it, without much grief, like a normal DVD movie. There's even a scene-selection menu that shows you thumbnails of images to select scenes recorded on the DVD.
I think the mini-DVD format was a great idea for people who just want to videotape an event and throw it in the DVD player, but it's not so good for someone who wants to edit the video on the computer. The camcorder manufacturers probably shipped the cameras with some kind of conversion program to extract the video from the discs and convert it into an editable format, but since I didn't own one of these mini-DVD camcorders, I didn't have such software.
A little googling and I found the answer!
Check out this command:
mplayer dvd://1 -dumpstream -dumpfile dvd.vob
This mplayer command may be familiar to those who rip video from DVDs to convert it to an MPEG4 format or something similar.
I can't edit a VOB file, so I needed to convert the VOB into, preferably, an AVI. Most of the AVIs I edit are DV format AVIs that I get off my DV camcorders. I knew if I could get the video on the mini-DVD into that format, I'd be in heaven. I didn't find a direct way to do this, but I did find two more steps that would do it.
ffmpeg -i dvd.vob -target dv dvd.dv
cat dvd.dv | dvgrab -f dv2 -s 0 -stdin
The first command (ffmpeg) converts the VOB into raw DV data. This is data you could stream to a camcorder and store on a tape. It's not in an AVI container, but it's close. The next command (dvgrab) is usually used for capturing video from IEEE 1394 (Firewire) video devices, but being that it has an option (-stdin) for reading data from standard input, we can use it to convert our raw DV data to an AVI.
Voila!
Categories
Linux , Open source software , Video0 TrackBacks
Listed below are links to blogs that reference this entry: Handy Linux video trick: mini-DVD to DV AVI.
TrackBack URL for this entry: http://www.fozzilinymoo.org/cgi-bin/mt/mt-tb.cgi/553

You can also try:
mencoder dvd://1 -oac copy -ovc copy -o dv.avi
Why use 4 utilities (including cat) when you can do the same thing with one?
Nice!
I use a DVD camcorder instead of a DV, because I like the flexibility of pulling a working DVD straight from the camera. When I do get time to process the video, this is shortcut.
Jonathan,
I'm intrigued by your simple mplayer command suggestion. How do you tell mplayer to use the DV codec in the AVI file?
mencoder dvd://1 -oac copy -ovc lavc -lavcopts vcodec=dvvideo -o dv.avi
The -oac and -ovc options tell mencoder what to use for audio encoding and video encoding, respectively. The DV codec is implemented in libavcodec, or lavc; to choose it, you tell mencoder to choose to encode with lavc and tell lavc to encode with its DV codec. Performing this operation is lossy, and will result in a decrease in quality and probably an increase in filesize. The -oac copy and -ovc copy are lossless operations; no decoding or encoding of streams is performed, only multiplexing. When you can, you should do your editing on the MPEG-2 source without transcoding to DV.
Try 'man mplayer' at the command prompt for more help, or go to http://www.mplayerhq.hu/DOCS/man/en/mplayer.1.html