Chapters have inaccurate timestamps on all BD and UHD BD

Everything related to MakeMKV
Post Reply
Message
Author
alexantr
Posts: 4
Joined: Tue Nov 30, 2021 9:28 pm

Chapters have inaccurate timestamps on all BD and UHD BD

#1 Post by alexantr » Sun Dec 05, 2021 6:25 pm

Every Blu-ray and UHD Blu-ray I tested converts to mkv with inaccurate timestamps in chapters. Deviation is about 100-400 milliseconds in almost all chapters. Can this be fixed?

Some examples:

Blade Runner 2049 UHD Blu-ray

00020.mpls, chapters in MediaInfo:

Code: Select all

00:00:00.000 : Chapter 1
00:12:50.269 : Chapter 2
00:23:43.380 : Chapter 3
00:37:14.982 : Chapter 4
00:43:04.415 : Chapter 5
00:49:38.600 : Chapter 6
00:58:49.651 : Chapter 7
01:04:24.777 : Chapter 8
01:16:01.390 : Chapter 9
01:25:26.579 : Chapter 10
01:36:29.158 : Chapter 11
01:51:09.204 : Chapter 12
02:01:50.970 : Chapter 13
02:08:54.476 : Chapter 14
02:16:56.583 : Chapter 15
02:28:00.830 : Chapter 16
02:43:47.400 : Chapter 17
00020.mpls in "MKVToolNix GUI" Chapter editor:
mkvtoolnix-gui_2021-12-01_00-36-05.png
mkvtoolnix-gui_2021-12-01_00-36-05.png (23.18 KiB) Viewed 8301 times
MKV file from MakeMKV, chapters in MediaInfo:

Code: Select all

00:00:00.000 : en:Chapter 01
00:12:50.269 : en:Chapter 02
00:23:43.213 : en:Chapter 03
00:37:14.982 : en:Chapter 04
00:43:04.331 : en:Chapter 05
00:49:38.600 : en:Chapter 06
00:58:49.651 : en:Chapter 07
01:04:24.735 : en:Chapter 08
01:16:01.348 : en:Chapter 09
01:25:26.579 : en:Chapter 10
01:36:29.158 : en:Chapter 11
01:51:08.870 : en:Chapter 12
02:01:50.886 : en:Chapter 13
02:08:54.476 : en:Chapter 14
02:16:56.416 : en:Chapter 15
02:28:01.122 : en:Chapter 16
Timestamps in mkv don't match.

Twister 1996 Blu-ray

00000.mpls, chapters in MediaInfo:

Code: Select all

00:00:00.000 : Chapter 1
00:04:51.416 : Chapter 2
00:09:01.123 : Chapter 3
00:13:14.877 : Chapter 4
00:18:53.632 : Chapter 5
00:24:31.970 : Chapter 6
00:29:32.812 : Chapter 7
00:35:55.903 : Chapter 8
00:41:33.782 : Chapter 9
00:45:08.205 : Chapter 10
00:52:42.325 : Chapter 11
00:58:07.150 : Chapter 12
01:02:11.811 : Chapter 13
01:05:39.644 : Chapter 14
01:10:18.297 : Chapter 15
01:15:12.382 : Chapter 16
01:18:14.064 : Chapter 17
01:25:46.224 : Chapter 18
01:31:34.405 : Chapter 19
01:35:47.408 : Chapter 20
01:38:37.244 : Chapter 21
01:41:26.997 : Chapter 22
01:43:34.917 : Chapter 23
01:45:52.846 : Chapter 24
00020.mpls in "MKVToolNix GUI" Chapter editor:
mkvtoolnix-gui_2021-12-01_01-16-38.png
mkvtoolnix-gui_2021-12-01_01-16-38.png (33.4 KiB) Viewed 8301 times
MKV file from MakeMKV, chapters in MediaInfo:

Code: Select all

