Re: Chapter marks not where specified.

Tom Brock <tomb-yZYHXxUkMT10YYv+nEap2lpr/1R2p/[email protected]> Sun, 01 Apr 2012 10:38:08 +0100
Newsgroups gmane.comp.multimedia.dvdauthor.user
Message-ID <[email protected]>
Hi Lawrence,

I fear I wasted your time with the last half of my last post: my analysis of 
the avidemux index file was nonsense.  I'd failed to notice that the timestamp 
line in the file refers to the start of the VOBU line above it, not below.  It 
had been a very long day.  That's my excuse and I'm sticking to it.

It seems that, when ffmpeg is writing out a VOBU that contains a forced key 
frame, it simply truncates that VOBU (the shortest I've seen contains only 1 
frame) and starts a new one with the forced key frame.  This new frame does 
not simply contain the remainder of the frames from the truncated VOBU, but a 
full gop (12 frames in my case).

So now I'm wondering whether the very short VOBU is the problem.  My years-old 
"Unofficial DVD Reference" says that if a VOBU contains any stream data, then 
it must contains at least 400 ms.  1 frame hardly qualifies on that score.  
Could it be the case that when dvdauthor sees a VOBU, it assumes (as perhaps 
it should be able to do) that it will contain at least 10 frames (of PAL) and 
so can "know" that the VOBU contains a chapter-marker frame that is actually 
at the start of the next VOBU.  Nevertheless, the truncated VOBUs properly 
declare the number of frames they contain and DVDs with this structure play 
correctly, so maybe they're not illegal.  Also, there are other short VOBUs in 
the file.

Having said all that, all of the incorrectly-placed chapter marks were 
specified at frames that were in the region apparently truncated from a 
12-frame VOBU.  The longest truncated VOBU has 9 frames.  There is no forced 
key frame that caused a truncation to 10 or 11 frames.  All 5 correctly placed 
chapter-marks were VOBU starts following 12-frame VOBUs, so they apparently 
fell on a VOBU start without forcing, as should have happened in about 3 
cases: the probability of its occurring 5 times out of 33 is about 8.4%, so 
not that unlikely.

I'm preparing a filleted and annotated version of the avidemux index file of 
the ffmpeg-created 7900 MiB mpeg with 33 forced key frames that started this 
thread, showing the structure in the neighbourhood of each forced key frame, 
whether the chapter marker was correctly or incorrectly placed by dvdauthor.

Also, I think I'll then try to create a great many more forced key frames to 
see if I can get ffmpeg to truncate some VOBUs to 10 or 11 frames, and see if 
they cause dvdauthor to misplace the corresponding chapter markers.  If 
nothing else it'll  improve the statistics.

One thing is clear: reproducing the problem is easy.  Use ffmpeg (I haven't 
tried  mplayer) to produce a pal-dvd mpeg file with several forced key frames, 
and run that through dvdauthor with the same list of times as chapter markers. 
 You need a recent version of ffmpeg (I'm running 0.9.1.git) to have 
'-force_key_frames' option.  ffmpeg has a fairly dumb scanf to decode the 
times, so you must include the hours field, otherwise it silently discards the 
entire argument: a bit annoying if the transcode takes 10 hours :-(

Tom.


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure