Perl programmer for hire: download my resume (PDF).
John Bokma MexIT
freelance Perl programmer

Burning VOB, BUP, and IFO to DVD on Ubuntu

Friday, November 28, 2008 | 6 comments

Today I wanted to burn a video DVD on Ubuntu 8.10. I had a directory dvd with a subdirectory VIDEO_TS. The latter containing the following files:

VIDEO_TS.BUP  VTS_01_0.IFO  VTS_02_0.BUP  VTS_03_0.BUP
VIDEO_TS.IFO  VTS_01_0.VOB  VTS_02_0.IFO  VTS_03_0.IFO
VIDEO_TS.VOB  VTS_01_1.VOB  VTS_02_0.VOB  VTS_03_0.VOB
VTS_01_0.BUP  VTS_01_2.VOB  VTS_02_1.VOB  VTS_03_1.VOB

but no idea how to burn those to a DVD in order to watch the actual video.

I first had a quick peek at Brasero, which is available via the Sound and Video submenu of the Applications menu in Ubuntu 8.10. And even though Brasero has a "Create a video DVD or SVCD" option, I was not sure if I could use it to burn the VOB, BUP, and IFO files in such a way that the end result would be a working DVD video.

After using Google for a little while I found two commands that could be typed in a terminal and together could be used to transform VIDEO_TS and the files contained within to a working DVD video. The first command would create a DVD video ISO image, and the second command would do the actual DVD burning. Since I had the impression - possible unjustified - that this would give a working video DVD sooner compared to trial and error in Brasero, I decided to give burning a video DVD from the command line a try.

Using mkisofs to create a DVD video ISO image

In order to create the ISO image for burning to DVD I entered the following command in a terminal window:

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

Note: dvd/ is the directory that contains the VIDEO_TS subdirectory (and optionally an AUDIO_TS subdirectory).

This generated the following output (similar lines suppressed for brevity):

I: -input-charset not specified, using utf-8 (detected in locale settings)
The pad was 16 for file VIDEO_TS.VOB
The pad was 16 for file VTS_01_2.VOB
The pad was 16 for file VTS_02_1.VOB
The pad was 16 for file VTS_03_1.VOB
  0.36% done, estimate finish Fri Nov 28 20:12:09 2008
  0.72% done, estimate finish Fri Nov 28 20:12:09 2008
  :           :               :                   :
  :           :               :                   :
 99.55% done, estimate finish Fri Nov 28 20:14:47 2008
 99.91% done, estimate finish Fri Nov 28 20:14:48 2008
Total translation table size: 0
Total rockridge attributes bytes: 0
Total directory bytes: 2158
Path table size(bytes): 26
Max brk space used 0
1391306 extents written (2717 MB)

The mkisofs command made an iso image dvdimage.iso; the file name specified using the -o option. And the option -dvd-video was used to ensure that the ISO image has a DVD-Video compliant UDF file system. For more information, see: mkisofs --help

Using growisofs to burn the ISO image to DVD

After I had created the ISO DVD video image using mkisofs I used growisofs to burn the image to a blank DVD. This program was originally designed as a frontend to genisoimage to facilitate appending data to ISO volumes on DVD+RW, DVD-RAM, plain files, etc. but can also be used for the mundane task of burning a ISO image to DVD. I issued to following command:

growisofs -dvd-compat -Z /dev/scd0=dvdimage.iso

This generated the following output (similar lines suppressed for brevity):

Executing 'builtin_dd if=dvdimage.iso of=/dev/scd0 obs=32k seek=0'
/dev/scd0: "Current Write Speed" is 16.4x1352KBps.
    2359296/2849394688 ( 0.1%) @0.5x, remaining 80:26 RBU  99.1% UBU   4.8%
   33390592/2849394688 ( 1.2%) @6.7x, remaining 9:50 RBU 100.0% UBU  99.9%
   64913408/2849394688 ( 2.3%) @6.8x, remaining 7:08 RBU 100.0% UBU  99.9%
   :                     :            :                  :           :
   :                     :            :                  :           :
 2793111552/2849394688 (98.0%) @13.1x, remaining 0:04 RBU 100.0% UBU  99.6%
builtin_dd: 1391312*2KB out @ average 9.6x1352KBps
/dev/scd0: flushing cache
/dev/scd0: updating RMA
/dev/scd0: closing disc

The option -dvd-compat provides maximum media compatibility with DVD-Video (and DVD-ROM). Moreover, in DVD+R or DVD-R context this closes the disk: no more sessions can be added. In DVD+RW context it instructs the drive to explicitly burn the lead-out.

The -Z option is used to specify the device to burn to. In my case the DVD-writer is /dev/scd0. A special form of this option allows you to specify a pre-mastered image: put the filename of the image after the device name, separated by an equal sign (=).

The path to the device (DVD-writer) was found using:

grep iso9660 /etc/fstab

Which, since I have only one optical drive, resulted in a single line of output:

/dev/scd0  /media/cdrom0  udf,iso9660 user,noauto,exec,utf8  0  0

Note that the growisofs example given above can be used to burn any pre-mastered ISO image to a DVD; the example is not limited to video images. For more information see: man growisofs

Testing the video DVD

After I had burned the ISO image to a blank DVD Esme tested it on her Dell Inspiron 1525; I still hadn't installed the libraries (via Medibuntu) required for playing DVDs on my Ubuntu workstation, a Dell Vostro 200 ST. The DVD played on Esme's notebook under Vista without a single problem.

Also today

Please post a comment | read 6 comments, latest by Ian | RSS feed