PDA

View Full Version : Set Zones from an IFO or Chapter File using ChapterGrabber 2.1


Emp3r0r
6th December 2003, 09:52
Warning: If you hate .NET programs then please ignore this thread!

I created a new version of ChapterGrabber that can save a registry file with chapter zone information. Merging this file into the registry will set a keyframe at the beginning of each chapter. ChapterGrabber created the following registry file from the R1 Xmen2 IFO file.

REGEDIT4

[HKEY_USERS\S-1-5-21-3116025415-695449080-3153104705-1007\Software\GNU\XviD]
"zone0_frame"=dword:0
"zone0_type"=dword:1
"zone0_mode"=dword:0
"zone0_weight"=dword:64
"zone1_frame"=dword:a41
"zone1_type"=dword:1
"zone1_mode"=dword:0
"zone1_weight"=dword:64
"zone2_frame"=dword:1e10
"zone2_type"=dword:1
"zone2_mode"=dword:0
"zone2_weight"=dword:64
"zone3_frame"=dword:2864
"zone3_type"=dword:1
"zone3_mode"=dword:0
"zone3_weight"=dword:64
"zone4_frame"=dword:45e1
"zone4_type"=dword:1
"zone4_mode"=dword:0
"zone4_weight"=dword:64
"zone5_frame"=dword:5768
"zone5_type"=dword:1
"zone5_mode"=dword:0
"zone5_weight"=dword:64
"zone6_frame"=dword:64d0
"zone6_type"=dword:1
"zone6_mode"=dword:0
"zone6_weight"=dword:64
"zone7_frame"=dword:6d15
"zone7_type"=dword:1
"zone7_mode"=dword:0
"zone7_weight"=dword:64
"zone8_frame"=dword:8000
"zone8_type"=dword:1
"zone8_mode"=dword:0
"zone8_weight"=dword:64
"zone9_frame"=dword:92ec
"zone9_type"=dword:1
"zone9_mode"=dword:0
"zone9_weight"=dword:64
"zone10_frame"=dword:a45d
"zone10_type"=dword:1
"zone10_mode"=dword:0
"zone10_weight"=dword:64
"zone11_frame"=dword:af14
"zone11_type"=dword:1
"zone11_mode"=dword:0
"zone11_weight"=dword:64
"zone12_frame"=dword:bd40
"zone12_type"=dword:1
"zone12_mode"=dword:0
"zone12_weight"=dword:64
"zone13_frame"=dword:c57c
"zone13_type"=dword:1
"zone13_mode"=dword:0
"zone13_weight"=dword:64
"zone14_frame"=dword:dfc4
"zone14_type"=dword:1
"zone14_mode"=dword:0
"zone14_weight"=dword:64
"zone15_frame"=dword:10020
"zone15_type"=dword:1
"zone15_mode"=dword:0
"zone15_weight"=dword:64
"zone16_frame"=dword:109bc
"zone16_type"=dword:1
"zone16_mode"=dword:0
"zone16_weight"=dword:64
"zone17_frame"=dword:11b24
"zone17_type"=dword:1
"zone17_mode"=dword:0
"zone17_weight"=dword:64
"zone18_frame"=dword:12b6c
"zone18_type"=dword:1
"zone18_mode"=dword:0
"zone18_weight"=dword:64
"zone19_frame"=dword:138c4
"zone19_type"=dword:1
"zone19_mode"=dword:0
"zone19_weight"=dword:64
"zone20_frame"=dword:1419c
"zone20_type"=dword:1
"zone20_mode"=dword:0
"zone20_weight"=dword:64
"zone21_frame"=dword:14d80
"zone21_type"=dword:1
"zone21_mode"=dword:0
"zone21_weight"=dword:64
"zone22_frame"=dword:16cc8
"zone22_type"=dword:1
"zone22_mode"=dword:0
"zone22_weight"=dword:64
"zone23_frame"=dword:185dd
"zone23_type"=dword:1
"zone23_mode"=dword:0
"zone23_weight"=dword:64
"zone24_frame"=dword:1a451
"zone24_type"=dword:1
"zone24_mode"=dword:0
"zone24_weight"=dword:64
"zone25_frame"=dword:1b7f5
"zone25_type"=dword:1
"zone25_mode"=dword:0
"zone25_weight"=dword:64
"zone26_frame"=dword:1dcdd
"zone26_type"=dword:1
"zone26_mode"=dword:0
"zone26_weight"=dword:64
"zone27_frame"=dword:1ea55
"zone27_type"=dword:1
"zone27_mode"=dword:0
"zone27_weight"=dword:64
"zone28_frame"=dword:1fcb1
"zone28_type"=dword:1
"zone28_mode"=dword:0
"zone28_weight"=dword:64
"zone29_frame"=dword:20811
"zone29_type"=dword:1
"zone29_mode"=dword:0
"zone29_weight"=dword:64
"zone30_frame"=dword:21f81
"zone30_type"=dword:1
"zone30_mode"=dword:0
"zone30_weight"=dword:64
"zone31_frame"=dword:238f9
"zone31_type"=dword:1
"zone31_mode"=dword:0
"zone31_weight"=dword:64
"zone32_frame"=dword:245a1
"zone32_type"=dword:1
"zone32_mode"=dword:0
"zone32_weight"=dword:64
"zone33_frame"=dword:25721
"zone33_type"=dword:1
"zone33_mode"=dword:0
"zone33_weight"=dword:64
"zone34_frame"=dword:2626d
"zone34_type"=dword:1
"zone34_mode"=dword:0
"zone34_weight"=dword:64
"zone35_frame"=dword:27ed5
"zone35_type"=dword:1
"zone35_mode"=dword:0
"zone35_weight"=dword:64
"zone36_frame"=dword:298c3
"zone36_type"=dword:1
"zone36_mode"=dword:0
"zone36_weight"=dword:64
"zone37_frame"=dword:2aed7
"zone37_type"=dword:1
"zone37_mode"=dword:0
"zone37_weight"=dword:64
"zone38_frame"=dword:2bc4f
"zone38_type"=dword:1
"zone38_mode"=dword:0
"zone38_weight"=dword:64
"zone39_frame"=dword:2bf5f
"zone39_type"=dword:1
"zone39_mode"=dword:0
"zone39_weight"=dword:64
"num_zones"=dword:28

