View Full Version : ChapterGen: manipulate with chapters in various i/o formats, with CLI support
shon3i
14th February 2011, 20:50
Updated to 1.0.6
@Subbat should be fine now.
Subbat
14th February 2011, 21:07
Yep, i will see what i can do.
Thanks for report
Updated to 1.0.6
@Subbat should be fine now.
Hey... Cool... I will try it as soon as possible...
:thanks:
Subbat
14th February 2011, 22:37
Cool, it's working nice now...
Thank you...
Subbat
15th February 2011, 09:57
Hi shon3i,
Just to say that on your first post there's always note :
Current version 1.0.5
Download
Thanks again...:)
laserfan
18th February 2011, 18:36
shon3i, my VideoReDo editor does not output chapters in tsMuxeR format HH:MM:SS.milliseconds as I need, but instead framenumbers. Any chance you could allow framenumbers as INPUT? Here's a sample of frame numbers from a 59.94 TV program, and the command I would like to use on it. Thanks for your consideration!
0
24854
35765
49430
54449
57308
65678
75212
84197
99474
137268
152460
168003
180657
185298
193434
216868
235267
238240
248278
270406
299038
332388
346824
393174
399870
402011
"C:\Program Files (x86)\ChapterGen\ChapterGen.exe" -i chapters.txt -o tsMuxeR.txt -f tsMuxer -infps 60/1.001 -outfps 60/1.001
Video Dude
18th February 2011, 20:08
Frame number input would be useful.
I also use VideoReDo to edit HD tv captures and then author to Blu-ray with tsmuxer.
Capsbackup
19th February 2011, 02:27
shon3i, my VideoReDo editor does not output chapters in tsMuxeR format HH:MM:SS.milliseconds
I use VideoRedo, and I have the chapters format selection HH:MM:SS.ff, works for me for tsMuxeR! Seems to be pretty accurate too.
laserfan
19th February 2011, 17:03
I use VideoRedo, and I have the chapters format selection HH:MM:SS.ff, works for me for tsMuxeR! Seems to be pretty accurate too.
Yes, I noticed that too, but it's only "pretty accurate" as you said--my expectation about it is that while VRD's ff output is a frame number, tsMuxeR accepts it as .ms instead, so for example if the frame number is frame 22 e.g. VRD's output is
00:27:32.22
then tsMuxeR interprets this as .220 (220 milliseconds) whereas frame 22 for a 24/1.001 program would actually be at 918ms. So your chapter seek might land on a previous I-frame instead of the desired one.
Whether the miss is offensive or not of course depends on the program. But I'm very anal about this stuff so like to get it perfect, if possible... :)
Capsbackup
19th February 2011, 18:04
My usage for VideoRedo is to cut commercials from recorded HD TV shows, so there is much more leniency for chapter marks at these commercial cuts. But I see and agree with your point! ;)
shon3i
20th February 2011, 13:31
Ok i will see what i can do :)
laserfan
20th February 2011, 15:11
shon3i, have we told you lately that we love you? ;)
shon3i
18th March 2011, 10:55
shon3i, have we told you lately that we love you? ;)
Ok i added celltimes as input format. Since celltimes has unknown fps you should use cmd like this
"ChapterGen.exe" -i chapters.txt -o tsMuxeR.txt -f tsMuxer -infps 60/1.001, without outfps. But test it to see is chapters on correct places.
laserfan
18th March 2011, 15:20
Ok i added celltimes as input format. Since celltimes has unknown fps you should use cmd like this
"ChapterGen.exe" -i chapters.txt -o tsMuxeR.txt -f tsMuxer -infps 60/1.001, without outfps. But test it to see is chapters on correct places.
You said "celltimes" but I asked for "frame numbers"!!? Anyway, I will give your new version a try! :)
manolito
18th March 2011, 15:53
You said "celltimes" but I asked for "frame numbers"!!?
Celltimes.txt contains (guess what?) FRAME NUMBERS.
Cheers
manolito
laserfan
18th March 2011, 19:46
Celltimes.txt contains (guess what?) FRAME NUMBERS.
Cheers
manolitoWhew! Thanks! :eek: ;)
laserfan
19th March 2011, 20:03
Since celltimes has unknown fps you should use cmd like this...without outfps.
shon3i, it worked perfectly, though the output was wrong until I added outfps, specificially for the 29.97 program I tried it on:
chaptergen -i frames.txt -o tsmuxer.txt -f timecodes -infps 30/1.001 -outfps 30/1.001
Thanks for adding this feature; it is much appreciated! :)
shon3i
20th March 2011, 11:56
shon3i, it worked perfectly, though the output was wrong until I added outfps, specificially for the 29.97 program I tried it on:
chaptergen -i frames.txt -o tsmuxer.txt -f timecodes -infps 30/1.001 -outfps 30/1.001
Thanks for adding this feature; it is much appreciated! :)
Cool, thank you :)
shon3i
26th March 2011, 12:59
Updated to 1.0.8
FILLIFY
8th June 2011, 06:42
big thanks for your tool!
can you add manual offset feature?
it'll be great.
shon3i
8th June 2011, 10:34
big thanks for your tool!
can you add manual offset feature?
it'll be great.
Yes it's possible, it will happen in near future, just be patient.
Stereodude
9th July 2011, 19:20
Thanks for the tool.
FYI: I believe there is a rounding error in the math though. It looks like it is rounding down / truncating the frame number instead of using normal rounding (at least in the Sonic Scenarist CSV File output mode).
I took a Blu-Ray and used eac3to to generate a chapter listing. I then ran that file through ChapterGen using the GUI set to 23.976FPS -> 24FPS and created a Sonic Scenarist CSV File. I then ran the video and audio streams through Scenarist BD (with it complaining about I-frames and showing incorrect chapter times the whole way though) and generated a BD disc. I then used eac3to again to generate a chapter listing and compared it against the one I got from the original Blu-Ray. Some of the chapters were moved 1 frame earlier.
Original BD chapters:
00:00:00.000
00:09:39.120
00:19:49.355
00:34:21.851
00:45:15.338
00:49:38.184
01:01:59.674
01:05:52.657
01:10:05.451
01:15:08.045
01:17:08.040
01:19:41.610
01:35:12.582
01:39:11.154
01:48:21.495
01:56:39.618
01:58:49.914
02:05:18.094
02:09:07.156
02:14:06.538
Chapters From Scenarist created BD:
00:00:00.000
00:09:39.078
00:19:49.355
00:34:21.810
00:45:15.296
00:49:38.184
01:01:59.633
01:05:52.615
01:10:05.410
01:15:08.003
01:17:08.040
01:19:41.568
01:35:12.540
01:39:11.154
01:48:21.495
01:56:39.576
01:58:49.873
02:05:18.052
02:09:07.156
02:14:06.497
I italicized the ones that are 1 frame too early.
Here is the file ChapterGen created:
23.976
NonDrop
00:00:00:00
00:09:38:12
00:19:48:04
00:34:19:18
00:45:12:14
00:49:35:05
01:01:55:22
01:05:48:16
01:10:01:05
01:15:03:12
01:17:03:10
01:19:36:19
01:35:06:20
01:39:05:05
01:48:15:00
01:56:32:14
01:58:42:18
02:05:10:13
02:08:59:10
02:13:58:11
I double checked the math in Excel (based on the frame numbers of the original chapters) and I matched ChapterGen's results exactly if I used rounddown(frames,0) for the frame number. When I used round(frames,0) instead I got
00:00:00:00
00:09:38:13
00:19:48:04
00:34:19:19
00:45:12:15
00:49:35:05
01:01:55:23
01:05:48:17
01:10:01:06
01:15:03:13
01:17:03:10
01:19:36:20
01:35:06:21
01:39:05:05
01:48:15:00
01:56:32:14
01:58:42:19
02:05:10:14
02:08:59:10
02:13:58:12
When I imported these times into Sonic the created disc has identical chapters to the source disc.
MrVideo
12th July 2011, 05:49
Ok, I finally finished completly new (from scratch) tool for chapters.
infps <float>
- 50.940
-outfps <float>
- 50.940
I hope you mean 59.94, not 50.94 :D
MrVideo
12th July 2011, 06:07
Well, that didn't go so well.
Latest version of the software. Commandline operation done in a cygwin Zshell. Sitting in the directory that contains the input text file. I have no problem spitting out the content of the input text file, which is frame numbers.
The program complains that it can't open the input file. I had even tried dragging the input file to the GUI and it was ignored.
It would be nice if the error would say why it can't open the input file.
shon3i
26th July 2011, 23:14
@Stereodude, yes i know for this problem, and it's random problem, because i had some titles which fine if i use rounddown and other with round, it's wierd but i think to add switch that user can choose. I can't find real formula maybe there is some other factor.. It's only problem for scenarist/cinevision and frame cents based formats.
@MrVideo, yes i mean 59.94, i think i fixed that typo in last revision, btw can you send me that file, i would to check what problem is? Btw i am so lazy to writte proper error handler :D
MrVideo
27th July 2011, 08:10
yes i mean 59.94, i think i fixed that typo in last revision, btw can you send me that file, i would to check what problem is? Btw i am so lazy to writte proper error handler :D
First post in this thread and the cmdhelp.txt file have 50.94 instead of 59.94.
It has been so long since I posted that error report that I have no clue as to which file I was trying to use. When I get a chance, I'll try again.
shon3i
27th July 2011, 11:07
First post in this thread and the cmdhelp.txt file have 50.94 instead of 59.94.Fixed here, and will be fixed in cmdhelp with next rls, thanks.
It has been so long since I posted that error report that I have no clue as to which file I was trying to use. When I get a chance, I'll try again. Thank you, btw if you have some file that will not load, just throw it here, for examination. I think i know why you didn't success to load celltimes, file must not contain any spaces, must be 100% numeric.
MrVideo
27th July 2011, 18:54
I think i know why you didn't success to load celltimes, file must not contain any spaces, must be 100% numeric.
OK, when I get a chance, I'll see if that was it.
Masutin
10th December 2011, 05:43
I didn't see a general topic for chapters and, if don't mind, have a question about creating chapters (not necessarily using this tool): Is there software where video playback is used within the program to make adding time codes easier. E.g. you pause the video, press a key shortcut, and the time for a chapter is added. Subtitle editors work in such a way.
Cela
13th December 2011, 19:19
...Is there software where video playback is used within the program to make adding time codes easier. E.g. you pause the video, press a key shortcut, and the time for a chapter is added. Subtitle editors work in such a way.AFAIK there is no general chapter generation program available. For my personal convenience I adopted a simple workaround.
I accept COPY (Ctrl+C)/PASTE (Ctrl+V) as 'key shortcut'
and use an accompanying "Videoname_chp.txt" tect file:
1. Use a video editor program to replay the video.
2. If supported by the video editor, set a suitable chapter timecode display format.
3. Navigate to a location of each chapter candidate.
4. If supported by the video editor, copy the displayed chapter time code and paste it into a simple textfile "Videoname_chp.txt".
5. Add an annotation. You may call it chapter name.
6. If your authorung program supports it, use the chapter textfile as input for chapter menu generation.
Unfortunately not many video editor programs support steps 2 and 4 properly.
Not many video editors support to select the chapter timecode display format (step2).
Not many video editors support the COPY (Ctrl+C) from the timecode display window (step 4). This means that the displayed values must be typed manually into the text file. (Beware of typos!)
I tested the following video editors:
* Good old Mpeg2schnitt provides a perfect solution for PAL mpeg2 footage for steps 1 to 5. It supports several tc formats. I often use it to convert from one tc format to another tc format. Furthermore it supports COPY/PASTE of the tc format from/to its Marker list. Double click on any tc entry in the Marker list jumps to the corresponding time position in the video. Furthermore, the Marker list practically works like a windiows tect file and thus offers to except any kind of annotation and/or chapter text.
* Adobe Premiere Elements has a hh:mm:ss:ff (example: 00:26:13:06 ) tc display window and allows to copy . Furthermore it allows to enter a new tc value into the tc display manually or by PASTE and by doing this jump to the entered tc. It is not possible to select any other TC format.
* MAGIX Video delux MX has also a hh:mm:ss:ff (example: 04:26:13:06 ) tc display window but does not support COPY/PASTE its content. It is not possible to select any other TC format.
* Cyberlink Power Director 10 has a Chapter feature which allows to add a chapter name and displays a hh:mm:ss:ff (example: 00:26:13:06 ) tc display window in the Chapters Room. COPY/PASTE is not supported, though.
* VideoRedo TV Suite HD (VDR) has also a hh:mm:ss:ff (example: 04:26:13:06 ) tc display window but does not support COPY/PASTE of its content. VDR comes with tc format hh:mm:ss:ff but allows to change it to hh:mm:ss.ff format. Furthermore it has a view option Show Frame Number which displays the frame number. The tc display field is display only! But double clicking on it displays an Enter TimeCode sub-window with sub-fields Hours, Minutes, Seconds and Frame#. Unlike in Premiere Elements it is not possible to COPY or PASTE the complete tc-value (example: 04:26:13:06 ) from or into these sub-fields. Thus COPY/PASTE is very limited, practically useless. But in Show Frame Number mode, the Frame number field inthe Enter Frame Number sub-window does support COPY/PASTE! Thus VDR is suited for step 4 in Frame Number mode. Depending on your authoring program a tc conversion program like ChapterGen is needed to convert the tc format.
Conclusion:
Mpeg2schnitt is my first choice for mpeg2 PAL footage.
VideoRedo in Frame Number mode is my first and PRE10 in its hh:mm:ss:ff mode is my second choice for h.264 HD footage.
"Videoname_chp.txt" file is my hub for all chapter related activites. iI use it parallel to the video editor programs. Best of all, the "Videoname_chp.txt" file is supported by the great, free AVCHD authoring program multiAVCHD. multiAVCHD uses the hh:mm:ss.mss (mss ... 3 digit millisecond fraction) tc format. So, for h.264 HD footage a tc conversion program like ChapterGen is mandatory to convert the tc format.
Sounds complicated, but isn't. ;)
Any easier procedure from h.264 TS (m2ts) to AVCHD with annotated chapter menus?
MrVideo
13th December 2011, 19:51
AFAIK there is no general chapter generation program available. For my personal convenience I adopted a simple workaround.
Your testing of VideoReDo was incomplete. BTW,m it is VRD, not VDR,
* VideoRedo TV Suite HD (VDR) has also a hh:mm:ss:ff (example: 04:26:13:06 ) tc display window but does not support COPY/PASTE of its content. VDR comes with tc format hh:mm:ss:ff but allows to change it to hh:mm:ss.ff format. Furthermore it has a view option Show Frame Number which displays the frame number. The tc display field is display only! But double clicking on it displays an Enter TimeCode sub-window with sub-fields Hours, Minutes, Seconds and Frame#. Unlike in Premiere Elements it is not possible to COPY or PASTE the complete tc-value (example: 04:26:13:06 ) from or into these sub-fields. Thus COPY/PASTE is very limited, practically useless. But in Show Frame Number mode, the Frame number field inthe Enter Frame Number sub-window does support COPY/PASTE! Thus VDR is suited for step 4 in Frame Number mode. Depending on your authoring program a tc conversion program like ChapterGen is needed to convert the tc format.
VRD can display time as hh:mm:ss:ff (DFTC or NDFTC for 29.97 video) or as frames. But, the biggest feature that you missed is that VRD can output a text file with frame values in the current display format. There are options as well, check them out. Make sure that At Scene Marker is checked.
To output a "chapter" text file manually, just go to the locations you want to marked as chapters. The press the "a" key to place a marker in the display. Set all of your markers, then in the File dropdown menu, do a save Chapter file.
Bingo, you have a text file with the chapters that you marked. No copy-n-paste required.
Cela
15th February 2012, 12:40
Your testing of VideoReDo was incomplete. BTW,m it is VRD, not VDR,
...
Bingo, you have a text file with the chapters that you marked. No copy-n-paste required.Thanks for your valuable clarifications.
I have been aware of the chapter file feature and use it where appropriate, but IMHO it is more a detour than a shortcut if I only need the current timecode value in the windows clipboard (in order to pass it to another application).
By the way, assume you have a timecode value (as a result of another apllication) in the windows clipboard and you want VRD to jump straight to that value, how would you do it in VRD?
A simple COPY/PASTE of the current timecode to/from windows clipboard (like in Premiere Elements and Mpeg2Schnitt) is a needed feature which I strongly miss in VRD!
Ghitulescu
2nd March 2012, 16:09
Can you add a conversion function from Matroska XML to tsmuxer accepted format?
manolito
3rd March 2012, 00:14
Can you add a conversion function from Matroska XML to tsmuxer accepted format?
ChapterGen cannot currently import chapters in XLM format, but it can import chapters in OGM format. MKVExtractGUI2 lets you extract MKV chapters in OGM format (MKVCleaver cannot do this AFAIK), so just import the OGM chapter file into ChapterGen and export it to tsMuxeR Meta format.
Cheers
manolito
shon3i
3rd March 2012, 02:12
I started to improve ChapterGen to support chapter names, online database support for importing, more i/o formats including xml, better cli handling etc, but stoped because real life problems. Maybe i will continue some day.
Btw, thanks guys for supporting and using this tool :)
manolito
3rd March 2012, 13:58
Take your time, ChapterGen works perfectly for me as it is now, I use it all the time.
Thanks very much for this excellent tool...:thanks:
Cheers
manolito
jfcarbel
5th April 2012, 08:03
Great tool, perhaps you can release the source and others can work on it.
shon3i
6th April 2012, 20:00
When i finish some modification that i started i will share it on google code or whatever service, all interested can join :)
jfcarbel
17th April 2012, 17:22
When i finish some modification that i started i will share it on google code or whatever service, all interested can join :)
Awesome, great I look forward to helping. One of the features I would want to add is ability to open point to a video file (AVI, MP4,MKV) and have it read duration of video via mediainfo DLL and then based on this allow user to choose to create chapters based on # of chapters wanted or create chapter every # minutes with edit window to allow user to name chapters if they want. Then it would then be cool if it could invoke MKVmerge via command line to integrate the chapters into the MKV. Just some of the things I would look to add.
I have also always envisioned a tool that would read in an MKV or AVI file and allow user to scan thru the video quickly like AVIDemmux allows and when on a frame be able to click create chapter. So an interactive way to create the chapter file. And then with the ability to generate a chapters thumbnail jpg from the selected chapters.
BTW - looks like from first post that jdobbs provided you some code to use, make sure to get his clearance before open sourcing that. Also what language is the tool written in?
MrVideo
20th July 2012, 12:33
By the way, assume you have a timecode value (as a result of another apllication) in the windows clipboard and you want VRD to jump straight to that value, how would you do it in VRD?
Oops, sorry. Got sidetracked.
I know of no way to cut-n-paste time code values in VRD. But, if you have the value as a frame count and set VRD to frame values, then cut-n-paste does work.
jfcarbel
21st July 2012, 21:57
Still looking forward to this being open sourced as I am unaware of any projects like this that community can improve on work on. Are there any open source Chapter generators? I could not find any in my search.
What language is the tool written in?
shon3i
25th July 2012, 08:05
Sorry for i didn't answer you earlier, ChapterGen is written in VB6. Still i need to do some things before i open it, just need few months.
marcusj0015
14th October 2012, 08:15
Hi, could you either release the source, or create a Mac version? and also, can you support creating either an MKV output, or XML output?
shon3i
1st November 2012, 22:28
Some work in done, xml support is added, along with chapter naming function. I working now on online tagging support.
@marcusj0015, i don't think so is Mac version possible coz VB6 is restricted to windows only.
jfcarbel
19th November 2012, 12:03
Some work in done, xml support is added, along with chapter naming function. I working now on online tagging support.
@marcusj0015, i don't think so is Mac version possible coz VB6 is restricted to windows only.
online tagging support?
Looking very much forward to the chapter naming function.
For Titles that don't have any chapter stops to read, can you read length of video and give option of user to choose number of chapters or chapter every ## minutes and then generate the chapter times based on the selection calculated from length of video.
shon3i
20th November 2012, 13:06
online tagging support?I mean retriving names from service such as tagchimp.
I will consider that should not be hard, i need to look more in mediainfo structure.
jfcarbel
5th January 2013, 06:17
I mean retriving names from service such as tagchimp.
I will consider that should not be hard, i need to look more in mediainfo structure.
Cool looking so forward to this.
Nico8583
16th May 2013, 22:52
Hi :)
When I run ChapterGen with GUI or cmdline, it asks administrator rights. Is it normal ? Could I remove this step ? Because when I launch ChapterGen in a script, it waits for a choice (Yes or No).
Thanks !
laserfan
17th May 2013, 12:53
No, that's not normal--I run ChapterGen in cmdline scripts exclusively. You'll need to address the admin rights issue somehow on your setup.
Nico8583
17th May 2013, 15:12
I only need eac3to txt to scenarist csv so I'll write a little program to do this conversion :) but thanks for your response !
nbarzgar
14th August 2013, 18:16
Ok, I finally finished completly new (from scratch) tool for chapters. This is completly different than my previous qpfilegen tool. BIG Thanks goes to jdobbs who helped and share part of code, the application is no longer dependent on eac3to, it have own Blu-Ray/HDDVD/DVD support.
...
Awesome! Works like a charm, thanks so much!!
:D
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.