====== Video Manager Group IFO (VMGI) ======
* [[DVD Structure]]
* [[VMG]]
The VMGI is the primary [[IFO]] containing all the metadata about the entire DVD. Or as I often call it, IFO zero.
Files are a normal IFO file, the first one on the disc, being ''VIDEO_TS.IFO'' and ''VIDEO_TS.BUP''.
* [[http://stnsoft.com/DVD/ifo.html|Video Manager and Video Title Set IFO file headers]] - data in both VMG and VTS IFOs
* [[http://stnsoft.com/DVD/ifo_vmg.html|Video Manager IFO]] - data specific **to the one** VMG IFO
==== VMG IFO Contents: libdvdread ====
See ''ifoOpenVMGI()'' in ''ifo_read.h''.
See ''vmgi_mat_t'' struct in ''ifo_types.h''.
ifo_handle_t *ifo_zero;
ifo_zero = ifoOpen(dvdread_dvd, 0);
** VMG ID **
* Example: DVDVIDEO-VMG
char *id;
id = ifo_zero->vmgi_mat->vmg_identifier;
** Last sector of VMG set **
The last sector of the BUP.
uint32t i;
i = ifo_zero->vmgi_mat->vmg_last_sector;
** Last sector of IFO **
Current IFO? Not sure...
uint32t i;
i = ifo_zero->vmgi_mat->vmgi_last_sector;
** Version number **
* [[http://stnsoft.com/DVD/ifo.html#ver]]
uint8t i;
i = ifo_zero->vmgi_mat->specification_version;
** VMG category **
uint32_t i;
i = ifo_zero->vmgi_mat->vmg_category;
** Number of volumes **
Not sure if I've seen this one yet, where it is positvely set (todo: search IFOs). It's the number of volumes for an entire set of the DVDs that this one is a part of a collection.
uint16_t i;
i = ifo_zero->vmgi_mat->vmg_nr_of_volumes
** Volume number **
uint16_t i;
i = ifo_zero->vmgi_mat->vmg_this_volume_nr;
** Disc side **
This should obviously be a 1 or a 2.
uint8t i;
i = ifo_zero->vmgi_mat->disc_side;
** Number of title sets **
Number of VTSs, aka IFOs. **For debugging**, this number should match the actual amount of IFOs on a DVD.
uint16_t i;
i = ifo_zero->vmgi_mat->vmg_nr_of_title_sets;
** Provider ID **
Example: ''DEFENDERS_OF_THE_EARTH_V2D2A''. Often blank. 32 characters not including a NULL terminator.
char *id;
id = ifo_zero->vmgi_mat->provider_identifier;
** VMG POS **
Dunno what this one is. 8-bytes.
uint64_t i;
i = ifo_zero->vmgi_mat->vmg_pos_code;
** Last byte of VMG IFO (IFO Zero) **
uint32_t i;
i = ifo_zero->vmgi_mat->vmgi_last_byte;
** Start address of first PGC **
First Play program chain.
* [[http://stnsoft.com/DVD/pgc.html]]
uint32_t i;
i = ifo_zero->vmgi_mat->first_play_pgc;
** Start sector of menu VOB **
Dunno what this is yet.
uint32_t i;
i = ifo_zero->vmgi_mat->vmgm_vobs;
** Sector pointer to TT_SRPT, table of titles **
* [[http://stnsoft.com/DVD/ifo_vmg.html#tt]]
uint32_t i;
i = ifo_zero->vmgi_mat->tt_srpt;
** Sector pointer to Menu Program Chain Table (VMGM_PGCI_UT) **
* [[http://stnsoft.com/DVD/ifo_vmg.html#pgciut]]
uint32_t i;
i = ifo_zero->vmgi_mat->vmgm_pgci_ut;
** Sector pointer to Parental Management masks (VMG_PTL_MAIT) **
* [[http://stnsoft.com/DVD/ifo_vmg.html#mait]]
uint32_t i;
i = ifo_zero->vmgi_mat->ptl_mait;
** Sector pointer to copies of VTS audio/sub-picture attributes (VMG_VTS_ATRT) **
* [[http://stnsoft.com/DVD/ifo_vmg.html#atrt]]
uint32_t i;
i = ifo_zero->vmgi_mat->vts_atrt;
** Sector pointer to VMG_TXTDT_MG **
Text data. No idea what this one is.
uint32_t i;
i = ifo_zero->vmgi_mat->txtdt_mgi;
** Sector pointer to menu cell address table (VMGM_C_ADT) **
* [[http://stnsoft.com/DVD/ifo.html#c_adt]]
uint32_t i;
i = ifo_zero->vmgi_mat->vmgm_c_adt;
** Sector pointer to menu VOBU address map (VMGM_VOBU_ADMAP) **
* [[http://stnsoft.com/DVD/ifo.html#vam]]
uint32_t i;
i = ifo_zero->vmgi_mat->vmgm_vobu_admap;
** Video attributes of menu VOBs (VMGM_VOBS) **
* [[http://stnsoft.com/DVD/ifo.html#vidatt]]
video_attr_t *a;
a = ifo_zero->vmgi_mat->vmgm_video_attr;
** Number of audio streams in menu VOBs (VMGM_VOBS) **
Should be 0 or 1 (**debugging checks**).
uint8_t i;
i = ifo_zero->vmgi_mat->nr_of_vmgm_audio_streams;
** Audio attributes of menu VOBs (VMGM_VOBS) **
* [[http://stnsoft.com/DVD/ifo.html#maudatt]]
For //channels// the most common integer value (from my findings) is 0 or 1. Need to find out if that means integer + 1 (so, 0 = mono, 1 = stereo) or what.
audio_attr_t *a;
a = ifo_zero->vmgi_mat->vmgm_audio_attr;
** Number of subpicture streams in menu VOBs (VMGM_VOBS) **
Should be 0 or 1 (**debugging checks**).
uint8_t i;
i = ifo_zero->vmgi_mat->nr_of_vmgm_subp_streams;
** Subpicture attributes of menu VOBs (VMGM_VOBS) **
subp_attr_t *a;
a = ifo_zero->vmgi_mat->vmgm_subp_attr;