View Full Version : How does DVD Shrink do it?
jeanl
10th November 2005, 18:04
Guys, I'm puzzled.
How does DVDShrink run its analysis phase so fast. It seems to me it has to detect all the pack types in all the VOBs, all 8GB of them, but it usually does that in less than 30-40s... Simply reading the VOB, at 20MB/s - 30MB/s should take at least 240s or 4 minutes! So I'm guessing it does not detect all the pack types, but how does it know the relative sizes of video, audio, subpic packs, for each stream?
I'm really puzzled here!
Jeanl
EDIT: P.S. I'm thinking DVDShrink "downsamples" by checkint 1 VOBU out of 10 for example, guessing that on average, what it finds in that VOBU is representative of what it will find in the 9 others...
jfcarbel
3rd December 2005, 11:00
I explored was exploring a similar project and was trying to understand how DVDShrink does its scan so quickly. Below are some links that may provide you with more insight.
Basically here is what i discovered:
IFO files contain an index table for each vobu (=GOP) in the VOBS. The DVDShrink preview engine uses this table for seeking. VOBU_ADMAP in the IFO contains LBA values for each GOP (I frames). So DVDShrink probably just reads these from the IFO and stores them in his own index file along with other information. Thus its fast because he is not building the index rather just parsing IFO files.
See DVDShrinks response in this thread:
http://forum.doom9.org/showthread.php?s=&threadid=61530
Some other helpful threads:
http://forum.doom9.org/showthread.php?s=&postid=644072#post644072
http://forum.doom9.org/showthread.php?t=60269
http://forum.doom9.org/showthread.php?t=62097
jeanl
3rd December 2005, 18:40
Thanks jfcarbel! That's a bunch of interesting discussions (especially about dvd2avi, which I'm quite familiar with, by now, having modified it several times for pgceditpreview).
About shrink: Yes, there's no doubt that it uses the VOBU_ADMAP table (not hard to test, mess the table up, and dvdshrink refuses to open the DVD). It also uses the VTS_C_ADT tables, but I'm not sure what for (mess it up, and it won't open). It also uses the PGC information (i.e., the start and end LBA of each of the PGC cells) to determine what's the main movie, and what's unreference material.
But even if you use the VOBU_ADMAP table, how do you determine the relative proportions of audio, video, and subpics without looking into each VOBU? That was the sense of my question. I still think shrink downsamples the VOBUs for its quick analysis, and looks at each and everyone of them for its deep analysis (?)...
jeanl
jfcarbel
15th June 2006, 05:24
But even if you use the VOBU_ADMAP table, how do you determine the relative proportions of audio, video, and subpics without looking into each VOBU?
JeanL - did you ever find an answer to this?
jeanl
15th June 2006, 05:32
I didn't get a straight answer, i.e. from DVDShrink himself, but the consensus is that the app samples the vobus, and determines the average proportions by looking at a few vobus in a cell...
jeanl
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.