Gentoo Wiki ArchivesGentoo Wiki

FFmpeg/DivX_to_DVD

Contents

Intro

The HOWTO Create a DVD guides gives a simple example of how to transcode divx and other video formats to DVD format. This page is intended to document that example as well as some more complex examples.

QuickStart

If you want to encode your input files into DVD video without setting any other particular option, you can run:

$ ffmpeg -i input_file.avi -target ntsc-dvd -aspect 4:3 movie.mpg

or

$ ffmpeg -i input_file.avi -target pal-dvd -aspect 4:3 movie.mpg 

All the format options (bitrate, codecs, buffer sizes) are automatically set by the "-target" option.

Use -sameq to make sure you don't lose any quality in the reencoding process. That switch apparently tells ffmpeg to adjust the bitrate as needed. It may not be required but it can't hurt. WARNING: -sameq can sometimes generate bitrate spikes above 9.8 Mbit/s (DVD-Video MPEG-2 maximum bitrate). Stand-alone DVD players will freeze at these points in the video.

Setting the Correct Display Aspect Ratio

Unlike AVI files, etc PAL and NTSC can only display specific aspect ratios. Full PAL and NTSC resolutions are 720576 and 720480, respectively. For example, if one has an AVI file with a resolution of 624x268 (2.35:1). To get an DVD-Video-ready MPEG-2 without any squashing or squeezing of the video you would add black bar padding to the top and bottom of the MPEG, shown below

$ ffmpeg -i input_file.avi -target pal-dvd -s 720x440 -padtop 68 -padbottom 68 -aspect 16:9 movie.mpg   

The calculation of the correct aspect is a little confusing, but you can read about how to do it. However, there is a script available to calculate the correct aspect and padding required to maintain aspect of MPEG.

ToDo

Retrieved from "http://www.gentoo-wiki.info/FFmpeg/DivX_to_DVD"

Last modified: Thu, 28 Aug 2008 14:03:00 +1000 Hits: 20,521

Created by NickStallman.net, Luxury Homes Australia
Real estate agents should list their apartments, townhouses and units in Australia.