Log in

View Full Version : [DDVT Tool] Dolby Vision RPU Demuxing / Injecting / Editing.


Pages : 1 2 3 4 5 [6] 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

Balling
8th August 2022, 00:12
First off, I did not mention conversion. It's simply possible to have same program from two different framerate sources.



Even when changing 23.976 <--> 24 framerate, I don't understand why framedropping would come into play. Where would they be dropped? Just rewriting timestamps would keep native frames and same framecount.
Framedropping as I understand it, is skipping certain SMPTE timecodes to keep up with time. Since they merely refer to frames, skipping them will not skip the frames themselves.

But maybe I'm hugely misinterpreting your post and/or missing something.

You are thinking about drop-frame timecode (DF), no one uses it anymore, because it is inaccurate and accumulates one frame every 9 hours 15 minutes. Not quite like 41 seconds, but still, so timecodes are not the only thing being dropped. https://en.wikipedia.org/wiki/SMPTE_timecode It happens because it assumes 29.97 instead of 30/1.001.

"why framedropping would come into play" you need to drop actual video frames because there is no simple way to convert between /1.001 and not without a GPU farm. Imagine a display that is 24.000/1.001 and your display 24.000 on it. In fact it was a crazy problem in Apple 4K TV (that was fixed, every display supports both, it is mandated). You can read about it here: https://en.wikipedia.org/wiki/24p

"Just rewriting timestamps would keep native frames and same framecount"

That would desync audio and subtitles that is why it is not done. Hollywood converts by using smearing on 10 frames. Also, as I said there is still only one true framerate (24.000) that is synced to real clock out there. Imagine a video scene with a ticking clock. Haha.

NeverExists
8th August 2022, 04:20
Do you want to get the RPU from a WEB-DL source and inject it into a BluRay? If that's what you want to do I'd recommend using djv, which can show a video frame-by-frame. What I do is open one file in djv, find a scene transition and note the frame number, then open the other file and find the corresponding frame number. This gives me the delay, which I then use in the DDVT injector tool.

DJV is?

GodzilaAvenger
8th August 2022, 05:04
DJV (https://darbyjohnston.github.io/DJV/)

von Suppé
8th August 2022, 09:42
@GodzilaAvenger

Clear. Thanks for explaining.

The file below contains a sample of both the source (remux) and re-encode files. Please let me know if either triggers DV on your player, thanks!
Will do and let you know. Thanks.

von Suppé
8th August 2022, 10:05
@Balling

I think you're missing the point. Note what my initial question was: is cross-using 23.976 RPU for 24 fps video and vice versa possible? Answer: RPU works with framenumbers, so yes. So no need to change framerate.

As for your introduction to conversion and the framedropping:
"why framedropping would come into play" you need to drop actual video frames
I disagree, it isn't needed at all. Eventhough dropping/doubling videoframes can be applied to change framerate, it is not necessary in many cases.
And in the light of my initial question, this way would even defy its own purpose; RPU and video would grow out of sync.

because there is no simple way to convert between /1.001

Yes, there is: rewriting timestamps :)

"Just rewriting timestamps would keep native frames and same framecount"

That would desync audio and subtitles that is why it is not done.

Actually, "sync" is the exact reason why it is done. A lot of people convert video 24 <--> 23.976 by rewriting timestamps. Not to get out of sync with its native audio, but to get in sync with other.
As an example, imagine having a TrueHD + Atmos track from a 24 fps source and a desired videotrack from a 23.976 source. No way you can speed-down Atmos while keeping Atmos format (with freeware, that is). But if you'd instead speed-up the video by rewriting timestamps, it can sync to the native Atmos track.
As for subs, that's a no-brainer. They can be resynced in the blink of an eye.

If you introduce framerate conversion; for RPU there's no need. You might have considered the reason why anybody would do such anyway.

von Suppé
8th August 2022, 10:14
Open Base Layer file/Container with the Injector. If the Injector found the EL.hevc file you have a new option to mux the MEL/FEL Layer into your Base Layer Stream.
Didn't know this. New to me. Interleaving BL and EL I always did manually with dovitool cli. Thanks for the heads-up.

Differences between Standard and makeMKV:

--eos-before-el Write the EOS/EOB NALUs before the EL. Defaults to false.
This flag enables the same behaviour as MakeMKV and yusesope's mux script.
Enabling this therefore results in identical output using dovi_tool.
What would be a specific reason to use either of the two? Can you give an example?

von Suppé
8th August 2022, 11:18
The file below contains a sample of both the source (remux) and re-encode files. Please let me know if either triggers DV on your player, thanks!

Both files don't trigger DV playback. Playback is jerky and displays dropouts.
MediaInfo shows variable framerate and weird framerate number. Maybe something went wrong?

GodzilaAvenger
8th August 2022, 14:33
Both files don't trigger DV playback. Playback is jerky and displays dropouts.
MediaInfo shows variable framerate and weird framerate number. Maybe something went wrong?

Thanks for checking them out. You are absolutely right, MediaInfo does show the frame rate for both variable and at 2000+. The original files (remux and encode) have constant 23.976 frame rate so I think this has something to do with LosslessCut that I used for making the clips.

Either way, I uploaded the entire encoded file below (remux was way too big), so check it out if you like, and thanks!

Encode (https://drive.google.com/file/d/1ti4XrwHpg-l_rJ7BZVl6p-B9VllFobdv/view?usp=sharing)

von Suppé
8th August 2022, 21:10
Your file does not trigger DV on my player. It falls back to HDR10, which playback is fine.
MediaInfo looks okay though. Weird.

GodzilaAvenger
8th August 2022, 21:30
Thanks for letting me know. Guess I'll just keep my remuxes until I can figure out how to properly encode both layers. Big waste of disk space though.

GodzilaAvenger
8th August 2022, 21:33
One more question, how should the RPU borders (top & bottom ones) be set on files where the aspect ratio changes (i.e. IMAX releases)? Is it the bigger margin (i.e. ~276px) or smaller one (i.e. ~42px)?

von Suppé
8th August 2022, 22:58
Interesting question. Since RPU is dynamic, you'd think L5 values would change throughout the movie.
I don't think I have a DV video with different aspect ratios. If you would have one, you can check & compare L5 data for different frame numbers with dovi_tool.

I wouldn't know how to edit L5 values for certain parts of video. Hopefully other users can explain how/if this can be done.

NeverExists
8th August 2022, 23:13
DJV (https://darbyjohnston.github.io/DJV/)

Thanks a lot that program works very well.

GodzilaAvenger
8th August 2022, 23:29
Interesting question. Since RPU is dynamic, you'd think L5 values would change throughout the movie.
I don't think I have a DV video with different aspect ratios. If you would have one, you can check & compare L5 data for different frame numbers with dovi_tool.

I wouldn't know how to edit L5 values for certain parts of video. Hopefully other users can explain how/if this can be done.

Thanks, I have a few that I can test on. DDVT asks for RPU cropping values when injecting an RPU.bin file and it always confused me what to do for these kinds of videos.

quietvoid
9th August 2022, 01:12
Thanks, I have a few that I can test on. DDVT asks for RPU cropping values when injecting an RPU.bin file and it always confused me what to do for these kinds of videos.

If you don't want to find every scene where the aspect ratio changes, use the smallest letterbox size.

GodzilaAvenger
9th August 2022, 01:21
So that's the same as the biggest aspect ratio (i.e. biggest border like ~276px), right? (sorry if it's a dumb question, just want to make sure)

quietvoid
9th August 2022, 01:34
So that's the same as the biggest aspect ratio (i.e. biggest border like ~276px), right? (sorry if it's a dumb question, just want to make sure)

No, the opposite. The smallest border.

NeverExists
9th August 2022, 01:39
Another Question. When I drop the Web-Dl on the demuxer, should I be converting it to 8.1? If so why does it say HDR if we are trying to make a hybrid? Wouldn't converting it to HDR lose some of the metadata? I'm trying to make Hybrids with the Web-dl rpu and Bluray release. I mean I've done a few and the end result has been 8.06 Dolby Vision which is what I want.

GodzilaAvenger
9th August 2022, 01:51
No, the opposite. The smallest border.

Got it, thanks! :)

GodzilaAvenger
9th August 2022, 07:09
Another Question. When I drop the Web-Dl on the demuxer, should I be converting it to 8.1? If so why does it say HDR if we are trying to make a hybrid? Wouldn't converting it to HDR lose some of the metadata? I'm trying to make Hybrids with the Web-dl rpu and Bluray release. I mean I've done a few and the end result has been 8.06 Dolby Vision which is what I want.

I think the HDR means that Profile 8.1 is backwards compatible with HDR10, same for 8.4 which is backwards compatible with HLG.

von Suppé
9th August 2022, 08:13
I have a few that I can test on.
Can you name the titles?


If you don't want to find every scene where the aspect ratio changes...

And what if I want to do just that? How to go further once having determined the frame-ranges and their proper offsets?
Is there a tutorial somewhere on how to edit L5 for parts of video?

-QfG-
9th August 2022, 08:36
What would be a specific reason to use either of the two? Can you give an example?

Ask quietvoid what happenend if you switch

--eos-before-el Write the EOS/EOB NALUs before the EL. Defaults to false.

to True. I have only build in this option in the DDVT tool and i never use this.

Do you want to get the RPU from a WEB-DL source and inject it into a BluRay? If that's what you want to do I'd recommend using djv, which can show a video frame-by-frame. What I do is open one file in djv, find a scene transition and note the frame number, then open the other file and find the corresponding frame number. This gives me the delay, which I then use in the DDVT injector tool.

Also you can use MeGui for this. You found MeGui here in the Forum. A little "how to do video" is here:
https://www.youtube.com/watch?v=gVZL1vwXFAg

Is there a tutorial somewhere on how to edit L5 for parts of video?
create a custom.json for this and copy this file near the video. If you start the INJECTOR, the Injector used this file BEFORE all inline settings will be set.
For example, you must delay a video 10 frames, but you will crop only few frames in the video and you use a custom.json for this (only for the crop function), the INJECTOR will first edit the frames from the custom.json and after this the delay will be set. A custom.json for crop frame 10 - 20* :

*Attention. In quietvoids tool is the first frame Frame 0! Some video editors tags first frame to frame 1. Check this before you set the frames here.

{
"active_area": {
"presets": [
{
"id": 0,
"left": 0,
"right": 0,
"top": 10,
"bottom": 10
}
],
"edits": {
"9-19": 0
}
}
}

Untestet, but i think it work so.

von Suppé
9th August 2022, 09:58
Nice, I'm gonna try things out. Conveniently VirtualDub also starts frame-count with 0.

As border-changes can take place several times,
can you tell up front if that specific code can be entered multiple times in one custom.json file?

Thanks a bunch anyways, -QfG- :)

quietvoid
9th August 2022, 13:32
What would be a specific reason to use either of the two? Can you give an example?

https://forum.makemkv.com/forum/viewtopic.php?f=12&t=18602&p=121961#p121961
tl;dr it only has an effect on the last frame, unless the title uses seamless branching.
Doesn't really matter but leaving the flag default is correct.

As border-changes can take place several times,
can you tell up front if that specific code can be entered multiple times in one custom.json file?

I don't really understand what you're asking. Preset IDs can be reused for multiple edits in the same JSON.

von Suppé
9th August 2022, 16:00
I don't really understand what you're asking. Preset IDs can be reused for multiple edits in the same JSON.

I think you answered my question partly --> "multiple edits in the same json file". But how to to that in code.

In -QfG-'s example L5 is set 10 bottom and 10 top for frames 9-19.
But how would that code look like, if I also want to set L5 offsets 280 top and 280 bottom for - let's say - frames 200-250?

GodzilaAvenger
9th August 2022, 16:01
Can you name the titles?

Off the top of my head Aquaman, The Dark Knight, The Dark Knight Rises, some older Marvel titles that aren't shot entirely in IMAX like Iron Man, Civil War, Black Widow, Eternals (as opposed to like Infinity War, Endgame, Shang-Chi, and Multiverse of Madness). If you want something truely challenging go with Everything Everywhere All at Once, the aspect ratio is just all over the place!


And what if I want to do just that? How to go further once having determined the frame-ranges and their proper offsets?
Is there a tutorial somewhere on how to edit L5 for parts of video?

I don't really understand what you're asking. Preset IDs can be reused for multiple edits in the same JSON.

So something like this?

{
"active_area": {
"presets": [
{
"id": 0,
"left": 0,
"right": 0,
"top": 10,
"bottom": 10
},
{
"id": 1,
"left": 0,
"right": 0,
"top": 276,
"bottom": 276
}
],
"edits": {
"9-19": 0,
"49-69": 1
}
}
}

