View Full Version : Extracting video length from an ifo (cli)?
Matthew
6th September 2005, 06:57
I want to get the number of frames of video in a PGC/title, or the length expressed as a timecode (frame accurate), from an ifo. But at the commandline.
Chapter-X-tractor provides a figure but it is incorrect. IFOUpdate is fine for getting chapter data but does not provide the length.
Is there an app that provides the correct value?
Thanks :)
r0lZ
7th September 2005, 00:42
You may use PgcEdit to read the PGC Playback time, but it's not a CLI tool.
Also, it uses the infos in the IFOs to display the timings. If there is a difference between the total of the cell times and the PGC time, it offers to fix the PGC time. But it doesn't verify if the cell times are correct (because that requires a full parsing of the VOBs.)
jeanl
7th September 2005, 01:12
Matthew,
If you're willing to program such an app, I can provide you a C++ class that you can use to read the IFO, go to the desired PGC and read the playback time. As r0lZ mentioned, it will only be accurate if the DVD was correctly authored, but it will be very easy to code. You could refine it by reading each cell playback time (also from the IFO) and add that up to get the PGC playback time (in case there was an error). My class would also make that easy. Still, the result might be off if the cell playback times are incorrectly reported in the IFOs. Parsing them from the VOB is more complicated, and my class would not allow you to do that...
Jeanl
Matthew
7th September 2005, 02:10
Thanks for the replies.
@jeanl, thanks for the offer but that's beyond my abilities, I ain't no programmer.
Setting aside the cli issue for a moment, if the IFOs can be incorrect, what implication does this have for getting chapter points correct? Does the player just take the values in the IFO and skip to the next i-frame?
jeanl
7th September 2005, 03:04
No, the player does not rely on the playback time to go to a specific chapter. That info is coded in the IFO, in the list of cells in the PGC (use PGCEdit to see that). As far as I know, playback time is only used to calculate the remaining time etc...
Normally, the IFOs are correct though, it's pretty rare that the playback time is not corect (usually after some editing using unpolished tools)...
jeanl
Matthew
7th September 2005, 04:45
Sorry, I meant, what if the chapter points in the IFO do not have corresponding i-frames in the video?
jeanl
7th September 2005, 05:50
I"m not sure what you mean by that... A chapter point has to correspond to the start of a VOBID, and the first group of pictures of that VOBID will have an I-frame. So yes, it's possible that the chapter point does not correspond exactly to an I-frame, but there's going to be one nearby for sure, but why do you care anyway? You haven't told us what you're trying to do...
Jeanl
Matthew
7th September 2005, 06:34
I presume you mean cellid.
What I'm trying to do is get the frame-accurate length of a PGC at the command-line. The rest is a tangent, human beings are by their nature curious ;)
Although the issue of inaccurate IFOs is relevant as it could mean one has to rely on the VOBs to get the correct framecount.
I'll probably just have to put up with doing this manually.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.