Log in

View Full Version : feature request - BeyondTV SmartChapters


_Shorty-dammit
27th January 2009, 14:22
I don't know if this would be an easy addition, but if it were, it sure would be handy. Would it be possible to create a small xml file from the DVD chapter information? I use some recording/playback software on my home theater PC called BeyondTV, and it uses xml files to denote commercial breaks, which they call SmartChapters. The format's pretty simple. If AutoGK could create one of these files while it does an encode job, based on the DVD's chapters, it would sure beat having to create one by hand. As this is how we view all our movies, it's nice to have the chapters there, but it's quite tedious to do it by hand for every rip.

If it has a recording called "Married ... With Children-(The Agony and the Extra C)-2009-01-16-0.avi" then it will have a corresponding chapters file called "Married ... With Children-(The Agony and the Extra C)-2009-01-16-0.avi.chapters.xml" which contains all the data it generated about the commercial breaks in the TV show. Now, with a TV show this pertains to the start and end of commercial breaks. Obviously DVD chapters are just one point in time, and don't have a start time and end time. But, using the start and end times as normal chapter breaks still works fine, as the software skips to the previous/next mark when you hit skip back/forward, regardless of whether it's a start or end mark. So, using them like DVD chapters still works as expected.

As such, I'm hoping the chapter info exists in the files that we feed to AutoGK, and also that it's a quick and easy coding job to add the feature, in hopes of it actually happening. :) Here's an example of the data BTV uses.

<cutlist>
<Region>
<start comment="00:02:04.3809347">1243809347</start>
<end comment="00:04:34.7312849">2747312849</end>
</Region>
<Region>
<start comment="00:14:57.6875739">8976875739</start>
<end comment="00:17:48.6251780">10686251780</end>
</Region>
<Region>
<start comment="00:26:46.6632155">16066632155</start>
<end comment="00:29:17.4806995">17574806995</end>
</Region>
</cutlist>

Now, you don't need to use as much resolution for the times as they do. When I make these files by hand I just use the nearest second, with a .0 to end the 'comment' portion. The number after that is the same time, only in some strange (to me, anyway) format. It's seconds, with 7 places after that. So that first example, 124 seconds, plus the rest of the fraction, for 1243809347. When I'm doing it by hand, I calculate whatever the current chapter is in seconds, and then just tack on seven zeroes:

<start comment="00:02:04.0">1240000000</start>

And if I end up with an odd number of chapters to create, I just make up the last one as something past the end of the timeline, and it's fine with that.

Thanks for reading (and hopefully considering) the request. :)

len0x
28th January 2009, 23:07
Its an interesting request, but I do believe this could be achieved by transforming chapter file produced by DVDDecrypter (probably even with batch file) to the format required.

_Shorty-dammit
29th January 2009, 10:00
I wouldn't even know where to begin. Oh well.

_Shorty-dammit
10th February 2009, 10:50
Well, I found ChapterXtractor, and managed to figure out how to output a file from it that resembles BTV's files. I still need to hand edit it afterwards, since BTV uses 'start' and 'end' sections for alternating chapters, and ChapterXtractor just gives you one section for each chapter, but it still saves a lot of time.

len0x
12th February 2009, 21:31
Good! Now all you have to do is probably to write a search and replace script. There must be tools out there that can save then for future use...