Chapter Addition to Previously Converted DVD's

Archive of historical feature requests.
Please use the GitHub link above to report issues.
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Post Reply
Gyroxide
Posts: 1
Joined: Sun Apr 22, 2007 12:26 am

Chapter Addition to Previously Converted DVD's

Post by Gyroxide »

I was wondering what the logistics would be of being able to put in a previously converted DVD, choose the previously converted output file, and place the chapter markers. It's definantly a feature I would like rather than reconverting 50 DVD's.
TheBum
Novice
Posts: 66
Joined: Tue Apr 10, 2007 12:03 am

Post by TheBum »

If you paid for QuickTime Pro, you could do it by adding a chapter text track to the movie. It's a tedious process, but it would probably take less elapsed time than re-encoding. Here's how:

http://docs.info.apple.com/article.html ... 3qt20.html
wiz420
Posts: 11
Joined: Fri Feb 23, 2007 6:55 pm

Post by wiz420 »

Well... assuming your movies are in mp4 containers and you don't need to play them in iTunes/Apple TV...

There is a Windows program called ChapterXtractor that can extract OGG text-based chapter files from DVDs, which you can then mux to an mkv container with mkvmerge, otherwise QT Pro is probably your only option.
sdm
Bright Spark User
Posts: 194
Joined: Mon Feb 19, 2007 4:53 pm

Post by sdm »

metadata hootenany can do what you ask.

You'll have to save the resulting file as a .MOV though (if you don't want to change the file container, you can save a reference .mov that contains the chapter info and links to the original video file.

--sdm.
Cyander
Experienced
Posts: 94
Joined: Tue Mar 20, 2007 9:19 pm

Post by Cyander »

Just beware that because of how DVDs are authored, Metadata Hootenany /will/ do the work, but the sync will be off (but consistent with 0.8.5b1).

DVDs author chapter breaks in a somewhat funky manner, and there has been work done after b1 went out to address this. So, if you don't mind chapter breaks being half a second off, then it will work great. Otherwise, you will likely have to re-encode at some point.
kneeslasher
Experienced
Posts: 85
Joined: Tue Mar 06, 2007 8:40 pm

Re: Chapter Addition to Previously Converted DVD's

Post by kneeslasher »

Gyroxide wrote:It's definantly a feature I would like rather than reconverting 50 DVD's.
I'm with Gyroxide: this is an ardently awaited feature!
Cyander
Experienced
Posts: 94
Joined: Tue Mar 20, 2007 9:19 pm

Re: Chapter Addition to Previously Converted DVD's

Post by Cyander »

kneeslasher wrote:
Gyroxide wrote:It's definantly a feature I would like rather than reconverting 50 DVD's.
I'm with Gyroxide: this is an ardently awaited feature!
There are really only two options (that are technically feasible):

- Use Metadata Hootenany to add the chapters after ripping. The result is very close to what 0.8.5b1 of Handbrake produces. If another app comes to light which can embed the chapter track for you, this might improve things for you guys. (Might be a good feature ask for Movie Chapterizer, actually)

- Re-rip with the next release (or build from SVN if you feel adventurous). It will get chapter markers synced up exactly like it works with a DVD player. However, due to how DVD players handle chapters, when you rip it, a lot of the information we need to sync up a chapter break to a frame in the ripped video is lost. It needs to be synced up while the disc is ripped (much like audio/video sync), or there is no way to guarantee accuracy.
kneeslasher
Experienced
Posts: 85
Joined: Tue Mar 06, 2007 8:40 pm

Post by kneeslasher »

Ah, in which case, rerip with the next release seems the only option for those who wish to have good chapter info.

Actually, this brings to mind another possiblity (feasibility unknown/impossible):

When ripping CDs using, for example, EAC, the following occurs upon insertion of a CD:

- If you've never used that CD before in EAC, the tracks will be named Track1, Track2, etc..
- If you have used that CD in EAC before, it will reload the track names for that CD.
- Regardless of the above, you can always use CDDB to get track names if someone else had uploaded them.

Might it be possible to locally store information on DVD chapter titles, etc.? I realise the third option, of a global database for DVDs (as we already have for CDs) is not feasible, but local caching of one's own DVD to make it easier to rerip them or whatever is surely not too tought to implement?
Cyander
Experienced
Posts: 94
Joined: Tue Mar 20, 2007 9:19 pm

Post by Cyander »

The problem isn't that data isn't available on when chapter breaks /should/ be... they are written right on the DVD.

The problem is that when you rip, you change the rules of the game. It isn't like ripping audio and ID3 tags, since a track is a track is a track. With a ripped DVD, you have to worry about framerate, groups of pictures and other details that change where a chapter break needs to be inserted (it doesn't help that finding the exact frame of a chapter break on a DVD is not straight-forward, as they are authored to expect certain behavior from DVD players which isn't quite 'friendly').

If you want more technical details on why chapter break sync is not easy, you can look at my thread in the Development forum on how I got chapter breaks to sync correctly in the first place.

How syncing works right now is that Handbrake uses the pipeline in Handbrake itself to get the DVD chapter breaks, and then pass them along to the next stages, and each stage massages them slightly before passing them on.

DVD Read -> MPEG-2 Decode -> A/V Sync -> Render -> Encode -> Mux

- DVD Reading looks for the chapter break in terms of how it is written on the DVD, just like Metadata Hootenany. It inserts the break on the first frame of the new 'chapter cell'.
- MPEG-2 Decode strips the break, and waits for the first group of pictures in the chapter cell (since groups of pictures can spill over from one chapter, into another, and the chapter doesn't really begin until the first I-Frame in the chapter's cells).
- A/V Sync will move chapter markers on dropped frames, and handle where to insert chapter markers on inserted frames, to handle changes in framerate (such as someone changing framerate from 23.97 to 29.97, or vice versa).
- Rendering and encoding do not touch the chapter marker, but just pass it along.
- Muxing does the length calculation for the chapter, and inserts the marker. If the duration is not synced to the frame rate, then the behavior of the marker gets wonky, and you don't quite know which frame it will point to (I saw this when working on the markers, and it is quite funky).

What causes the problems is the manipulation on the chapter marker during the MPEG-2 decoding and A/V sync. It is actually pretty hard to replicate that after the fact without decoding the stream at the beginning of every chapter with the same settings as the original rip. At that point, you might as well rip it again anyways.
kneeslasher
Experienced
Posts: 85
Joined: Tue Mar 06, 2007 8:40 pm

Post by kneeslasher »

Thanks for the explanation: I've done alittle more digging around the forums and can now see why the DVD chapter/episode thing is different from ripping CDs.
Post Reply