Requires .NET Runtime
Download ChapterGrabber v2.2.1 (http://jvance.com/files/ChapterGrabber.2004-01-30.zip)

[updates]
New version 2004-01-30

Koepi
6th December 2003, 09:56
Did you verify that this works properly? I (and some reports of users having the same phenomenon) always get i-frame only when using the keyframe flag.

Nice work btw.! (Why has xmen2 80 chapters?)

Regards
Koepi

Emp3r0r
6th December 2003, 10:01
Originally posted by Koepi
always get i-frame only when using the keyframe flagI didn't know that was a bug. I thought you had to explicitly end any zone that you start thus every chapter had 2 zones.

Edit: oh an yea, I haven't done any serious testing with this

Koepi
6th December 2003, 10:23
Ah damn, I didn't read that correctly - nice workaround :) But let's hope the bug gets solved soon (I'll look into vfw and try to find if anything's fishy in there) so you don't need a special build of xvid for this to work.

Regards
Koepi

Emp3r0r
7th December 2003, 00:50
The use of those zones in my test with Xmen2 seemed to disable rate control all together. I keep getting my first pass size during the second pass. However, I did get keyframes at the locations I specified. Thats good news. I checked to see how well those frames corresponded to the DVD and it seems they are all somewhat late. What is the correct way to determine the frame from a time after a normal ntsc 30fps movie is inverse telecined via force film? Is it 23.976 or 24?

[update] I did some testing and it seems using 24 instead of 23.976 makes the chapter points match up to the dvd well.

Koepi
7th December 2003, 09:17
Emperor,

do a fresh CVS checkout, there's a zones fix in it - please adopt ChapterGrabber accordingly (internal/non-public first) until i release another binary (maybe intermediate update or beta 3) which will include that.

Now the zones behave like wanted, they start with a keyframe. Maybe you need to play around a little. Please make sure to use "weight 1.0" for every zone you setup automatically until i/we tested it and it prooves to work alright (the zones feature with many zones i mean).

If I send you a ifo file(PAL unfortunately), can you send me back such a registry file so I can test around with it? (Maybe it can help finding bugs).

Regards
Koepi

Emp3r0r
7th December 2003, 22:33
Koepi, check your PM and email, I created a new version of ChapterGrabber that only creates one zone for each chapter. It also includes a framerate option. I'm still testing it though.

bond
8th December 2003, 11:46
hi Emp3r0r!

would it perhaps also be possible to add an option which lets people set keyframes easily? would be great

btw great tool :)

Emp3r0r
9th December 2003, 06:41
would it perhaps also be possible to add an option which lets people set keyframes easily

I'm not so sure I understand your request. Can you be more specific? Is this in relation to chapters?

