View Full Version : Chapter Sync Problem in Encoded NTSC DVDs
aaabbb
15th December 2008, 02:52
I've encoded a bunch of DVDs with different tools, from the old autogk to today's automkv, megui, using xvid or x264.
For almost any encoded movies, I've noticed an issue that the encoded movie duration is always a few seconds longer than the original DVD runtime.
It's not a big issue until I started to use chapter files (greate feature of MKV container). It appears the timestamps in a generated chapter txt file are recoded with the original DVD runtime. So the start time of each chapter in an encoded MKV file is always a little bit earlier.
Does anybody have a solution?
setarip_old
15th December 2008, 07:54
Hi!
Although I have no solution for what you've observed, I just wanted to confirm to you that your observation is neither imaginary nor unique to your system. Several years ago, I noticed this type of total runtime difference regarding every DVD I converted and thought absolutely nothing of it - because playback of the converted files was always perfect.
Now that you've pointed out the very real impact, with regard to MKV files, perhaps I or other members can explore and experiment and possibly come up with an expanation for this anomaly.
Also, I don't know if it will make any difference but, are you dealing with NTSC (either 23.976fps or 29.970fps) or PAL (25.00fps) format DVDs?
BTW - The first MKV I created was a mere 6 days ago - and the only reason I did so was to try to provide support/information to the author of what portends to be a very good program, "MakeMKV"...
aaabbb
15th December 2008, 09:18
Thank you for your confirmation, setarip_old.
I just tried to encode a video. Believe it or not, the running time lengthening actually happened during the initial DVD ripping.
In this case, the PGC 1 run time was shown as 47:56 in DVDDecrypter. Then I used the IFO mode to rip it to the harddrive. After it was done, I openned the ripped vob file with Media Player Classic. And the run time became 47:59 (3 seconds longer).
setarip_old
15th December 2008, 20:21
If you'd like to be even more perplexed, here are the indicated running times of several versions of the same movie:
1) 1:36:57 Original DVD
2) 1:37:03 Original DVD to DivX-compressed .AVI
3) 1:36:57 DivX-compressed .AVI re-converted back to DVD, using Flick (The running time actually reverted back to that of the original DVD!
4) 1:37:03 Original DVD to MKV, using MakeMKV
aaabbb
15th December 2008, 21:18
1:36:57 = 5817 Secs
1:37:03 = 5823 Secs
5817 * 30 = 174510
5823 * 29.97 = 174515.31
So appears to be a framerate issue ?
setarip_old
15th December 2008, 21:27
Actually, for the DVD I tested,if it is indeed a framerate issue as you speculate, it would be 23.976 (.AVI) versus 24.000...
aaabbb
15th December 2008, 23:10
I encoded a few DVDs this morning, all of them are NTSC 29.97. The time lengthening problem happened to all to them. And The encoded time / original time all equal to 30 : 29.97.
I guess the workaround would be to change the timestamps in the chapter file by dividing the values by 0.999
setarip_old
15th December 2008, 23:19
It still leaves the unanswered question:
Why?
ANGEL_SU
16th December 2008, 00:33
Directly playing a .VOB file (NTSC DVD) with Media Player Classic, the time is in 30fps non-drop frame time-code base. For example, you see 1:00:00.00, but the real-time will be 1:00:03.60 in fact. That is why your encoded movie duration is always a few seconds longer. You should play IFO file instead of VOB, and Media Player Classic will display time in real-time base.
setarip_old
16th December 2008, 01:31
@ANGEL_SU
The comparisons noted in this thread were made between playing DVDs "as DVDs" (software DVD player using .IFOs, not individual .VOBs), and .AVIs and.MKVs.
Also, (with my experiment) playback of the DVD under VLC showed a running time of 1:36:57, while playing the .AVI with the same VLC showed a total running time of 1:37:03, and playing the .MKV with the same VLC showed a total running time (now that I've looked a bit more closely) of 1:37:02.
aaabbb
16th December 2008, 05:57
I give one more example. If I play DVDs "as DVDs", meaning using media player to open the VIDEO_TS folder, then the main movie length would be 47:56. However, if I open the IFO file in the DVD folder, the running time would be 47:59, which also equals to the length of encoded MKVs or AVIs.
ANGEL_SU seems to be right: playing DVDs "as DVDs", the display time is in 30fps time base. However, I have to use the workaround on the chapter file since the timestamps in the chapter file actually is 30fps based (althought it says 27.97fps).
Hope it's not too confusing.
Emp3r0r
16th December 2008, 06:49
I did some extensive timecode testing while coding the IFO chapter extraction routines. I believe they are correct. ChapterGrabber uses 30/1.001 and 24/1.001 for fps rather than the inaccurate values I've seen in some other code. Also, ChapterGrabber allows you change easily between fps values.
ANGEL_SU
16th December 2008, 09:47
@Emp3r0r
I try "ChapterGrabber", but it give me a 30fps non-drop frame timecode if the DVD is authored by DVDLAB PRO. Then, I try Tmpegenc DVD Author to grab, it shows me correct chapter point & its realtime. Finally, I output this new dvd and "ChapterGrabber" can get correct chapter time from this new one.
SquallMX
17th December 2008, 05:11
Yes, I noted this problem since 2002 (ChapterXtractor)... and is in fact a wrong 29.97 Vs 30.00 (or 23.976 Vs 24.000) frame rate calculation.
Since most of the programers live in PAL land, they probably never found this "bug".
I hope someone (@Emp3r0r:sly:) can make a chapter extractor with a workaround for this, it's a PITA create a MKV with chapters because you have to do it the old-fashioned way.
Greetings.
aaabbb
17th December 2008, 09:28
Right, both ChaperXTractor and the DVDDecrypter have the issue with the timestamps in generated chapter files.
ChapterGrabber sounds like a tool which could resolve the problem. I'll give it a try.
Emp3r0r
18th December 2008, 20:17
I hope someone (@Emp3r0r:sly:) can make a chapter extractor with a workaround for this, it's a PITA create a MKV with chapters because you have to do it the old-fashioned way.I'm not sure I fully understand the problem. Are you saying that some DVD's have incorrect chapter times and you want me to detect this somehow?
ANGEL_SU
19th December 2008, 06:08
I'm not sure I fully understand the problem. Are you saying that some DVD's have incorrect chapter times and you want me to detect this somehow?
Yes, you should look into vob file if possible.
I try IFOEDIT & MUXMAN, they also record ifo file in 30fps non drop frame timecode base - same as DVDLAB PRO. ChapterGrabber always get a wrong result.
hubblec4
19th December 2008, 20:49
hi
a friend of me has written a simple tool. there you can change the framerate exactly.
http://www.jeeare.com/v-tools/index.php
copy the chapter.txt in the box an choose the framerate you want.
hubble
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.