View Full Version : better support for chapters in zones?
bond
13th July 2004, 18:38
i recently did an encode and wanted to make sure that the chapterpoints are keyframes. as chaptergrabbers "xvid chapter import" function didnt work i had to input every chapterframe itself :/
i thought about two things making this easier:
1) number the used zones, so its easier to check that everything is there as it should be :D
2) it would be a nice option if xvid would offer to input for example an .ifo and set the chapterpoints automatically to keyframes in zones :)
thanks :)
Emp3r0r
14th July 2004, 21:13
bond: i've been putting alot of time looking into this lately... in fact I just spent about 2+ hours watching Terminator 2 and manually finding the correct frame numbers and times to set for the chapter points.
The reason I did that was I wanted a list of frames and times that I knew were correct. I'd say 90% of those are correct to the exact frame as intended by the dvd author. The rest I did my best to guess.
The next step is pair up those times with the times extracted from the IFO file. So far I haven't found a correct way to do this. vStrip doesn't do it and IfoEdit doesn't do it. The times are never frame accurate.
On an interesting side note, 99% of the time, the frame I found matched a scene change and thus XviD already put a keyframe there.
So the solution isn't using zones, but obtaining the correct chapter times.
When I get home, I'll post the times I manually came up with and the times that vStrip gave me and maybe we can draw some conclusions.
Emp3r0r
15th July 2004, 02:38
Here are the times I found manually. The numbers in the comment are the frame number. The film length is 2:16:34.69 with a total of 196476 frames at 23.976 fps.
T2 Manual Chapter Times (http://jvance.com/files/T2manual.xml)
Here are the times extracted from the IFO using vStrip
T2 Chapter Times extracted using vStrip (http://jvance.com/files/T2vstrip.xml)
Emp3r0r
15th July 2004, 02:54
In the beginning a few of the chapter times match up but as time goes on they get way out of wack. Maybe vStrip is extracting the times of the wrong program stream or maybe dvd decryptor is extracting the IFO wrong.
If we could figure out how to get the correct chapter times it would be nice to see that support in xvid.
OCedHrt
15th July 2004, 08:02
You can use Fairuse to get the chapter times as it indexes the entire dvd with frame by frame precision and lets you specify sessions with individual chapters. Find it at fairuse.free.fr. But, it costs like 3 euros or something for 30 days of updates.
SeeMoreDigital
15th July 2004, 13:31
I currently find the chapter times manually. By starting the movie, hitting the pause and then pressing the chapter up key and then writing down the time displayed :(
I then turn this into a bookmark file. Here's one I made for BladeRunner: -
<bookmarks>
<bookmark time="00:00:00" name="01 Credits And Foreword"/>
<bookmark time="00:03:06" name="02 Eye On The Sky"/>
<bookmark time="00:04:33" name="03 Leons Emotional Response"/>
<bookmark time="00:07:19" name="04 Street Scene"/>
<bookmark time="00:11:03" name="05 The Old Blade Runner Magic"/>
<bookmark time="00:13:03" name="06 The Replicants In Question"/>
<bookmark time="00:16:11" name="07 Rachael: The Voigt-Kampff Test"/>
<bookmark time="00:22:20" name="08 Leon's Apartment"/>
<bookmark time="00:24:41" name="09 Chew's Visitors"/>
<bookmark time="00:27:27" name="10 If Only I could See..."/>
<bookmark time="00:29:44" name="11 A Visitor with Someone Else's Memories"/>
<bookmark time="00:35:27" name="12 Pris Meets Sebastian"/>
<bookmark time="00:40:25" name="13 Deckards Dream"/>
<bookmark time="00:41:20" name="14 Computer Photo Scan"/>
<bookmark time="00:44:43" name="15 Manufactured Skin"/>
<bookmark time="00:47:09" name="16 Miss Salome's Dressing Room"/>
<bookmark time="00:53:03" name="17 Pursuing Zhora"/>
<bookmark time="00:55:08" name="18 Retirement... Witnessed"/>
<bookmark time="00:57:20" name="19 How Many To Go"/>
<bookmark time="00:59:19" name="20 Wake Up. Time To Die"/>
<bookmark time="01:00:41" name="21 I Am The Business. I Owe You One"/>
<bookmark time="01:04:59" name="22 The Real Thing?"/>
<bookmark time="01:09:42" name="23 There's Only Two Of Us Now"/>
<bookmark time="01:13:08" name="24 We Need You Sebastian"/>
<bookmark time="01:16:57" name="25 The Right Moves"/>
<bookmark time="01:19:13" name="26 The Prodigal Son Returns"/>
<bookmark time="01:23:41" name="27 No Way to Treat a Friend"/>
<bookmark time="01:25:09" name="28 Death Among the Menagerie"/>
<bookmark time="01:30:02" name="29 Proud of Yourself Little Man"/>
<bookmark time="01:32:47" name="30 Wounded Animals"/>
<bookmark time="01:36:53" name="31 The Building Ledge"/>
<bookmark time="01:38:15" name="32 The Roof"/>
<bookmark time="01:40:04" name="33 To Live in Fear"/>
<bookmark time="01:41:24" name="34 Like Tears in Rain"/>
<bookmark time="01:44:33" name="35 Souvenir of Dreams"/>
<bookmark time="01:47:41" name="36 End Credits"/>
</bookmarks> It's a right ball ache to do and a few of the times had to be amended to suit the encodes key frames.
Recode2 seems to do a very good job of detecting and replaying the chapter points. It's just a shame it does not store the information as a file you can extract from the MP4 container!
Cheers
zulu
15th July 2004, 15:52
2) it would be a nice option if xvid would offer to input for example an .ifo and set the chapterpoints automatically to keyframes in zones :)
i have an xvid patch ready here on my hd (keyframe import from ifo or chapterXtractor files). pm me if you're interested :)
Emp3r0r
15th July 2004, 16:41
Originally posted by SeeMoreDigital
I currently find the chapter times manually. By starting the movie, hitting the pause and then pressing the chapter up key and then writing down the time displayed :( Which dvd software do you use? I've tried this with MPC but it doesn't allow you to pause and jump chapters. Also, your bookmark file isn't frame accurate which is what I'm trying to obtain.
SeeMoreDigital
15th July 2004, 17:34
Originally posted by Emp3r0r
Which dvd software do you use? I've tried this with MPC but it doesn't allow you to pause and jump chapters. Also, your bookmark file isn't frame accurate which is what I'm trying to obtain. I play/pause the DVD using JovePlayer which is the front end application I use with my Xcard.
Like I say it's not a perfect solution but most of the chapter breaks are in the same place as the DVD.
Also, some time ago I used Recode2 to generate an encode of Red Planet. Here are the chapter points as displayed in MPC: -
http://img10.exs.cx/img10/2783/SMD_Recode2_Chapters_in_MPC.gif
Cheers
OCedHrt
16th July 2004, 00:06
I just checked and confirmed that fairuse is under the GPL so if you guys are interested in giving it a try, send me a PM and I'll email it or something :) It's a very nice program.
bond
16th July 2004, 16:02
doesnt dvd decrypter output a .txt file which contains the exact framenumbers (not times), which show the chapter points?
Originally posted by zulu
i have an xvid patch ready here on my hd (keyframe import from ifo or chapterXtractor files). pm me if you're interestedyes plz, would be nice for testing :)
but it would be even nicer if you could make this patch publically available, so that all can use it (and maybe gets added to the official sources) :)
bond
18th July 2004, 17:21
stupid me just realised that the chapterpoints are not necessarily at the scenechanges in a dvd, therefore there will not be a way around to manually note down the times and framenumbers :(
SeeMoreDigital
18th July 2004, 18:01
Originally posted by bond
stupid me just realised that the chapterpoints are not necessarily at the scenechanges in a dvd, therefore there will not be a way around to manually note down the times and framenumbers :( Looks like we need someone to develop a little chapter, time and frame number grabbing application. I wonder if it might be possible to have a still frame image capture of the chapter break :D
I have to say I quite like the way Recode2 chapters are displayed in MPC ie: detailing the time and chapter number!
Cheers
OCedHrt
19th July 2004, 00:57
Looks like I'm being ignored here :P
http://img15.exs.cx/img15/5669/fairuse.jpg
That's what FairUse is capable of.
SeeMoreDigital
19th July 2004, 08:44
Hi OCedHrt,
No we are not ignoring you!
I've been meaning to give FairUse, so I thought I'd do just that and took a trip to the the web site.......
....Errrrrm!
Where is the download link for the application its self?
Is FairUse freeware?
Cheers
WaryWolf
19th July 2004, 09:22
you can get it at http://fairuse.free.fr/ .
but personally, i don't use programs like fairuse. i like the amount of control that i get over the whole process when i use smartripper/dgmpgdec/besweet/vdubmod. plus, when i find a new way to improve end result quality i feel great, since i did it myself :)
SeeMoreDigital
19th July 2004, 09:36
Originally posted by WaryWolf
you can get it at http://fairuse.free.fr/ .
but personally, i don't use programs like fairuse. i like the amount of control that i get over the whole process when i use smartripper/dgmpgdec/besweet/vdubmod. plus, when i find a new way to improve end result quality i feel great, since i did it myself :) Thanks WaryWolf,
I found the link OK but it's the site itself that's confusing!
All I could find is a survey, a PayPal (10 Euro plus) donation link and another link for an AlloPass!!!
Where's the actual FairUse application... this is not a good start?
Cheers
Wilbert
19th July 2004, 09:40
A link to the latest binaries (0.44) is given in the following post
http://forum.doom9.org/showthread.php?s=&postid=511801#post511801
If you have problems getting it send me a pm.
OCedHrt
19th July 2004, 18:24
Well, that thread with the links to the binaries makes it easier :D
Another thing I "discovered" is that you can just load the session and then check the log file in c:\fairuse.log. The log will contain all the chapters w/ the appropriate frames, but not the actual time. And for movies that require IVTC..well, you're gonna have to calculate the frames yourslf there :P I'm guessing original frame # * 0.8, rounding down probably, will do.
Emp3r0r
21st July 2004, 21:34
Another thing I "discovered" is that you can just load the session and then check the log file in c:\fairuse.log. The log will contain all the chapters w/ the appropriate frames, but not the actual timeCan you post those frame numbers from your log for Pirates of the Caribbean? Also, is that the R1 NTSC release of the movie?
OCedHrt
22nd July 2004, 10:38
Yes, Region 1 NTSC widescreen. Since it is telecined, the frame numbers reported by Fairuse are at 29.97fps.
02:28:25 2060 ch. 1 start 0, end 15950, length 15951
02:28:25 2060 ch. 2 start 15951, end 28969, length 13019
02:28:25 2060 ch. 3 start 28970, end 49070, length 20101
02:28:25 2060 ch. 4 start 49071, end 64772, length 15702
02:28:25 2060 ch. 5 start 64773, end 73874, length 9102
02:28:25 2060 ch. 6 start 73875, end 86940, length 13066
02:28:25 2060 ch. 7 start 86941, end 97200, length 10260
02:28:25 2060 ch. 8 start 97201, end 115299, length 18099
02:28:25 2060 ch. 9 start 115300, end 136644, length 21345
02:28:25 2060 ch. 10 start 136645, end 146340, length 9696
02:28:25 2060 ch. 11 start 146341, end 170864, length 24524
02:28:25 2060 ch. 12 start 170865, end 179889, length 9025
02:28:25 2060 ch. 13 start 179890, end 194713, length 14824
02:28:25 2060 ch. 14 start 194714, end 219471, length 24758
02:28:25 2060 ch. 15 start 219472, end 239475, length 20004
02:28:25 2060 ch. 16 start 239476, end 257470, length 17995
02:28:25 2060 ch. 17 start 257471, end 257485, length 15
So times 0.8 and do some rounding down is my guess. Rouding down seems to be more accurate than rounding up. For example: 15951 * 0.8 = 12760.8. 12760 * 1.25 = 15950. Which makes sense, cuz after inserting a frame from the telecine process, you'd get 15951. The one that doesn't make sense to me is 64773 * 0.8 = 51818.4. 51818 * 1.25 = 64772.5. Half a frame? makes no sense. It would either have to be 51820 or 51816. 51816 * 1.25 = 64770, and add one, so still off by 2 frames. Either way your're off by 2 or 3. Weird one, well thats as far as I went. But +- a few frames shouldn't matter too much.
Emp3r0r
23rd July 2004, 16:45
Either way your're off by 2 or 3. Weird one, well thats as far as I went. But +- a few frames shouldn't matter too much.Everytime you are off by a few frames and you force a keyframe that isn't on the exact start of the chapter you adding an additional keyframe. When you have 10 or so chapters I guess It doesn't matter too much but when you have 70+ chapters like in Terminator 2 that is going to eat up some bits.
A better solution would be to analyze the first pass and find the nearest keyframe (with threshold) to where the chapter should start and update the chapter time to reflect that keyframe. If it is beyond the threshold then force a keyframe there.
bond
23rd July 2004, 17:04
Originally posted by Emp3r0r
A better solution would be to analyze the first pass and find the nearest keyframe (with threshold) to where the chapter should start and update the chapter time to reflect that keyframe. If it is beyond the threshold then force a keyframe there.nice idea :)
is there a tool existing for displaying the keyframe points for .pass files?
OCedHrt
23rd July 2004, 17:45
I believe the statreader that comes with xvid does that? Not 100% sure. Also, it seems like most chapters don't start on a keyframe/scene change anyways.
Actually, looking back at that frame count. 64773 * .8 = 51818.
Well, since telecine adds 1 per 4, so rounding down to 51816 since 4|51816. 51816 * 1.25 = 64770. So +3 frames after telecine. Thus, the actual chapter start frame is 51819.
Emp3r0r
26th July 2004, 22:19
Also, it seems like most chapters don't start on a keyframe/scene change anyways.I was beginning to fear this same thing but just to check I took a look at Underworld R1 DVD. I ripped it using DVD decrypter in IFO mode and split by chapters. Then I checked the number of frames for each chapter by indexing with DGIndex (w/ Force Film) and opening with Mpeg2Source via AviSynth.
The frame numbers match the time codes reported from vStrip.dll exactly if you consider it at 24fps. Next I checked the timecodes against IfoEdit and they matched exactly when using 30fps. I think it is odd that the video plays back at 23.976fps but you must derive the frame numbers as if it plays at it's original 24fps.
Now if you look at the beginning of each chapter, 22 of the 28 chapters start on a scenechange! The other 6 chapters where on average 5 frames after a scenechange.
With this in mind, it would be nice to parse the 1st pass log file from xvid create a modified chapters index corresponding to the nearest keyframes for each chapter. You would only need to use a zone in the rare instance that a keyframe is nowhere near where the chapter should start.
bond
27th July 2004, 19:40
hm with pal (25fps) its easier :D
still on some dvds i checked (especially older ones) the scenechanges/chapterpoints were often not matching
on some newer dvds they were...
seems there is no way around manually checking it every time, if you want to makes sure thats its 100% correct :(
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.