bond
9th December 2003, 09:36
nope, its just about making 1 (or more) specific frame a keyframe

zulu
9th December 2003, 10:50
Originally posted by bond
nope, its just about making 1 (or more) specific frame a keyframe

hmmm..maybe this feature is better off in KeyframeEnforcer?
If Emp3r0r agrees, i could implement his Xvid-Zones-Reg-Export feature there as well.

bond
9th December 2003, 19:34
does the zone feature add the keyframes to the first pass stats _after_ running the first pass or does it do it _during_ the first pass (or doesnt this make a difference anyways)?

if the second is the case it would be important imo that the keyframes arent added to the final first pass stats file as keyframeenforcer does with devapi3

Emp3r0r
9th December 2003, 21:29
If Emp3r0r agrees, i could implement his Xvid-Zones-Reg-Export feature there as well Go ahead, I can send you source code if you want it.does the zone feature add the keyframes to the first pass stats _after_ running the first pass or does it do it _during_ the first pass (or doesnt this make a difference anyways)?As far as I understand XviD follows the zone information during any encode. I still can't get rate control to work during a 2nd pass after setting zone information for both passes.

My next test is to do a first pass with no zone information and then force the keyframes before running the second pass. <speculating>Maybe I can have my desired output size and forced keyframes this way, however this seems like a hack to me.</speculating>

bond
9th December 2003, 21:49
(14:43:18) (_GaM3R_) if forced key frames need to be on 1st to use em on 2nd there should be something logged in the stats file showing it was a forced key
(14:43:50) (sysKin_re) _GaM3R_: nope, all frame type decisions are just copied in second pass (keyframe inserting in the second pass will be ignored)
(14:44:18) (_GaM3R_) syskin so it doesnt recalc what it thinks it really should be instead it just plain copies?
(14:45:10) (sysKin_re) _GaM3R_: yes. it was one of the biggest bugs in dev-api-3
(14:45:30) (sysKin_re) _GaM3R_: frame types must be the same to make 2pass really working
...
(14:51:46) (@GomGom) sysKin_re: i hope you understand why i said GUI wasn't ready
(14:52:05) (sysKin_re) in theory, gui could be much much more userfriendly ;)

Bluedan
16th December 2003, 23:18
@Emp3rOr

Were you successful in finding out why 2nd pass avi has the same size as the 1st in your tests?
There are not so many people reporting this - instead they complain about too low file sizes. In fact this is the 1st thread I've found about it. I have the same problem.
I'm pretty sure I did codec settings right.
Also entered correct target size in both passes.
I created a second zone as credit reange with lowered fixed quant 15 and added chroma optimizer which I should have switched on as well for the main movie (=1st zone).

Then after triple checking I started altering the settings for 2nd pass to find out the effects on file size.
As I set curve compression values for high and low bitrate scenes to 10 % instead of 0 % VDubMod showed a lower predicted file size. Now 31 % of the 2nd pass is over and it shows aprox. 630MB when it should hit 575MB.
Frankly, I doubt that that was actually the cause for the wrong file size.

How did you come along ?

To be more specific: adapt.quant, gmc, qpel, vq1, motion search 5, use chroma motion, h.263, b-frames max 2 at default ration and offset + closed GOV, quants untouched, stats file from 1st pass, i-frame boost 15%, i-frame space 2 +reduce by 20%, max overflow impr./degrad. both 30%

Emp3r0r
17th December 2003, 23:35
@Bluedan: I've recompiled from cvs and now have no trouble reaching my desired 2nd pass size when using multiple zones. All I can say is compile a new version or wait for beta 3 and try again.

sysKin
17th December 2003, 23:51
Originally posted by bond
(14:43:50) (sysKin_re) _GaM3R_: nope, all frame type decisions are just copied in second pass (keyframe inserting in the second pass will be ignored)
Actually I was wrong. Any frame type forced in 2nd pass will overrule 1st pass result.

Making keyframes in 2nd pass will confuse ratecontrol however, so I'd suggest adding them in first pass (and then you can also keep them in second or not, doesn't matter).

Radek

filewalker
6th January 2004, 15:46
[updates] Please wait for next beta. I updated some info in this post and in ChapterGrabber.

Does ChapterGrabber work now with beta3, as it should ?

Any news or updates ?


Thanks in advance!


Cu filewalker