00:00:00.000 : en:Chapter 01
00:04:51.249 : en:Chapter 02
00:09:01.374 : en:Chapter 03
00:13:14.877 : en:Chapter 04
00:18:53.257 : en:Chapter 05
00:24:32.512 : en:Chapter 06
00:29:32.520 : en:Chapter 07
00:35:56.028 : en:Chapter 08
00:41:33.782 : en:Chapter 09
00:45:08.080 : en:Chapter 10
00:52:42.159 : en:Chapter 11
00:58:06.858 : en:Chapter 12
01:02:11.728 : en:Chapter 13
01:05:39.393 : en:Chapter 14
01:10:18.297 : en:Chapter 15
01:15:12.049 : en:Chapter 16
01:18:14.523 : en:Chapter 17
01:25:46.516 : en:Chapter 18
01:31:34.780 : en:Chapter 19
01:35:47.950 : en:Chapter 20
01:38:37.286 : en:Chapter 21
01:41:27.498 : en:Chapter 22
01:43:34.917 : en:Chapter 23
01:45:52.554 : en:Chapter 24
Timestamps in mkv don't match.

Angel Has Fallen UHD Blu-ray

00800.mpls, chapters in MediaInfo:

Code: Select all

00:00:00.000 : Chapter 1
00:06:48.950 : Chapter 2
00:15:08.157 : Chapter 3
00:23:13.809 : Chapter 4
00:28:35.714 : Chapter 5
00:39:39.627 : Chapter 6
00:45:33.564 : Chapter 7
00:50:56.053 : Chapter 8
00:59:23.393 : Chapter 9
01:06:50.881 : Chapter 10
01:16:25.872 : Chapter 11
01:24:11.046 : Chapter 12
01:30:14.409 : Chapter 13
01:37:42.064 : Chapter 14
01:44:54.538 : Chapter 15
01:51:08.119 : Chapter 16
02:01:03.089 : Chapter 17
00800.mpls in "MKVToolNix GUI" Chapter editor:
mkvtoolnix-gui_2021-12-01_00-25-16.png
mkvtoolnix-gui_2021-12-01_00-25-16.png (23.03 KiB) Viewed 8301 times
MKV file from MakeMKV, chapters in MediaInfo:

Code: Select all

00:00:00.000 : en:Chapter 01
00:06:48.616 : en:Chapter 02
00:15:07.948 : en:Chapter 03
00:23:13.767 : en:Chapter 04
00:28:35.380 : en:Chapter 05
00:39:39.627 : en:Chapter 06
00:45:33.439 : en:Chapter 07
00:50:56.053 : en:Chapter 08
00:59:23.017 : en:Chapter 09
01:06:50.715 : en:Chapter 10
01:16:25.581 : en:Chapter 11
01:24:10.879 : en:Chapter 12
01:30:14.409 : en:Chapter 13
01:37:42.064 : en:Chapter 14
01:44:54.454 : en:Chapter 15
01:51:08.119 : en:Chapter 16
Timestamps in mkv don't match.

dcoke22
Posts: 3106
Joined: Wed Jul 22, 2020 11:25 pm

Re: Chapters have inaccurate timestamps on all BD and UHD BD

#2 Post by dcoke22 » Tue Dec 07, 2021 1:09 am

I'm not aware of a way to edit the timestamps of chapters in MakeMKV. I think you'd have to do it after the fact with MKVToolNix or some other tool.

Out of curiosity, why does the discrepancy matter to you?

kyprime22
Posts: 16
Joined: Mon Sep 14, 2020 2:32 pm

Re: Chapters have inaccurate timestamps on all BD and UHD BD

#3 Post by kyprime22 » Wed Dec 08, 2021 1:01 pm

dcoke22 wrote:
Tue Dec 07, 2021 1:09 am
Out of curiosity, why does the discrepancy matter to you?
why is this a question? some people want to perserve things with 100% original integrity
I hate questions like this
it's called OCD, perfectionists, collectors etc. some people have a higher standard of procedure integrity, some people just rip a bluray disc, compress it to hell to 10% of the original size where they might as well have bought the dvd version and call it a day for their disc to digital collection
other people do a full 30~80+ gb copy and maintain it 1:1
why do original paintings cost more than 99.99% perfect copies? because it's not the 100% original, yes, it matters

Woodstock
Posts: 10332
Joined: Sun Jul 24, 2011 11:21 pm

Re: Chapters have inaccurate timestamps on all BD and UHD BD

#4 Post by Woodstock » Wed Dec 08, 2021 2:32 pm

Did you notice that MediaInfo is truncating to 3 decimal places?

The values shown in the MKVToolNix GUI match the Mediainfo values through the 3rd decimal digit, but continue on for 6 additional decimal digits.

