[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

mkisofs video-dvd pad value bug?



I have a few DVDs mastered with ULEAD-DVD. They play fine and their
menus work fine on commercial DVD players, and at least one MS-based PC
DVD player program. I want to add several data files to the DVDs, and
remaster them with mkisofs -dvd-video. No change to the video-related
files is made or desirable. mkisofs gives a fatal error like:

mkisofs: Implementation botch. Video pad for file VTS_01_0.IFO is -6
mkisofs: Either the *.IFO file is bad or you found a mkisofs bug.

mkisofs 2.01 (x86_64-suse-linux)
same error with vanilla mkisofs 2.01.01a11.

I modified dvd_file.c (patch attached) to produce some debugging output,
and to set the pad value, which later causes the fatal error, to zero.
The output is:

mkisofs -dvd-video -v -abstract '..' -appid '..' -biblio '' -copyright '..' \
 -preparer '..' -publisher '..' -sysid '..' -volid .. -volset '..' \
 -o /dev/null /tmp/d/
mkisofs 2.01.01a05 (x86_64-unknown-linux-gnu)
Scanning /tmp/d/
Scanning /tmp/d/AUDIO_TS
Scanning /tmp/d/VIDEO_TS
::VIDEO_TS.BUP::
::.BUP:0::
::VIDEO_TS.IFO::
::.IFO:0::
::VIDEO_TS.VOB::
::.VOB:0::
::VTS_01_0.BUP::
::.BUP:0::
::VTS_01_0.IFO::
::.IFO:-6:setting to 0::
::VTS_01_1.VOB::
::VTS_01_2.VOB::
::VTS_01_3.VOB::
::vob=3:6::
The pad was 6 for file VTS_01_3.VOB
...

Two of the files on the DVD are identical, yet give different "pad" values:

61aaeffe77d0db10f22cd75ad26b35a7  VIDEO_TS/VTS_01_0.IFO
61aaeffe77d0db10f22cd75ad26b35a7  VIDEO_TS/VTS_01_0.BUP

With this modified mkisofs, i.e. removing the error to be fatal but not
changing mkisofs's behaviour, a DVD is created which as before plays
just fine in any way I can test.

I see two possibilities:

1) The DVD files created by ULEAD-DVD are incorrect, but play in every
DVD player. If so, mkisofs should not make the error fatal, because
there must be a huge number of disks with this fault but which work
fine. I doubt ULEAD will take any action.

2) A bug in mkisofs causes the "pad" values to be incorrectly calculated
in some cases, resulting in mkisofs refusing to master the disk.

The attached patch removes the error and allows a DVD to be mastered. It
is meant to illustrate the issue, not as solution, although it is a
workaround if the validity of the menu-related files can be otherwise
verified.

Comments? More insights?

Volker

-- 
Volker Kuhlmann			is list0570 with the domain in header
http://volker.dnsalias.net/	Please do not CC list postings to me.
Patch for some additional debugging output, for a problem that a video-DVD
structure created by 

  > strings VIDEO_TS/VIDEO_TS.IFO
  DVDVIDEO-VMG
  ULEAD-DVD

is rejected with a fatal error by mkisofs:

mkisofs -dvd-video -v -abstract '..' -appid '..' -biblio '' -copyright '..' \
 -preparer '..' -publisher '..' -sysid '..' -volid .. -volset '..' \
 -o /dev/null /tmp/d/
mkisofs 2.01.01a05 (x86_64-unknown-linux-gnu)
Scanning /tmp/d/
Scanning /tmp/d/AUDIO_TS
Scanning /tmp/d/VIDEO_TS
::VIDEO_TS.BUP::
::.BUP:0::
::VIDEO_TS.IFO::
::.IFO:0::
::VIDEO_TS.VOB::
::.VOB:0::
::VTS_01_0.BUP::
::.BUP:0::
::VTS_01_0.IFO::
::.IFO:-6:setting to 0::
::VTS_01_1.VOB::
::VTS_01_2.VOB::
::VTS_01_3.VOB::
::vob=3:6::
The pad was 6 for file VTS_01_3.VOB
...

The two files are identical:

61aaeffe77d0db10f22cd75ad26b35a7  VIDEO_TS/VTS_01_0.IFO
61aaeffe77d0db10f22cd75ad26b35a7  VIDEO_TS/VTS_01_0.BUP

but return a different offset?
The offset is set to 0 for now to prevent a fatal error.


--- cdrtools-2.01.01/mkisofs/dvd_file.c.orig	2004-03-05 11:28:53.000000000 +1300
+++ cdrtools-2.01.01/mkisofs/dvd_file.c	2006-08-11 14:30:02.000000000 +1200
@@ -734,12 +734,27 @@
 	if (name[0] != 'V') {
 		return (0);
 	}
+	if (verbose > 0) {
+		fprintf(stderr, "::%s::\n", name);
+	}
 	if (memcmp(name, "VIDEO_TS", 8) == 0) {
 		if (strstr(name, ".IFO") != 0) {
+			if (verbose > 0) {
+				fprintf(stderr, "::.IFO:%i::\n",
+				title_set_info->title_set[0].pad_ifo);
+			}
 			return (title_set_info->title_set[0].pad_ifo);
 		} else if (strstr(name, ".VOB") != 0) {
+			if (verbose > 0) {
+				fprintf(stderr, "::.VOB:%i::\n",
+				title_set_info->title_set[0].pad_menu);
+			}
 			return (title_set_info->title_set[0].pad_menu);
 		} else if (strstr(name, ".BUP") != 0) {
+			if (verbose > 0) {
+				fprintf(stderr, "::.BUP:%i::\n",
+				title_set_info->title_set[0].pad_bup);
+			}
 			return (title_set_info->title_set[0].pad_bup);
 		} else {
 			return (0);
@@ -756,12 +771,30 @@
 			return (0);
 		} else {
 			if (strstr(name, ".IFO") != 0) {
+				if (verbose > 0) {
+					fprintf(stderr, "::.IFO:%i:setting to 0::\n",
+					title_set_info->title_set[title].pad_ifo);
+				}
+				return (0);
 				return (title_set_info->title_set[title].pad_ifo);
 			} else if (strstr(name, ".BUP") != 0) {
+				if (verbose > 0) {
+					fprintf(stderr, "::.BUP:%i::\n",
+					title_set_info->title_set[title].pad_bup);
+				}
 				return (title_set_info->title_set[title].pad_bup);
 			} else if (vob == 0) {
+				if (verbose > 0) {
+					fprintf(stderr, "::vob==0:%i::\n",
+					title_set_info->title_set[title].pad_menu);
+				}
 				return (title_set_info->title_set[title].pad_menu);
 			} else if (vob == title_set_info->title_set[title].number_of_vob_files) {
+				if (verbose > 0) {
+					fprintf(stderr, "::vob=%i:%i::\n",
+					vob,
+					title_set_info->title_set[title].pad_title);
+				}
 				return (title_set_info->title_set[title].pad_title);
 			} else {
 				return (0);

Reply to: