Re: libdvdread has trouble with some DVD images

H}kan Hjort <[email protected]>
Newsgroups gmane.comp.video.ogle.devel
Message-ID <[email protected]>
Wed Jul 24 2002, Jeff Bowden wrote:
> The company I work for has a library of non-encrypted DVD images on a 
> large file server.  These images were created as backup copies of VHS 
> video tapes using some DVD authoring software.   I've been using tccat 
> from the transcode project (which uses libdvdread) to extract the mpeg-2 
> streams from these but a small percentage of them cause trouble.  The 
> exact error is:
> 
> tccat: ifo_read.c:324: ifoRead_VMG: Assertion `vmgi_mat->vmgm_vobs == 0 
> || (vmgi_mat->vmgm_vobs > vmgi_mat->vmgi_last_sector && 
> vmgi_mat->vmgm_vobs < vmgi_mat->vmg_last_sector)' failed.
> 
> For reference: The Mediamatics DVD player in Windows can play from these 
> images.  Also, if I make a physical DVD-R from one of these images, I 
> can play it in a Sony DVD player.
> 
> Any ideas for how to proceed in enhancing dvdread to be able to handle 
> these?
> 
> I modified ifo_read.c to dump the contents of the vmgi_mat struct.  Here 
> is example of its output:
> 
> vmgi_mat_t:
>    vmg_identifier[12] = "DVDVIDEO-VMG"
>    vmg_last_sector = 277
>    vmgi_last_sector = 47
>    zero_2 = 0
>    specification_version = 16
>    vmg_category = 0
>    vmg_nr_of_volumes = 1
>    vmg_this_volume_nr = 1
>    disc_side = 1
>    vmg_nr_of_title_sets = 2
>    provider_identifier[32] = "FLASH-DVD"
>    vmg_pos_code = 0
>    vmgi_last_byte = 1275
>    first_play_pgc = 1024
>    vmgm_vobs = 16
>    tt_srpt = 1
>    vmgm_pgci_ut = 2
>    ptl_mait = 0
>    vts_atrt = 45
>    txtdt_mgi = 0
>    vmgm_c_adt = 46
>    vmgm_vobu_admap = 47
>    nr_of_vmgm_audio_streams = 0
>    nr_of_vmgm_subp_streams = 1
> tccat: ifo_read.c:341: ifoRead_VMG: Assertion `vmgi_mat->vmgm_vobs == 0 
> || (vmgi_mat->vmgm_vobs > vmgi_mat->vmgi_last_sector && 
> vmgi_mat->vmgm_vobs < vmgi_mat->vmg_last_sector)' failed.
>
So it seems that it's the part that checks 
vmgi_mat->vmgm_vobs > vmgi_mat->vmgi_last_sector
that fails.  Indeed the ifo information can't end a sector 47
and the VIDEO_TS.VOB file begin at sector 16.
(Or well I guess it could if the files where 'nested' within each other..
VIDEO_TS.VOB occupying 16-44)
Can you 'mount' one of these and look at what it says is the file
lenght of VIDEO_TS.IFO and VIDEO_TS.VOB ?

Given that vts_atrt, vmgm_c_adt and vmgm_vobu_admap seem to start
at sector offsets 45,46 and 47  the ifo file would have to end at
47 or later.  vmg_last_sector beeing 277 would also indicate that
the VIDEO_TS.VOB file should be 182 sectors long, not 29 (44-16+1).
 
Since libdvdread doesn't actually use these values for anything this
assert could just be a waring instead.

-- 
Håkan Hjort
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.