BTW dovi_tool is amazing, thanks for creating it!

von Suppé
9th August 2022, 16:08
Ah, I was 3 seconds faster than you, GodzilaAvenger :-)

I have The Dark Night, so I can go check it out. Thanks for the script, it's getting more clear. I'm a total newbie to this.
Can you also provide an example for when there is more than one framerange that have same offsets?

GodzilaAvenger
9th August 2022, 16:35
Ah, I was 3 seconds faster than you, GodzilaAvenger :-)

:)

I have The Dark Night, so I can go check it out. Thanks for the script, it's getting more clear. I'm a total newbie to this.
Can you also provide an example for when there is more than one framerange that have same offsets?

I guess it would be something like this:

{
"active_area": {
"presets": [
{
"id": 0,
"left": 0,
"right": 0,
"top": 10,
"bottom": 10
},
{
"id": 1,
"left": 0,
"right": 0,
"top": 276,
"bottom": 276
}
],
"edits": {
"9-19": 0,
"49-69": 1,
"219-269": 0
}
}
}

I think overall the presets determine the L5 configs you want to use, the edits determine what frames each config applies to.

von Suppé
10th August 2022, 09:16
I think overall the presets determine the L5 configs you want to use, the edits determine what frames each config applies to.
Yeah, I think I'm getting it. Will play around and gonna try things out.

Thinking of it, I wonder how -QfG- injector would pipe this further. I assume that RPU itself wil be edited by the dovi_tool.exe.
In which case, do you perhaps know how dovitool's "RPU edit" basic commandline would look like? Say, with "RPU.bin" as input and using "custom.json" for the edits?

Thanks a bunch for your highly educating examples, GA.

GodzilaAvenger
10th August 2022, 14:42
Yeah, I think I'm getting it. Will play around and gonna try things out.

Thinking of it, I wonder how -QfG- injector would pipe this further. I assume that RPU itself wil be edited by the dovi_tool.exe.
In which case, do you perhaps know how dovitool's "RPU edit" basic commandline would look like? Say, with "RPU.bin" as input and using "custom.json" for the edits?

Thanks a bunch for your highly educating examples, GA.

You are very welcome! I have not tried this personally yet, but based on what @quietvoid and @-QfG have said and dovi_tool's documentation, I think this is how things work:

Let's say you have a file where most scenes have a standard AR (3840x1608), two have IMAX AR (3840x2076), and one is something in between (3840x1960). Then your "custom.json" file which is located next to your "RPU.bin" would look something like this:

{
"mode": 0,
"active_area": {
"presets": [
{
"id": 0,
"left": 0,
"right": 0,
"top": 276,
"bottom": 276
}
{
"id": 1,
"left": 0,
"right": 0,
"top": 42,
"bottom": 42
}
{
"id": 2,
"left": 0,
"right": 0,
"top": 100,
"bottom": 100
}
],
"edits": {
"all": 0,
"1000-1234": 1,
"2400-2468": 2,
"4800-4848": 1
}
}
}

You can then use the following command to edit your RPU:

dovi_tool editor -i RPU.bin -j custom.json -o Edited_RPU.bin

What this essentially does is to first assign the default AR L5 borders to all frames, then overwrite it for the frames specified. From what @-QfG- has said, I think if you have a "custom.json" file directly next to the "RPU.bin" file, when using DDVT_INJECTOR the tool first edits the RPU (using the dovi_tool command above) and then injects it into the mkv.

von Suppé
10th August 2022, 20:40
Very nice to learn the default for "all" and overwrite later.
Thanks again. I'm learning as I read and will try it all out. Have busy times ahead :)

I noticed "mode": 0, in the beginning. You know what it does? It's not in the earlier codes I read.

GodzilaAvenger
10th August 2022, 23:14
I noticed "mode": 0, in the beginning. You know what it does? It's not in the earlier codes I read.

