I recently bought a DVD burner, and I’ve been experimenting with the different software for video conversion, mastering, and burning in Linux.
I’ve used Transcode and Ripmake in the past to do DVD-to-SVCD and AVI-to-SVCD reencodes. The problem I had with those tools is that they default to using MJPEG Toola, which I have never managed to get reasonable performance with. My 2.4ghz P4 only gets ~12fps when transcoding using tmarihis method. Recompiling with GCC 3.4 and all optimizations enabled brought me up to ~18-20fps, but this is still not acceptable.
Ripmake also seems to default to non-anamorphic DVD encodes. I don’t know if this can be changed, but it’s certainly not desirable.
Fortunately, I’ve had much better luck with FFmpeg’s performance. It also understands enough codecs to work directly on an AVI and spit out DVD-ready MPEG-2 video.
I’m running Debian sarge (testing), with Christian Marillat’s excellent Debian video packages. I have the following packages installed:
For this example, we’ll assume that you have a 1.85:1 ratio XviD AVI to convert, though it should be incredibly obvious how to convert a 1.33:1 video as well.
Reencoding the AVI is simple:
$ ffmpeg -i my_video.avi -target dvd -aspect 16:9 -sameq my_dvd_video.mpg
That’s all there is to it. The -target dvd option causes FFMpeg to handle all the niggly bits necessary to convert to DVD, including scaling the video frame, resampling audio, and so forth. According to the FFmpeg documentation, -sameq “uses in the encoder the same quality factor than in the decoder. It allows to be almost lossless in encoding.” Sounds good to me.
I get just over 25fps on my system using this method, with very acceptable output quality.
Now, we have to master the DVD image. You’ll need a copy of dvdauthor for this.
Create the DVD structure:
$ mkdir DVD $ dvdauthor --title -f my_dvd_video.mpg -o DVD $ dvdauthor -T -o DVD
The DVD structure will now be in the “DVD” directory. Now we just have to burn this to our DVD. You will need to be root to do this.
# growisofs -dvd-compat -dvd-video -speed=4 -Z /dev/dvd ./DVD/*
You can change the speed argument to suit your burner and media speed. You can also drop the contents of the VIDEO_TS folder into a K3b DVD Video project, if you prefer a GUI.
And that’s it. You should be able to drop the burned disc into your DVD player and enjoy.
Edit: Fixed Christian’s address.
Discussion