dcoke22
Posts: 3106
Joined: Wed Jul 22, 2020 11:25 pm

Re: Chapters have inaccurate timestamps on all BD and UHD BD

#5 Post by dcoke22 » Wed Dec 08, 2021 3:01 pm

My question to you was not intended to pass judgement on your concern for the accuracy of chapter marker locations. I am genuinely curious if you have a use case or work flow where the accuracy matters.

I keep my original rips in all of their untranscoded, maximum bit rate glory. It has never occurred to me to verify that the chapter breaks are frame accurate between multiple tools. Even after reading your original post I find it doesn't bother me at all that there might be some variability in the chapter points.

Chapter break points are a construct of the medium… the director didn't worry about chapter break points while filming the movie or preparing it for theatrical release. I wonder how many directors even have any input into their location and number when a blu-ray is authored? This is a long winded way to say, in my view, chapter markers aren't part of the movie. They're a thing that comes with the blu-ray. The act of making a .mkv file throws away quite a lot of things that come with the blu-ray, because most of them are annoying and don't serve the film. That said, I prefer there to be chapter markers since they're handy in the rare instances of me needing to skip around in a movie.

alexantr
Posts: 4
Joined: Tue Nov 30, 2021 9:28 pm

Re: Chapters have inaccurate timestamps on all BD and UHD BD

#6 Post by alexantr » Thu Dec 09, 2021 12:22 pm

the director didn't worry about chapter break points while filming the movie
That's smart excuse :)

MakeMKV has the feature and it must works well with same accuracy like in audio and subtitles. This is my point.

Chapters can be truncated to 3 digits after point like MediaInfo shows if MKVToolNix's accuracy is difficult to implement. Mistake <1ms doesn't make sense because it much less than frame time. But mistake 400ms can look ugly when I jump to chapter and see small part of previous scene, for example.

jinx100
Posts: 157
Joined: Wed Mar 13, 2013 5:58 pm

Re: Chapters have inaccurate timestamps on all BD and UHD BD

#7 Post by jinx100 » Thu Dec 09, 2021 6:24 pm

It looks like MakeMKV drops an occasional video frame to maintain audio-video synchronization. See viewtopic.php?f=1&t=26683 , for example, which could explain the differences in chapter length. One frame at 24 fps is 42 msec.

Edit:

This is advertising my ignorance, but what determines time in an MKV file. I thought the audio stream has time markers but for variable frame rate, both audio and video would need time markers. What determines the chapter or video length? Is it the number of frames divided by fps or some time marker in the audio?

alexantr
Posts: 4
Joined: Tue Nov 30, 2021 9:28 pm

Re: Chapters have inaccurate timestamps on all BD and UHD BD

#8 Post by alexantr » Thu Dec 09, 2021 10:44 pm

mpls file contains full information about chapters. No matter what number of m2ts files it has.

Woodstock
Posts: 10332
Joined: Sun Jul 24, 2011 11:21 pm

Re: Chapters have inaccurate timestamps on all BD and UHD BD

#9 Post by Woodstock » Fri Dec 10, 2021 2:17 am

I thought the audio stream has time markers but for variable frame rate, both audio and video would need time markers. What determines the chapter or video length? Is it the number of frames divided by fps or some time marker in the audio?
I think it's PFM, myself. :)

jinx100
Posts: 157
Joined: Wed Mar 13, 2013 5:58 pm

Re: Chapters have inaccurate timestamps on all BD and UHD BD

#10 Post by jinx100 » Fri Dec 10, 2021 3:15 am

alexantr:

The chapter marker differences appear to be multiples of 0.041666... sec or one frame at 24 fps. If the chapter length changes to maintain audio-video synchronization, the chapter marker should also move so it still appears at a scene change.

Maybe this is Woodstock's magic.

alexantr
Posts: 4
Joined: Tue Nov 30, 2021 9:28 pm

Re: Chapters have inaccurate timestamps on all BD and UHD BD

#11 Post by alexantr » Fri Dec 10, 2021 8:25 am

What determines the chapter or video length? Is it the number of frames divided by fps or some time marker in the audio?
I found some information about mpls structure. Time offsets and durations are measured in 45000ths of a second. There is no relation to video or audio.
I still think that MakeMKV just has some mistakes in time calculation and they can be fixed.

Post Reply