Based on this (https://github.com/quietvoid/dovi_tool), it determines whether any conversion needs to be done, mode 0 parses the RPU and rewrites it untouched.

von Suppé
11th August 2022, 08:21
Could have rung a bell. Didn't realise it was meant as the same "mode" argument when extracting.

In the meantime I also "discovered" quietvoid's editor.md and the examples at GitHub. Never was aware. Terrible... :stupid:

Cheers, GA

Grimm
13th August 2022, 08:32
Please add the option to save the output file to another location

Lucius Snow
13th August 2022, 17:58
Hi -QfG- and thanks for this great tool.

As the HDR10+ contains tone mapping at 400 nits or 500 nits only, is your tool able to convert to Dolby Vision RPU with others profiles such as SDR 100 nits tone-mapping data?

quietvoid
13th August 2022, 19:31
As the HDR10+ contains tone mapping at 400 nits or 500 nits only, is your tool able to convert to Dolby Vision RPU with others profiles such as SDR 100 nits tone-mapping data?

Converting HDR10+ to Dolby Vision isn't supported.

-QfG-
13th August 2022, 20:52
Please add the option to save the output file to another location

Will add this in the next Update.

Lucius Snow
13th August 2022, 22:59
Converting HDR10+ to Dolby Vision isn't supported.
I was talking about the metadatas (JSON to RPU).

-Convert HDR10+ Metadata to DoVi Metadata (Experimental).

What about the tone mapping?

quietvoid
14th August 2022, 00:00
I was talking about the metadatas (JSON to RPU).
What about the tone mapping?

The HDR10+ tone mapping curve isn't mapped to Dolby Vision.
Only the frame brightness analysis is copied to the RPU.

Balling
14th August 2022, 13:30
@Balling

Actually, "sync" is the exact reason why it is done. A lot of people convert video 24 <--> 23.976 by rewriting timestamps. Not to get out of sync with its native audio, but to get in sync with other.
As an example, imagine having a TrueHD + Atmos track from a 24 fps source and a desired videotrack from a 23.976 source. No way you can speed-down Atmos while keeping Atmos format (with freeware, that is). But if you'd instead speed-up the video by rewriting timestamps, it can sync to the native Atmos track.
As for subs, that's a no-brainer. They can be resynced in the blink of an eye.

If you introduce framerate conversion; for RPU there's no need. You might have considered the reason why anybody would do such anyway.

Correct :)

Grimm
14th August 2022, 14:11
Will add this in the next Update.

Great thanks

von Suppé
15th August 2022, 15:16
Ok, think I managed to edit L5 to proper values for all frameranges of the movie "Interstellar". Wow, this sweety switches aspect ratio 125 times (!) if my count is right. Where a lot of switches happen after just a few seconds of each other. Quite some work...

Anyways, I had to apply a delay. Which of course went fine with -QfG- injector.
Reading the editor.md, am I right when assuming the "duplicate" and "remove" arguments are used for applying positive and negative delay?
Or is there a true "delay" argument? I couldn't find such at the editor examples.

quietvoid
15th August 2022, 15:25
Reading the editor.md, am I right when assuming the "duplicate" and "remove" arguments are used for applying positive and negative delay?
Or is there a true "delay" argument? I couldn't find such at the editor examples.

There's only duplicate and remove, so it's probably using them to delay.

von Suppé
15th August 2022, 15:44
Excellent. Thanks, quietvoid.

Fortune
15th August 2022, 16:06
Thanks for the great tool. I am very new to this and have a simple question.
How can i see all the frame info for the RPU for a particular movie?
Currently I use the DDVT_FRAMEINFO but this tool is only for a specific frame. Is there a way for it to ouput all frames?
Reason being I wish to see the active area for films that have changing active areas. Like for Aquaman.
Thanks in advance.

GodzilaAvenger
15th August 2022, 19:07
Ok, think I managed to edit L5 to proper values for all frameranges of the movie "Interstellar". Wow, this sweety switches aspect ratio 125 times (!) if my count is right. Where a lot of switches happen after just a few seconds of each other. Quite some work...

Anyways, I had to apply a delay. Which of course went fine with -QfG- injector.
Reading the editor.md, am I right when assuming the "duplicate" and "remove" arguments are used for applying positive and negative delay?
Or is there a true "delay" argument? I couldn't find such at the editor examples.

I did this for Civil War yesterday, which thankfully only had one IMAX scene so it was much much easier. My RPU was out of sync with the movie (it needed to be delayed by 2 frames). Here's what I did (for simplicity assume the IMAX frames where from 1000 to 2000):

1. Created a custom.json file with the L5 metadata next to the RPU.bin file, something like this:

