15 March, 2008

Burning an Avi/Mpg to Playable Dvd

It took some work, but I finally found out how to burn an Avi or Mpeg file onto a playable dvd.

Step 1: Convert the Avi/Mpeg to proper format
ffmpeg -i InputFile.mpg -aspect 16:9 -target ntsc-dvd foo.mpg

Step 2: Create dvd file structure
dvdauthor -o dvd/ -t foo.mpg
dvdauthor -o dvd/ -T

Step 3: Create ISO Image
mkisofs -dvd-video -v -o DVD.iso dvd/

Step 4: Burn to Disc
growisofs -dvd-compat -Z /dev/scd0=DVD.iso

This will burn an input video file to a playable dvd. This example doesn't include a dvd menu, nor multiple files on one disc. DvdAuthor suffers from the same symptom as many open-source products, little-to-no documentation nor examples. As a result, I wasted about a dozen DVD+R's trying to decrypt it's usage and finally gave up.

2 comments:

Anonymous said...

Congratulations, dude. Do you think you could document that in layman's terms? Specific questions for:
Step 1
a) Where do I go to convert the file? Do I do it in Explorer, or in the "Folders" view, or is there a program that I have to load the video into beforehand?
b)what exactly do all the dashes (-) and slashes (/) represent (if anything more than the dashes and slashes found in the file's name)?
c)what is the "ff" part of "ffmpeg" mean?
d)Is this a correct assumption: "InputFile.mpg" = memento.mpg, if the file you were working with was the movie memento and you had it in .mpg form?
e)is there a difference between Mpeg and mpg (besides the obvious, which is that the first one differs in that it contains 4 letters, one of which is capitalized)? I ask this because you have both written in step 1.


--OK, enough with that format. Here's a couple of general ones that seem essential:
How do you create file structures and ISO images, and what are file structures and ISO images?

what is growlsofs? What's up with the capital Z in step 4?

FatSlowKid said...

While the posting doesn't imply it, the steps are relevant to Linux OS distributions. I am not aware how this translates to Windows (eluded to by your reference of Explorer).
a) from a Unix (Linux) shell
b) dashes followed by a argument specify an argument or directive for the specified command. For example -o typically implies the following word is that of the desired output file.
c) Hmmm, not a clue. Referenced the author site but came up empty.
d) Actually, no. The -i implies the next word will be the input file. Therefore ffmpeg -i memento.mpg . . . would be the proper format.
e) As far as I know, purely cosmetic. The file itself contains codes implying what kind of file it is, so .mpeg, .mpg extensions are interchangable.