View Full Version : How does 'Get VTS Sectors' work?
int 21h
16th June 2003, 17:01
In both IFOUpdate and IFOEdit, the modification of VTS sectors is performed. How does this process actually work? Updating VTS_PTT_SRPT?
Let's say I wanted to make a simple program for splitting a DVD from one disc to two discs. You would have to be able to decrypt a disc, demux audio/video, and somehow update the sectors again.
Any hints?
Chatwalker
6th July 2003, 15:02
Hi int21h
I've wrote a litte piece of code for my application DVD2DVD-R that perform a GetVtsSector for a newly created DVD-Layout without menu and only one title.
My english is'nt so good, but i will try to give you some hints.
First off all, the DVD-Layout (without menu and only with one title) looks always like
VIDEO_TS.BUP
VIDEO_TS.IFO
VTS_01_0.BUP
VTS_01_0.IFO
VTS_01_1.VOB
.
.
VTS_01_X.VOB
Now you have to calculate the VMGLenght and the VTSLenght. You also have to calculate the start- and endsectors.
VMGLenght = FileLen("VIDEO_TS.IFO") + FileLen("VIDEO_TS.BUP")
StartSectorVMG = 0
LastSectorVMG = CLng(VMGLenght / 2048) - 1
VTSLenght=FileLen("VTS_01_0.IFO")+FileLen("VTS_01_0.BUP")+FileLen("VTS_01_1.VOB")+...+FileLen("VTS_01_X.VOB")
StartSectorVTS = CLng(FileLen("VTS_01_0.IFO") / 2048)
LastSectorVTS = CLng(VTSLenght / 2048) - 1
Now you have to modify VIDEO_TS.IFO. Open VIDEO_TS.IFO and write at offset 000C the LastSectorVMG. Now read the pointer to TT_SRPT from offset 00C4. With this pointer + 16 you have the adress for the startingsector of title 1 (see www.mpucoder.com). Write the new calculated (LastSectorVMG + 1).
After this, you have to modify VTS_01_0.IFO. Open VTS_01_0.IFO and write at offset 000C the calculated LastSectorVTS. At offset 00C4 write the StartSectorVTS (which means the start Sector of title 1).
If you want to perform GetVTSSectors on a DVD-Layout with menu or more than one title, you have to consider the VIDEO_TS.VOB and VTS_01_0.VOB. You also have to modify each VTS_XX_X.IFO and each entry in TT_SRPT.
Hope this will help
Chatwalker
mpucoder
6th July 2003, 20:32
Just want to expand a little. The offset at 0x0C4 is a sector number, the byte offset within the ifo for the first vts sector number is at 2048 * (pointer from 0x0C4) + 16.
In IfoEdit much more is done. All the vts are scanned and a new VOBU address map is made, then the NSML_AGLI, SML_PBI, SML_AGLI, and VOBU_SRI tables in each NAV pack are rebuilt. Offsets to audio and subpicture streams (SYNCI) are checked. Back in the ifo, the time map and PGC cell pointers are also corrected if need be.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.