{
"mode": 0,
"active_area": {
"crop": false,
"presets": [
{
"id": 0,
"left": 0,
"right": 0,
"top": 280,
"bottom": 280
},
{
"id": 1,
"left": 0,
"right": 0,
"top": 69,
"bottom": 69
}
],
"edits": {
"all": 0,
"1000-2000": 0,
}
}
}

2. Since DDVT_INJECTOR first applies the custom.json file, then the delay, I shifted the frame range values by 2, so something like this:

{
"mode": 0,
"active_area": {
"crop": false,
"presets": [
{
"id": 0,
"left": 0,
"right": 0,
"top": 280,
"bottom": 280
},
{
"id": 1,
"left": 0,
"right": 0,
"top": 69,
"bottom": 69
}
],
"edits": {
"all": 0,
"998-1998": 0,
}
}
}

Then, I used DDVT_INJECTOR and for delay entered 2. It did the rest of the work. I checked afterwards and everything was accurate, i.e. frames 1000 to 2000 had the IMAX L5 borders.

GodzilaAvenger
15th August 2022, 19:13
Thanks for the great tool. I am very new to this and have a simple question.
How can i see all the frame info for the RPU for a particular movie?
Currently I use the DDVT_FRAMEINFO but this tool is only for a specific frame. Is there a way for it to ouput all frames?
Reason being I wish to see the active area for films that have changing active areas. Like for Aquaman.
Thanks in advance.

Use DDVT_DEMUXER to extract the RPU.bin file, then go to the tools folder and use dovi_tool export, i.e.

cd tools
./dovi_tool export [args]

(populate [args] with the proper arguments). This will convert RPU.bin into a .json file which you can view in a text editor.

On a side note, DDVT_FRAMEINFO seems to extract RPU.bin from the .mkv file each time it is called, which can be time-consuming. Instead you can use DDVT_DEMUXER to extract the RPU.bin file once and then use dovi_tool info to get information about a specific frame.

von Suppé
16th August 2022, 08:19
2. Since DDVT_INJECTOR first applies the custom.json file, then the delay, I shifted the frame range values
Damn, I think this is where I went wrong. My end result doesn't look good. Border changes clearly aren't in sync. I applied 24 frames delay but the framerange edits were already from target video.
I extracted the endresult RPU and checked some frame-infos. Indeed they shifted 24 frames. Like 100-150 was adjusted to 124-174.

No way I'm gonna manually edit my json. Gonna figure out how dovitool.exe "duplicate" argument works and first try to only apply delay. After which I'll use the "delay-corrected RPU" as input for the json L5 edits. Learning as I get by...

Thanks, GodzilaAvenger. You saved the day once again! :)

GodzilaAvenger
16th August 2022, 09:05
Damn, I think this is where I went wrong. My end result doesn't look good. Border changes clearly aren't in sync. I applied 24 frames delay but the framerange edits were already from target video.
I extracted the endresult RPU and checked some frame-infos. Indeed they shifted 24 frames. Like 100-150 was adjusted to 124-174.

No way I'm gonna manually edit my json. Gonna figure out how dovitool.exe "duplicate" argument works and first try to only apply delay. After which I'll use the "delay-corrected RPU" as input for the json L5 edits. Learning as I get by...

Thanks, GodzilaAvenger. You saved the day once again! :)

Always a pleasure :)

One thing you could do is extract the RPU using the DEMUXER, apply the delay when using the INJECTOR to get it in sync with the movie (no custom.json for now, borders are set in the next step), extract the new RPU using the DEMUXER, this time using INJECTOR with 0 delay along with custom.json.

To get the RPU in sync with the movie, I usually use dovi_tool info on that RPU to look at values for "max_pq", i.e. something like this
dovi_tool.exe info -i RPU.bin -f 1000 | Select-String "max_pq"
"max_pq" is usually set scene-by-scene, so I look for two consecute frames where it changes, and correspond that with a cut (scene transition) in the film. This gives me the delay.

Finally, note that dovi_tool is 0-based, i.e. the first frame is numbered 0.

quietvoid
16th August 2022, 12:17
"max_pq" is usually set scene-by-scene, so I look for two consecute frames where it changes, and correspond that with a cut (scene transition) in the film.

Normally you can just look at if `scene_refresh_flag` is equal to 1, indicating a scene cut.
There's another script from someone at MakeMKV that can extract the scene cuts, as well.