etiRkca
7th January 2004, 23:06
Originally posted by Emp3r0r
Requires .NET Runtime
Download ChapterGrabber v2.2 (http://131.204.73.234/ChapterGrabber.2003-12-07.rar)

This link seems to be dead. Is there somewhere else where I can get the latest ChapterGrabber release?


-Kevin

theoneyouknowleast
23rd January 2004, 07:43
Any new info ?

I just found this thread, got all excited, and found out the link is dead :(

zulu
23rd January 2004, 08:42
I don't know Emp3r0r's stage of affairs, but
i've implemented a similar feature (exporting keyframe lists to XviD config) into KeyframeEnforcer.
I can't release it though, since keyframe zones in combination with bframes seem to be buggy. I talked to syskin about this issue, he will probably look into it.
If anyone is interested in testing, pm me.

zulu
23rd January 2004, 08:46
double post :\

CyberDemonII
23rd January 2004, 09:35
Has anybody tried to manualy analyse the stats file from xvid 1.0beta3 and determine the start from the end-credits ?

etiRkca
27th January 2004, 05:52
Can someone who downloaded the last Chapter Grabber release before the download died e-mail it to me or mirror it? If I get it, I'll mirror it on my website for other people.

Emp3r0r
29th January 2004, 01:10
Sorry the link is no longer available because I haven't found the time to test with newer releases of XviD. Sorry for this, I know it must be frustrating. However, I do plan on testing and updating ChapterGrabber to work with the RC's of XviD. When? Soon.

Emp3r0r
31st January 2004, 06:14
Here (http://jvance.com/files/ChapterGrabber.2004-01-30.zip) is the version I am currently using with RC1 to set keyframes at the beginning of chapters.

Whats New?
--------------------
2004-01-30 : v2.2.1
This version adds a new framerate to the menu 23.999fps. The
registry key is no longer hard coded and can be changed in the
config file.

Download ChapterGrabber 2.2.1 (http://jvance.com/files/ChapterGrabber.2004-01-30.zip)

Kurtnoise
31st January 2004, 08:23
The link seems broken.....:(

OBcecado
31st January 2004, 14:16
I'd even say there's no file there at all :confused:
http://jvance.com/files/






Greetz.

Emp3r0r
31st January 2004, 18:55
link fixed

etiRkca
1st February 2004, 02:47
I have a problem with the chapters seeking too early.:scared:

For example, I'm encoding with XviD RC1 a NTSC 16:9 movie that was Force FILMed by DVD2AVIdg and is being frameserved to VDubMod 1.5.10.1 by AviSynth 2.5.4.

Chapter 24 starts at frame 142598, which is correct, but the movie seeks to the time I have in the chapters file, which is 01:39:01.549. Frame 142598 (the correct start position for Chapter 24) is at 01:39:07.531. Is there a way to make the movie seek to the frame instead of the time? Or maybe I'm just doing something wrong.:confused:

The times for the chapters file was extracted from the original IFO, but I'm guessing that the change in the movie's fps as a result of the Force FILM throws off the time. I guess I could manually go through all the chapters and change the times to the correct ones, but that is a pain in the arse.

etiRkca
3rd February 2004, 19:25
I found that the times for the DVD are slightly later compared to my encoded video. The first chapter is only a few frames behind, but this creates magnified problems as time goes on. For each successive chapter, the encoded video is increasingly behind, until the last few chapters are a couple of seconds behind the DVD chapters.

I have no idea what causes this, but I can't believe I'm the only one with this problem? I tried a search and came up with nothing recent that matched my problems.

Emp3r0r
3rd February 2004, 23:19
@etirkca

I've been in contact with zulu on this issue and he has fixed a bug in his library that would cause times to be off by a few millisecs.

In the last version I added a new framerate which acts a workaround, try using 23.999.

I also need to fix a globalization issue so hopefully I will have a new build soon.

Anyway, thanks for testing and feedback.

etiRkca
4th February 2004, 01:17
It's my fault for not making myself clear. Sorry for the confusion.

Here's the dilemma. The timecodes for the chapters extracted from the *.IFO file does not match the correct time on the video. The times are earlier than they should be. Therefore, when seeking to the next chapter, the chapter begins a few seconds before where the chapter should begin. This is unusual because on the actual DVD, chapters seek to the correct time.

This has nothing to do with keyframes. The keyframes I set worked properly, but it was not until later that I realized that these keyframes were being based on erroneous timecodes from the *.IFO file. Maybe I don't understand your answer, but I think that I did not make my problem clear.


This is not a special case. It's been happening for every DVD I backed up; everything from The Matrix to Butch Cassidy and the Sundance Kid. I think I'm doing something wrong, but I just don't know what.

zulu
4th February 2004, 09:12
As Emp3r0r stated above there is a bug in my library he's linking against. Could you please replace veslib.dll with this (http://shockshit.net/zuludev/downloads/VESLib.dll) one and report back if it works? If not there might be another problem.

regards,
zulu

etiRkca
4th February 2004, 22:28
Originally posted by zulu
As Emp3r0r stated above there is a bug in my library he's linking against. Could you please replace veslib.dll with this (http://shockshit.net/zuludev/downloads/VESLib.dll) one and report back if it works? If not there might be another problem.

regards,
zulu

When trying to open a IFO, here's the error I get:

An unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will be shut down immediately.

The format of the file 'VESLib' is invalid.

Details:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.BadImageFormatException: The format of the file 'VESLib' is invalid.
File name: "VESLib"
at JarrettVance.ChapterTools.Grabber.GetChaptersFromIFO(String IFOPath, Double fps)
at JarrettVance.ChapterTools.frmMain.OpenFromIfo()
at JarrettVance.ChapterTools.frmMain.menuFileOpen_Click(Object sender, EventArgs e)
at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
at System.Windows.Forms.MenuItemData.Execute()
at System.Windows.Forms.Command.Invoke()
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

=== Pre-bind state information ===
LOG: DisplayName = VESLib, Version=0.1.1351.26760, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = D:\DVD\ChapterGrabber\
LOG: Initial PrivatePath = NULL
Calling assembly : ChapterGrabber, Version=2.2.1.41564, Culture=neutral, PublicKeyToken=null.
===

LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Post-policy reference: VESLib, Version=0.1.1351.26760, Culture=neutral, PublicKeyToken=null
LOG: Attempting download of new URL file:///D:/DVD/ChapterGrabber/VESLib.DLL.



************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
ChapterGrabber
Assembly Version: 2.2.1.41564
Win32 Version: 2.2.1.41564
CodeBase: file:///D:/DVD/ChapterGrabber/ChapterGrabber.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.

etiRkca
4th February 2004, 22:33
By the way, the problem I described in my February 3, 2004 16:17 post happens in Chapter-X-tractor 0.962 also, so I don't think it has anything to do with your library specifically.

zulu
5th February 2004, 08:39
The error you get means that the dll is broken.
I just checked it and it is ok, seems your download wasn't completed successfully.
Please download it again, the version that ships with Chaptergrabber is definitely buggy.


By the way, the problem I described in my February 3, 2004 16:17 post happens in Chapter-X-tractor 0.962 also, so I don't think it has anything to do with your library specifically.

Not sure if i understand you correctly. You mean the problem persists when opening chapterxtractor files instead of IFOs?
If so, there must be another bug somewhere in Chaptergrabber itself.

regards,
zulu

EDIT:
I've never touched a NTSC movie, but AFAIK know fps of ForceFILMed material is 23.976. Make sure you select this framerate in ChapterGrabber.

etiRkca
5th February 2004, 22:33
Originally posted by zulu
The error you get means that the dll is broken.
I just checked it and it is ok, seems your download wasn't completed successfully.
Please download it again, the version that ships with Chaptergrabber is definitely buggy.

Not sure if i understand you correctly. You mean the problem persists when opening chapterxtractor files instead of IFOs?
If so, there must be another bug somewhere in Chaptergrabber itself.

EDIT:
I've never touched a NTSC movie, but AFAIK know fps of ForceFILMed material is 23.976. Make sure you select this framerate in ChapterGrabber.

OK, I downloaded the DLL again and it works just fine from what I can tell.

When I open IFOs in Chapter-X-tractor, the times from the IFO file don't match up with the times from the movie.

For some unknown reason, I need to use 24 fps on my Force FILMed movies to get the correct frames.

[EDIT]
I found that my problem isn't the fault of ChapterGrabber or Chapter-X-tractor. My ripped file is longer than the original for some odd reason and this throws off the chapter times. For example, after I had ripped Planet of the Apes (NTSC R1) and Force FILMed it, the movie went from 01:59:01 to 01:59:08. Odd, I have no idea why this happens. I know this is off-topic, but I wanted to confirm that ChapterGrabber is not at fault here.

ashyak
13th April 2004, 10:44
Hi,


nice tool, i have tested ChapterGrabber.2004-01-30 with XviD V1 RC4 on PAL DVB Stream. It works :)

But there are some minor bugs:
-If i set the framerate in --> options -> framerate -> 25.000 i get the value 25000 in the settings.xml instead of 25 or 25.000.
-the edit function is a little bit strange (edit the name will change the time and the time goes to frame).

And one suggestion:
an autosort function by time (or frame position) would be usefull.


.....cu