View Full Version : Here's VB Code to Parse a VTS IFO File
DoC hEx
8th April 2003, 03:21
I’ve updated the code, same link below for the new version
Now only 1 byte is used to find the number of Audio and SubPics. I’m not to worry that both mpucoder/vstrip both use 2 bytes, but as the limit is 32 which is only a single byte.
I’ve also changed the code so that it will read files of Hard Drives correctly. The way I had coded the TreeView it would only if it was reading a DVD. Me bad! Hehe
------------------
Edit 15th of April
Okay, Here is the first version of the IFO DVD class. I hope people find it useful, though it might still needs some testing just to make sure it works with all regions and DVD movie.
SampleDVD.Zip (http://indigo.ie/~wilsonj/SampleDVD.zip)
Note: (SP2 of the VB is needed)
Edit
------------
12 April 2003
Has anyone done any IFO parsing with VB and would like to share there experience?
VidHack
8th April 2003, 15:02
Hello,
First of all, thanks for the VB Frame Viewer, I am disecting the code and learning quite a bit. I would be VERY interested in any thing regarding VB and VOB parsing or IFO parsing. I have wanted to dive into a VOB ID stream changer for a while. Perhaps with your help, we can do it as open source and let all enjoy the tool. The problem is VOB file sizes and speed. VB is slow as syrup. If I BINARY open a VOB and search for HEX 00 00 01 bf 03 fa 01 then count 25 bytes to the VOB ID byte to alter it in the stream, man is it slow. I think I am only in the intermediate level of VB and you eat it for lunch, so a VB tool to modify the VOB ID and Cell ID would be awsum, the problem is the cell time bytes also, I currently use a hex editor to do it. Please consider this as one of the first VB VOB tools we can develop, since it could be rolled into the final VOB IFO parser project. Thanks for your interest in posting VB code....THANKS....
VidHack
cbwarz
8th April 2003, 15:50
If what you want is know how many sound, subtitles, with names, ...
then all you need is mpucoder site.
I tried IFO parsing in VB for my @SVCD. But found more easily to use vstrip.exe and redirect the output and read from that.
CloneAD
8th April 2003, 18:35
To VidHack:
VB isn't gonna be slow cuz it's VB as such, a lot depends on how the 'c' and 'VB' equivalents are wrote.
I was looking at some 'c' yesterday from 'decodevob.c' which takes a VOB file and extracts and writes out the M2V and AC3 from it. So I just thought I'd have a mess and see if I could do the equivalent in BASIC.
I managed to do the M2V part, still don't know how to extract the AC3, don't know enough on the headers e.t.c.
Anyway, using the 'c' version took 1:32 to extract the M2V from a 1GB VOB file, my BASIC version took 53 seconds, almost 50% faster.
VidHack
8th April 2003, 19:05
Thanks for responding...
I too looked at vstrip.c code, about 3/4 threw the code is the file pointer routines for the VOB ID /Cell ID bytes. I figured I would just hardcode them to Hex 01 or 02 or 03 ect... So, that I could use the vstrip file routines (FAST) and just have it embed a VOB ID on the fly.
Could we all post any Apps you guys have developed in VB specifically for VOB parsing / IFO parsing? , and are willing to share the source code? I am already very interested in that m2v routine of yours. I also checked out the @svcd code, but it relied on helper apps, good work though, some good code in there. Congrates.
Thanks again, for your interest in VB and sharing code.
VidHack
DoC hEx
8th April 2003, 22:17
I would be VERY interested in any thing regarding VB and VOB parsing or IFO parsing. I have wanted to dive into a VOB ID stream changer for a while. Perhaps with your help, we can do it as open source and let all enjoy the tool.
@VidHack
Currently I’m trying to build a VB toolkit for Video and then DVD utilities. I pain to share all the code, as I know from trying to figure out this stuff it can be hard to track down how some things work. Any code I create will be given away, no licensing of any type, as I don’t care who or how it’s use. It’s just a learning process for me to understand more about how DVDs and then Divx/xviD works. I’m only just starting the IFO parsing section. Once I do that I think I’ll leave it there, as there are many good tools that are easy to integrated into VB that do the other parts of the jobs I need done. It will probable be about 2 weeks before I get my IFO parser ready for testing.
Nocturno
12th April 2003, 12:09
i've done some work on a vb ifoparser by going through mpucoders site,
i've got i working for the info i need.
audiotracks,subtitletracks,video info,little pcg info and that's about it.
but i'm not a programmer at all so my code is way to sloppy to be of any use to anyone.. i'm sure u real programmers can du much better.
some opensource ifoparse routines for vb would be very welcome for a lot of people like me, who understand a little vb and mainly make gui's of all sorts
DoC hEx
12th April 2003, 22:32
Okay, Here is the first version of the IFO DVD class. I hope people find it useful, though it might still needs some testing just to make sure it works with all regions and DVD movie.
See the link above for the file.
Movie Maniac®
14th April 2003, 10:09
Hi "Doc"
your project is really useful, but there are some little problems.
I cannot use it since it says "Insert DVD and try again". That's strange since the DVD is inserted :)
My configuration is this:
2 maxtor 80GB on the first IDE channel (both partitioned)
then, on the second ide channel i've got:
Pioneer DVD-105 as master (region 2)
Lite-on LTR-48125 as slave
all this is on an asus A7N8x Deluxe with an Athlon XP 2600+ (333 bus) with 1GB DDR333 RAM.
SO: windows 2000 professional sp3
VB6 sp5
Hope this will help you.
Bye
P.S. I've also Nero Image drive and phantomCD installed, and i use PowerDVDXP 4 to watch movies.
CloneAD
14th April 2003, 10:29
Yes I had that problem too, I had to make my DVD-ROM the first CDROM device before it would see it.
Though it's a lot easier to just go into the code and change the line:
'Open DVD Drive
objDVD.OpenFile
to:
'Open DVD Drive
objDVD.OpenFile ("E:\VIDEO_TS\VTS_01_0.IFO")
Obviously change the 'E' to your DVD-ROM drive letter and IFO file to whatever ya like.
DoC hEx
14th April 2003, 10:33
@CloneAD
Yeap, that's right.
@Movie Maniac
Currently all I do to find the DVD drive is go through all the CD/DVD-Rom drive as windows id's them the same way. What's happening is that the frist ROM drive is empty and your DVD with the disk is after this.
C: - Hard Drive
D: - Hard Drive
E: - CD-RW
F: - DVD
In the above example the E: would be selected for reading. Because the selection code is basic it's upto the programmer using the class to get the right drive.
If you goto frmStartup, cmdDVD_Click and change the line that reads:
curFileName = Dir(objDVD.FirstDVD_DriveLetter & ":\*.*")
objDVD.OpenFile '"E:\VIDEO_TS\VTS_03_0.IFO"If you first comment out the curFileName line, and then you remove the "'" comment and change "E:\VIDEO_TS\VTS_03_0.IFO" to what ever your DVD drive letter is, it should work, and remove the extendid path so it just e.g. "F:\", then the program will open this drive instead of the first ROM drive. I'm going to update the code to do a better DVD find. But I'm more worried that I'm parsing the IFO file correcly.
DoC hEx
DoC hEx
14th April 2003, 10:37
Originally posted by CloneAD
Yes I had that problem too, I had to make my DVD-ROM the first CDROM device before it would see it.
'Open DVD Drive
objDVD.OpenFile ("E:\VIDEO_TS\VTS_01_0.IFO")
Obviously change the 'E' to your DVD-ROM drive letter and IFO file to whatever ya like.
If you want you can only pass the drive letter "E:\" and then the objDVD will automaticly read all the VIDEO_TS\VST_0?_0.IFO available. The full path option is more for reading files off Hard drives then DVD, but of course it can be used this way.
Movie Maniac®
14th April 2003, 13:28
[QUOTE]objDVD.OpenFile "H:\VIDEO_TS\VTS_03_0.IFO"QUOTE]
that's what I'm using to make it work :D
Obviously I've got to change the IFO number depending on the DVD i want to read, but I think that's a problem that can be solved easily.
Well
concerning the DVD contents. it seems that they are all correclty displayed.
But is it normal that the chapters are displayed only with their duration and not with a progressive time? (hope I was clear enough)
I've tryed your app with all the DVD I own (10, they're not so much, but better than 1) and all works fine, except for the fact that I have to change ifo from time to time.
Example:
DVD: Silent Running
IFO: VIDEO_TS.IFO
VTS_01_0.IFO
VTS_02_0.IFO
VTS_03_0.IFO
VTS_04_0.IFO
VTS_05_0.IFO
The correct ifo file to see the chapters list is the VTS_04_0.IFO, but for this file no video/audio/subtitles informations are displayed. This informations are displayed only if i choose VTS_01_0.IFO files, but they are correct only concerning video, while for audio it displays 6 tracks and only english, while the DVD has only 2 tracks (english mono and italian 2.0), and for subtitles it displays a very long list made of ???.
Last but not least, for all ifo files from 01 to 05 exceot 04, the duration is incorrect, since a 0:00:00:00 is displayed, both for Program Chain 1 and Chapter1, wich are the only two items showed in the treeview.
I think that this is all, hoping not to have bored you!!!
Bye
DoC hEx
14th April 2003, 18:03
Thanks for the feed back I'll have a look into that.
CloneAD
14th April 2003, 19:08
Will this help:
Public Function FindDVDROM() As Boolean '(Returns Drive Letter in driveDVD$ - "E:\")
On Error Resume Next
FindDVDROM = False
Dim a As Variant, i As Integer, tst$
a = FindCDLetters
If Not IsNull(a) Then
For i = 0 To UBound(a)
If FileExists(UCase(CStr(a(i))) & ":\VIDEO_TS\VIDEO_TS.IFO") Then
driveDVD$ = UCase(CStr(a(i))) & ":\"
FindDVDROM = True
End If
Next
End If
End Function
I noticed some IFO's were not displaying Video/Audio/SubPic info from my scooby doo dvd, I found the problem, was releated to 2 bytes being read where, acording the IFOEdit, should be 1. I changed it and it worked, I'll get back shortly to let ya know what I'm on about, gotta grab some food, l8r.
Keep up the good work.
DoC hEx
15th April 2003, 00:56
@CloneAD
I look forward to hearing your fix.
CloneAD
15th April 2003, 03:03
First off I forgot a 'FileExists' function for above:
Public Function FileExists(strPath As String) As Boolean
On Error Resume Next
FileExists = IIf(Dir(strPath) <> "", True, False)
End Function
I was mumbling a bit on the last post..... I got cross-wired if ya know what I mean.
The 2 bytes instead of 1 byte I mentioned was refering to the offset used to get audio and subpicture counts.
Example:
tmpIFO.NumAudioStreams_VTS_VOBS = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset("202"), 2))
tmpIFO.NumSubPictureStreams_VTS_VOBS = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset("254"), 2))
From what I've read and seen in IFOEdit shouldn't they be:
tmpIFO.NumAudioStreams_VTS_VOBS = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset("203"), 1))
tmpIFO.NumSubPictureStreams_VTS_VOBS = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset("255"), 1))
The problem I was getting with my scooby doo IFO file was because I was using VTS_03_0.IFO from my hard drive, the 'IF/END IF' section would never get executed because it new I only had the 1 set of IFO information in 'mTotNumIn_mIFO_VTS_Array' but because I was on IFO number 3 would'nt work, cuz it would presume I had 1 and 2 in there as well.
So from the hard drive VTS_01_0.IFO will work but not 2, 3 or whatever as a single set.
Hope I explained that right.
Maybe it wasn't meant to work like that anyway so dont worry about it, works fine when info taken from DVD-ROM.
I've got nothing but admiration for ya to sit and convert 'c' code to VB, I've tried it a few times and it drives me mad, lol. Mind you, done loads of reading at mpucoder site recently and had a mess with IFOEdit so it all makes a bit more sense now.
l8r
DoC hEx
15th April 2003, 12:49
Okay, I’ve updated the code, same link above for the new version
Now only 1 byte is used to find the number of Audio and SubPics. I’m not to worry that both mpucoder/vstrip both use 2 bytes, but as the limit is 32 which is only a single byte.
I’ve also changed the code so that it will read files of Hard Drives correctly. The way I had coded the TreeView it would only if it was reading a DVD. Me bad! Hehe
Movie Maniac®
15th April 2003, 14:17
Hi
think I'm gonna fall inlove with that man!!! :D
Obviously this has to be intended in a figurative sense huh!
I'd really like to download your code and test it, but for next 15 days I will be far from my PC, and I've got a smaller one, without a DVD player, so I can't hel you 'till that moment.
Sorry
Anyhow I'll continue to follow this thread 'couse I'm too interested in your job.
Bye
CloneAD
16th April 2003, 10:39
I've took the 'DoC hEx' IFO parser proggy and done a sort of VB.NET version, the way VB.NET is I couldn't copy it as such so pretty much kept it the same just changed a lot of the syntax e.t.c.
Don't know whether any one would be interested cuz it's a .NET app, you need the FRAMEWORK in to run it. I'll post the EXE (ZIP) file here now, if anyone is interested in the VB.NET source to it just say and I'll upload that too.
mezzanine
4th May 2003, 09:05
Could you please upload the source code of that vb.net app ???
thanx
TaZ4hvn
30th June 2003, 00:44
@ DoC hEx:
I'm willing to write some very basic IFO parsing tool for my own app, I looked at yours: very interesting.
But it has a problem, with some IFO of mine it does fail to retrieve correct info about audio/subs 'cause they are wrong coded inside the IFO, dvd2svcd's r4r routine does fail the same way while only DVDDecrypter suceeds. I guess these info can be overriden somewhere else ... :confused:
If you want the faulty IFO just PM me.
EDIT: Oups sorry I made a mistake, don't mind :D
Abnormal1
15th January 2004, 20:43
@ DoC hEx:
Hi,
I have used your class a few times and found it very usefull. But i was wondering whether you ever improved it, in particular the limits on maximum PGCs and cells.
Thanks
Abnormal1
DoC hEx
16th January 2004, 19:32
Nope! :(
I've been meaning to get around to do this properly, but don't have the time and won't have any for a long while. So for the moment development has stop... but if somebody else wanted to try.
If I do make changes I'll post them up here ;)
Abnormal1
16th January 2004, 21:25
@ DoC hEx:
Oh well, thanks anyway.
I will have to try and remove the limits myself :scared:
Thanks
Abnormal
Dark-Cracker
16th January 2004, 22:04
does someone have this .html file ?
http://www.mpucoder.com/DVD/ifo.html
(now u need to be registered :( does someone can provide me a copy and paste of the page ? ).
Bye.
Abnormal1
16th January 2004, 22:58
@Dark-Cracker
I noticed that you need to be registered now to access that aswell but I then realised that IFOEdit gives you most of the information on that page, Its just not obvious at first.
anyway hope this helps
Abnormal
DoC hEx
17th January 2004, 01:07
Here's my old copy of it... DVDLayout.zip (http://indigo.ie/~wilsonj/dvdlayout.zip)
if I'm asked to remove it I will... so get it quick!
2COOL
19th January 2004, 06:22
Okay, I downloaded the zip file and started the tool but when clicking on it's just abruptly closes the app. I have Visual Basic 6.0 on my WinXP computer. Where can I find SP2?
I really want to check this program out. ;)
Abnormal1
19th January 2004, 14:32
@2COOL
You can download SP5 here on msdn if it does not have to be SP2
http://msdn.microsoft.com/vstudio/downloads/updates/sp/vs6/sp5/default.aspx
but i dont think you should need SP2 to run it as I was originally using it on VB5 and apart from changing the Const's at the begginning of the Class it worked fine.
Abnormal
2COOL
19th January 2004, 22:17
Okay I have installed SP5 and it still does the same thing with crashing. Anyway, I've ran the source code through VB6 and this is the problem line I get when debugging.
Private Function priv_ParseIFO_VST(ByVal ipFileName As String) As IFO_VST_Parse
Dim tmpIFOFileIn As String
Dim tmpIFO As IFO_VST_Parse
Dim tmp_i As Long
Dim tmp_o As Long
'Read in the Info file name
Open ipFileName For Binary Access Read As #1
tmpIFOFileIn = Input(FileLen(ipFileName), #1)
tmp_i = FileLen(ipFileName)
Close #1
'Used to Check that the file read correctly
'Open "c:\tmp.ifo" For Binary As #1
' Put #1, , tmpIFOFileIn
'Close #1
'Save the Ifo File name
tmpIFO.IFO_FileName = ipFileName
'See MPUcoder (http://www.mpucoder.com/DVD/ifo.html)
'Parse the File in tmpIFOFileIn
tmpIFO.FileType_Header = Mid(tmpIFOFileIn, priv_HexOffset("0"), 12)
tmpIFO.LastSectorOfTitle = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset("C"), 4))
tmpIFO.LastSectorOfIFO = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset("1C"), 4))
tmpIFO.VersionNumber = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset("20"), 2))
tmpIFO.VSTCategory = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset("22"), 4))
tmpIFO.EndByteAddress_VTS_MAT = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset("80"), 4))
tmpIFO.StartSector_MenuVOB = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset("C0"), 4))
tmpIFO.StartSector_TitleVOB = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset("C4"), 4))
tmpIFO.SectorPointer_VTS_PTT_SRPT = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset("C8"), 4))
tmpIFO.SectorPointer_VTS_PGCI = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset("CC"), 4))
tmpIFO.SectorPointer_VTSM_PGCI_UT = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset("D0"), 4))
tmpIFO.SectorPointer_VTS_TMAPTI = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset("D4"), 4))
tmpIFO.SectorPointer_VSTM_C_ADT = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset("D8"), 4))
tmpIFO.SectorPointer_VSTM_VOBU_ADMAP = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset("DC"), 4))
tmpIFO.SectorPointer_VST_C_ADT = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset("E0"), 4))
tmpIFO.SectorPointer_VTS_VOBU_ADMAP = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset("E4"), 4))
'VTSM
'Get Video of Main information
tmpIFO.VideoAtt_VSTM_VOBS = priv_VideoAtt_VTS_VOBS(Mid(tmpIFOFileIn, priv_HexOffset("100"), 2))
tmpIFO.NumOfAudioStreamsIn_VTSM_VOBS = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset("102"), 2))
'Read in all Audio Track Information
For tmp_i = 0 To tmpIFO.NumOfAudioStreamsIn_VTSM_VOBS - 1
tmpIFO.AudioAtt_VTSM_VOBS(tmp_i) = priv_AudioAtt_VTSM_VTS(Mid(tmpIFOFileIn, priv_HexOffset("104") + (tmp_i * 8), 8))
Next tmp_i
'Get SubPicture Main info
tmpIFO.NumSubPictureStreams_VTSM_VOBS = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset("154"), 2))
tmpIFO.SubPictureAtt_VTSM_VOBS = priv_SubPictureAtt_VTSM_VTS(Mid(tmpIFOFileIn, priv_HexOffset("156"), 6))
'VTS
'Get Video Information
tmpIFO.VideoAtt_VTS_VOBS = priv_VideoAtt_VTS_VOBS(Mid(tmpIFOFileIn, priv_HexOffset("200"), 2))
'tmpIFO.NumAudioStreams_VTS_VOBS = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset("202"), 2))
tmpIFO.NumAudioStreams_VTS_VOBS = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset("203"), 1))
For tmp_i = 0 To tmpIFO.NumAudioStreams_VTS_VOBS - 1
tmpIFO.AudioAtt_VTS_VOBS(tmp_i) = priv_AudioAtt_VTSM_VTS(Mid(tmpIFOFileIn, priv_HexOffset("204") + (tmp_i * 8), 8))
Next tmp_i
'Get SubPicture info
'tmpIFO.NumSubPictureStreams_VTS_VOBS = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset("254"), 2))
tmpIFO.NumSubPictureStreams_VTS_VOBS = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset("255"), 1))
For tmp_i = 0 To tmpIFO.NumSubPictureStreams_VTS_VOBS - 1
tmpIFO.SubPictureAtt_VTS_VOBS(tmp_i) = priv_SubPictureAtt_VTSM_VTS(Mid(tmpIFOFileIn, priv_HexOffset("256") + (tmp_i * 6), 6))
Next tmp_i
'MsgBox tmpIFO.SectorPointer_VTS_PGCI & " Address = " & tmpIFO.SectorPointer_VTS_PGCI * ifo_SECTOR_SIZE
'MsgBox (tmpIFO.SectorPointer_VTS_PGCI * ifo_SECTOR_SIZE) + priv_StrBYTEtoHex(Mid(tmpIFOFileIn, tmpIFO.SectorPointer_VTS_PGCI * ifo_SECTOR_SIZE + 1 + 12, 4))
'Get Program Chain Information
'Note Hard Code Hack!
'tmpIFO.NumberOfProgramChains = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, priv_HexOffset(ifo_NumberProgramChainsInIFO), 2))
tmpIFO.NumberOfProgramChains = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, tmpIFO.SectorPointer_VTS_PGCI * ifo_SECTOR_SIZE + 1, 2))
For tmp_i = 0 To tmpIFO.NumberOfProgramChains - 1
tmpIFO.ProgramChainInformation(tmp_i) = priv_ProgramChainInformation(tmp_i, tmpIFOFileIn, tmpIFO)
For tmp_o = 0 To tmpIFO.ProgramChainInformation(tmp_i).NumberOfPrograms
tmpIFO.ProgramChainInformation(tmp_i).PChainInformation(tmp_o) = priv_PChainInformation(tmp_i, tmp_o, tmpIFOFileIn, tmpIFO)
Next tmp_o
Next tmp_i
'MsgBox "Num Chains " & tmpIFO.NumberOfProgramChains
'" Time: " & tmpIFO.ProgramChainInformation(0).PChainInformation(0).CellPlayBackTime.hours & ":" & _
tmpIFO.ProgramChainInformation(0).PChainInformation(0).CellPlayBackTime.minutes & ":" & _
tmpIFO.ProgramChainInformation(0).PChainInformation(0).CellPlayBackTime.seconds
'MsgBox tmpIFO.ProgramChainInformation(1).PlayBackTime.hours & ":" & tmpIFO.ProgramChainInformation(1).PlayBackTime.minutes & ":" & tmpIFO.ProgramChainInformation(1).PlayBackTime.seconds
'MsgBox tmpIFO.AudioAtt_VTS_VOBS(0).LanguageCode & " " & tmpIFO.SubPictureAtt_VTS_VOBS(0).LanguageCode
'MsgBox tmp_i & " 200 => " & priv_HexOffset("200")
'Setup the Return Value
priv_ParseIFO_VST = tmpIFO
'Manually Release Memory
tmpIFOFileIn = ""
End FunctionAt this time of crash, my tmp_1 = 25. My tmpIFO.NumberOfProgramChains = 45. I haven't fully anaylze the whole source code but this line definitely is my problem. I had my American Pie 1 (R1) DVD in my drive during this time.
Dark-Cracker
19th January 2004, 23:46
attach the .ifo file strange u have 45 PGC perhaps the array have a limitation.
attach or host the .ifo file i will try to debug this for u :)
++
Abnormal1
20th January 2004, 09:55
@ 2COOL
I can not be sure as i am at work but I belive that you have just discovered the Maximum limits problem i was talking about.
This is set at the begining of the Class and if you set it higher VB then complains about to many varibles or something.
Have you tried a different DVD?
Abnormal1
Dark-Cracker
20th January 2004, 15:12
hi yes there is a const var used at the top of the class :
Const MAX_ProgramChainInformation = 24
but the max number of PGC is 32767
so : delete this line, and change in the "IFO_VST_Parse" struct :
this:
ProgramChainInformation(MAX_ProgramChainInformation) As Program_Chain_Type
By
ProgramChainInformation() As Program_Chain_Type
and in the line where u have a problem (the red line in the previous post ) in the "priv_ParseIFO_VST" function, add this blue line :
'Get Program Chain Information
tmpIFO.NumberOfProgramChains = priv_StrBYTEtoHex(Mid(tmpIFOFileIn, tmpIFO.SectorPointer_VTS_PGCI * ifo_SECTOR_SIZE + 1, 2))
'dynamic redim of the array for PGC info
ReDim tmpIFO.ProgramChainInformation(tmpIFO.NumberOfProgramChains)
For tmp_i = 0 To tmpIFO.NumberOfProgramChains - 1
..............
normaly this solve the problem :)
Bye.
2COOL
20th January 2004, 15:40
@Dark-Cracker
Many thanks my friend! :D That solved my problem. Great troubleshooting.
@Abnormal1
There's your fix! :D
Abnormal1
20th January 2004, 20:29
Hi,
I dont wish to seem negative but I am pretty sure this is what I originally did and it seemed to work until I used a DVD with a very high amount of PGCs and the class would not redim the array with such a high number.
I might be wrong and am trying to find the DVD that caused the problem just to be sure.
Abnormal1
Abnormal1
20th January 2004, 20:58
Hi,
This is really bugging me as I can not find the problematic DVD but I just wanted to tell you what else should be changed If this is the solution.
Remove this line at the beginning of the class(I commented it out)
'Max amount of Cells read from a program chain
'Const MAX_CellReadFromAProgramChain = 48
then change this in Program_Chain_Type Type
'Up to 64 Chapters
'PChainInformation(MAX_CellReadFromAProgramChain) As PGC_Cell_Info_Type
to
'Up to 64 Chapters
PChainInformation() As PGC_Cell_Info_Type
then in priv_ParseIFO_VST before this code
For tmp_o = 0 To tmpIFO.ProgramChainInformation(tmp_i).NumberOfPrograms
tmpIFO.ProgramChainInformation(tmp_i).PChainInformation(tmp_o) = priv_PChainInformation(tmp_i, tmp_o, tmpIFOFileIn, tmpIFO)
Next tmp_o
add
ReDim tmpIFO.ProgramChainInformation(tmp_i).PChainInformation(tmpIFO.ProgramChainInformation(tmp_i).NumberOfPrograms)
once you have done this it should remove the limit on chapters as well
Abnormal1
Dark-Cracker
20th January 2004, 21:38
hi,
cell are different of the number of chapters so this modification is not needed.
PS : if u prefer u can change 48 by 99 it seems to me it's the max number of cells.
++
Abnormal1
20th January 2004, 22:00
@Dark-Cracker
OK now i am confused.
I have just realised that what it reads as Cell count is actually number of programs which appears to be the same number as chapters. I think this is why I thought it was chapter count.
Now my question is what is the maximum programs and also what are they.
Abnormal
2COOL
20th January 2004, 23:01
Originally posted by Abnormal1
Now my question is what is the maximum programs and also what are they.maybe this thread (http://forum.doom9.org/showthread.php?s=&threadid=61254&highlight=maximum+titles) can shed some light.
Abnormal1
21st January 2004, 11:32
@2Cool
Thanks for that(Sorry, I should have searched).
Anyway I had a quick glance and Dark-Cracker was right so I will just set the maximum to 99 instead of that extra code.
Abnormal1
nkarnold
17th November 2005, 17:51
Is there an updated version of the code anywhere, with the fixes and other problems found rolled into it ?
Ta
Inc
18th November 2005, 17:24
http://forum.doom9.org/showthread.php?p=719738#post719738
Although it's written in Purebasic, you will see very easy the logic how to access the ifo file and so a port to delphi wouldn't be a problem imho.
iNFO-DVD
18th November 2005, 18:40
Just remember that these examples tell you the information for that video set, usually video sets contain multiple PGC's which can share an amount of the total so you MUST delve further to get the exact information for the PGC.
feliz
7th December 2005, 04:24
just some minor corrections
Rockas
25th January 2006, 22:39
Why there was no approval on this last attachment?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.