HOWTO: convert an AVI or to DVD (VOB) in Linux

I have some AVIs that I needed to get into the VOB format so I could burn them to DVD. I knew I could do this in Linux, but didn’t know how. Here is how I did it with Debian GNU/Linux (testing – Lenny). First I installed the GTK+ app, Avidemux (don’t worry, we’ll get back to the commandline soon). The I opened the AVI in Avidemux – after it imported it I clicked on FILE -> SAVE -> SAVE VIDEO – then choose where to save the file. I saved it as movie.mpg so it would work with my next step. This took some time for me, even with my duo-core 1.6Mhz 1Gig RAM laptop, but once it was complete I could play the mpg file in multimedia apps, so it worked. Now we need to make it into the format that you can burn to DVD. These are the weird looking folders named VIDEO_TS and AUDIO_TS that you’ll burn to the root of the DVD. To build this from an mpg is pretty easy, you need to install the commandline app dvdauthor. Once this is downloaded we need a simple XML file to tell dvdauthor what to do, so I created a base/simple one – open your text editor of choice (vim ftw!) and create a new file:

vi dvdauthor.xml

with the contents (NOTE: change all ( and )s to brackets, apparently neither the pre or code tag accepts brackets in them in wordpress – reminder to self, fix this):

(dvdauthor dest="DVD")
  (vmgm /)
   (titleset)
     (titles)
       (pgc)
         (vob file="movie.mpg" chapters="0,15:00,30:00,45:00,1:00:00"/)
       (/pgc)
      (/titles)
   (/titleset)

Now run dvdauthor referring to new XML file:

dvdauthor -x dvdauthor.xml

When it’s done you’ll have a new directory called DVD, with the contents VIDEO_TS and AUDIO_TS. Open your favorite DVD burning app (I recommend GnomeBaker) and place those two direcotries in the root of the DVD and burn. Notice that in the XML file we called out chapters as 0, 15, 30, 45, 1 hour – obviously these can be further tweaked to be ‘real’ chapters, or left out all together. I’m sure there’s a GUI DVD authoring app that helps you do this, if you figure it out post below and let me know. HTH!




  • http://www.codemonkies.co.nz/linux/ Nameeater

    Thanks for posting this, I am in the final process of converting an avi file to mpeg with Avidemux, I had to select the DVD option from the Auto menu to get it to convert it to dvd format. Fingers crossed it will play on my cheap dvd player.

    You can use &lt; and &gt; inside the tags and it will display the brackets <>.

  • http://www.codemonkies.co.nz/linux/ Nameeater

    Thanks for posting this, I am in the final process of converting an avi file to mpeg with Avidemux, I had to select the DVD option from the Auto menu to get it to convert it to dvd format. Fingers crossed it will play on my cheap dvd player.

    You can use &lt; and &gt; inside the tags and it will display the brackets <>.

  • http://www.codemonkies.co.nz/linux/ Nameeater

    Oops, forgot to use lt and gt when I said “..inside the <code> tags..”. :)

  • http://www.codemonkies.co.nz/linux/ Nameeater

    Oops, forgot to use lt and gt when I said “..inside the <code> tags..”. :)

  • petejh

    I tried the last part of your suggested method on .mpg files generated by ffmpeg from .m2t recordings made in Kaffeine from my TV card. Everything worked fine except that some of the necessary files were missing, so K3b wouldn’t burn a DVD from the contents of the VIDEO_TS folder. These were VIDEO_TS.BUP, VIDEO_TS.IFO and VIDEO_TS.VOB. However, it seems these are all dummy files with no content, as I was able to copy files of the same name from a working VIDEO_TS folder of a different film. Once I did that, the VIDEO_TS folder worked perfectly and I was able to burn a video dvd in K3b. Thanks for a great howto, fak3r – it rescued me from hours of fruitless struggle with qdvdauthor.

  • petejh

    I tried the last part of your suggested method on .mpg files generated by ffmpeg from .m2t recordings made in Kaffeine from my TV card. Everything worked fine except that some of the necessary files were missing, so K3b wouldn't burn a DVD from the contents of the VIDEO_TS folder. These were VIDEO_TS.BUP, VIDEO_TS.IFO and VIDEO_TS.VOB. However, it seems these are all dummy files with no content, as I was able to copy files of the same name from a working VIDEO_TS folder of a different film. Once I did that, the VIDEO_TS folder worked perfectly and I was able to burn a video dvd in K3b. Thanks for a great howto, fak3r – it rescued me from hours of fruitless struggle with qdvdauthor.

  • SmalleyTunney211

    Hello Guyz I added this post to my article site. You can view this here.Have a nice dayjames kails______________________________________________cctv security cameras | Telephone Answering Service | new jersey dj's

  • http://www.tritex-games.com metal miniatures

    Can i have more info on this ?ThanksGallardo______________________________________________

  • diserrollador

    hi, i tried, but some error

    WARN: Skipping sector, waiting for first VOBU…
    WARN: Skipping sector, waiting for first VOBU…
    WARN: Skipping sector, waiting for first VOBU…

    WARN: Partial sector read (1364 bytes); discarding data.
    STAT: VOBU 0 at 0MB, 1 PGCS
    Fallo de segmentación

  • diserrollador

    hi, i tried, but some error WARN: Skipping sector, waiting for first VOBU…WARN: Skipping sector, waiting for first VOBU…WARN: Skipping sector, waiting for first VOBU…WARN: Partial sector read (1364 bytes); discarding data.STAT: VOBU 0 at 0MB, 1 PGCSFallo de segmentación

  • http://www.gpscardvd.com Car DVD Players

    These are the weird looking folders named VIDEO_TS and AUDIO_TS that you’ll burn to the root of the DVD.

  • http://www.gpscardvd.com Car DVD Players

    These are the weird looking folders named VIDEO_TS and AUDIO_TS that you’ll burn to the root of the DVD.

  • http://www.easydvdburning.com/ DVD Burning

    Awesome ripping tips! I’m gonna try this and see if it works.

  • http://www.easydvdburning.com/ DVD Burning

    Awesome ripping tips! I’m gonna try this and see if it works.

Read previous post:
Blublocker photography

Here's a cool idea, shoot pictures through some old Blublocker sunglasses and you get Blublocker photography!  While I've shot through [...]

Close