7

I would like to convert a whatever-type video file into an ISO image I could then burn to a DVD (on another computer) - so that the final disc is playable on a regular DVD player.

I already have ffmpeg installed with medibuntu, and mpeg output support does seem to work.

Is there a command line tool, or a simple script that I could use to do this?

0

2 Answers 2

6

You need specifically mpeg2 output (mpeg1 will do, if you don't mind the loss of resolution, but mpeg4 is outside the spec). You probably want PAL 720x576 25fps 16:9, with MPEG-1 or AC3 audio; or for NTSC 720x480 and 23.97fps (or whatevs). However, you can use the "dvd" target preset to make things easy, simply by running ffmpeg -i input.avi -target dvd video.mpg

To turn the mpeg file to an DVD compatible folder structure, you need a tool like dvdauthor. There are probably some frontends to it, but the first example from the book, chapter 1.2, is probably sufficient for you. Put that example into file dvdauthor.xml and your video to video.mpg and execute dvdauthor -o DVD -x dvdauthor.xml.

This will result in a directory structure under folder DVD, which you can turn in to an iso file with genisoimage -dvd-video -o my.iso -v DVD. You can then copy my.iso to some other system and burn on a disc with wodim or some other tool.

The resulting disc should be playable in standalone players, but due to DVD limitations you may run into problems with arbitrary mpeg streams. Some of the problems may be fixed with dvdauthor and others with mplex from package mjpegtools. If you want subtitles, you'll need to learn how to use spumux.

1
  • Thanks! That should be enough specs to get me going. I'll research the required ffmpeg options and try this to see if this works. Jul 13, 2011 at 20:45
4

@taneli's answer covers most of the process but there are a few missing details. Here is my complete process for converting an MP4 file and writing it to a DVD.

I usually only work with MP4 files but I think this should work with most video formats as inputs (as long as it's supported by ffmpeg). I have tested this on NTSC DVD players.

(Tested in Lubuntu 16.04 LTS, Ubuntu Mate 18.04, and Ubuntu Mate 20.04, AMD64)

1. Install these packages (using sudo apt-get install):

  • dvdauthor
  • ffmpeg
  • wodim
  • mkisofs

2. Convert your video file to the correct format.

(tested using ffmpeg version 2.8.15-0 and 4.2.2-1ubuntu1)

This depends on the region of the world where you bought the DVD player.

3. Use dvdauthor to create the dvd filesystem

(Tested using dvdauthor 0.7.0 and 0.7.2)

First time setup:

(source)

Create a file called video_format in ~/.config/.

The file just needs to contain a single line:

  • NTSC Users: NTSC
  • PAL Users: PAL
  • SECAM Users: SECAM? I wasn't able to confirm this.

Creating the DVD's Filesystem:

(source)

dvdauthor --title -o yourvideo -f yourvideo.mpg
dvdauthor -o yourvideo -T

These commands will write the DVD's filesystem to a folder named "yourvideo".

4. Creating an iso

(Tested using mkisofs 1.11.11)

This command will take the contents of the yourvideo folder and convert it into an iso.

mkisofs -dvd-video -o yourvideo.iso yourvideo/

5. Burn the iso to a blank DVD

(Tested using Wodim 1.1.11)

(source)

You will likely need to change /dev/sr0/ to match the device name of your DVD burner.

sudo wodim -tao speed=2 dev=/dev/sr0 -v -data yourvideo.iso

9
  • This didn't work. "dvdauthor --title -o yourvideo -f yourvideo.mpg" in Terminal resulted in an endless number of "WARN: unknown mpeg2 aspect ratio 1" lines.
    – Henrik R.
    Jun 7, 2019 at 10:23
  • @HenrikR. what video format were you using? PAL, NTSC or SECAM?
    – jrh
    Jun 7, 2019 at 12:06
  • PAL. This command: "$ ffmpeg -i "Apollo - Farsight.org.mp4" -target pal-dvd apollo.mpg"
    – Henrik R.
    Jun 7, 2019 at 12:45
  • @HenrikR. Ok, I'll look into it when I get home tonight; I have no PAL devices to test on but I can at least check up to the point where I make the iso.
    – jrh
    Jun 7, 2019 at 13:06
  • Thank you! I look forward to hear from you. Should I try to send you the output of the above ffmpeg command?
    – Henrik R.
    Jun 7, 2019 at 13:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.