Converting video for DVD with FFmpeg

Here’s another quick command line for FFmpeg. It converts interlaced video and audio into deinterlaced DVD-ready files. Your output will be a VOB file, ready to be split into a file of the correct size by any DVD authoring program (e.g. DVDStyler) without any further recoding.

The command line you see below was written for a recent film show, where interlaced material had been supplied on DVD, where the projector would not resize interlaced video correctly, and where the only replay device was a standard DVD player.

This command line is careful to apply the appropriate flags to the bitstream to signal that the video uses broadcast levels, and encodes colour according to ITU Rec.601, the standard for European (PAL) SD television.

Two filterchains are in use. The video filterchain first de-interlaces the incoming video, then applies noise-reduction because the files given to me were already noisy and, therefore, would waste bandwidth after encoding. The audio filterchain delays the sound by just over a frame: I found this to be necessary, possibly because of delays introduced by the video coder and the video filter.

ffmpeg -i VIDEO_INPUT -target pal-dvd -vf "w3fdif, hqdn3d" -af "adelay=50|50" -color_range 1 -colorspace 5 -color_primaries 5 -color_trc 5 VIDEO_OUTPUT.VOB

One thought on “Converting video for DVD with FFmpeg”

  1. Isn’t FFmpeg fabulous? =:o}

    I’ve been using Avisynth, driven via VirtualDub, for 99% of my video processing needs for the last decade, but as time marches on the Avisynth’s source filters are failing to keep up with new formats. The best all-round source filter(-set) by far is FFM2Source (or whatever it’s called – I always have to look up the exact spelling! =:o} ), because of course it taps into the power of FFmpeg, which *is* keeping pace with new developments… But it’s awkward to use in some situations (doesn’t always detect the correct audio track, for example), and recently I hit a couple of .TS files that even FFM2Source couldn’t handle.

    Looking around for something to convert these .TS files to something that I could pull into AviSynth (using lossless .h264 in a .AVI wrapper, maybe?), it occurred to me to try using FFmpeg directly. Not only did it open and read the offending .TS files correctly, and convert them as required, but I could do the de-interlacing and de-noising in the same pass, which saved a couple of steps in my Avisynth script and meant I could afford to go straight to “slightly lossy” encoding without any nasty artefacts from all that noise. (That saves a *lot* of disk space when you’ve got over 20 hours of raw video to clean up! =:o} )

Leave a Reply

Your email address will not be published. Required fields are marked *