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

GodzilaAvenger
12th September 2023, 19:34
I'm not sure if this thread is the right place to ask this question, as it doesn't deal with either subtitles or mp4box. You'd probably have better luck searching the forum or creating a new post.

Yosho
13th September 2023, 02:49
I'm not sure if this thread is the right place to ask this question, as it doesn't deal with either subtitles or mp4box. You'd probably have better luck searching the forum or creating a new post.
Oh, I see. I had thought this section was for the tool discussion, and help.

Arkana
13th September 2023, 05:43
How do I add borders?

Atlantis
13th September 2023, 17:27
When injecting what is "Match L6 Metadata Change L6 Metadata to match Video"? Should it be yes or no?

GodzilaAvenger
13th September 2023, 19:07
It matches the RPU's L6 values to those of the video, which you can find using MediaInfo. I remember quietvoid saying L6 values don't really matter and I've also seen a lot of files just have it be set to 0 (the MaxCLL and MaxFALL values), so do with it as you please.

Atlantis
13th September 2023, 19:16
I really like Dolby Vision, it seems like nothing matters in the settings, nothing you do can make it go wrong! :)

GodzilaAvenger
13th September 2023, 22:19
:)
Most of the time only L1 & L2 matter. L5 also matters if your playback device looks for it.

dkangel
20th September 2023, 17:06
hello everybody
sorry for my bad english but it's not my native langage.
i have 2 files. one is DV 23.76fps and one is hdr 24fps with exactly the same frames.
the 24 fps have french langage so i would like to import DV into this file.
i read the previous thread and some guys says that the DV is not FPS dependent so i can just use it with dvtools hybrid.
but why is there an option to convert fps in hybrid script ?
thank you

von Suppé
21st September 2023, 05:22
It is true that RPU works with framenumbers and framerate does not matter.
The option to change framerate may come in handy for e.g. cases where you want to be able to sync video with a certain audiotrack that comes from another source with a different framerate. Especially where you can't stretch/shrink the audio, such as Atmos (at least, not with freeware). I've done it several times to sync 24 fps (DoVi or not) video to 23.976 audio or vice versa.

I've never used this option in QfG's script as I always rewrite timestamps for HEVC streams manually with a ffmpeg.exe commandline. I'm educationally guessing QfG would make use of this too in his script. Maybe he cares to confirm.

dkangel
21st September 2023, 15:54
oh thank you for your answer, it's more clear for me. :)

but if i understand you correctly, it's possible to change fps of a video without recoding ?

Atlantis
21st September 2023, 19:01
Of course, but the audio goes out of sync. You have to re-encode the audio.

dkangel
21st September 2023, 19:56
ok i understand.
thank you very much

von Suppé
22nd September 2023, 08:30
...I always rewrite timestamps for HEVC streams manually with a ffmpeg.exe commandline. I'm educationally guessing QfG would make use of this too in his script. Maybe he cares to confirm.


I think my guess is right. Not having parsed the whole script, I did find the "-bsf:v hevc_metadata=tick_rate=" argument in the DDVT_HYBRID.cmd script.


Should you want to manually change framerate of a hevc stream, here's two examples. Create a .cmd file with Notepad and type following string for rewriting timestamps for "23.976" fps:

ffmpeg -i input.hevc -c copy -bsf:v hevc_metadata=tick_rate=(24000/1001):num_ticks_poc_diff_one=1 output.hevc


For 24 fps type:

ffmpeg -i input.hevc -c copy -bsf:v hevc_metadata=tick_rate=24:num_ticks_poc_diff_one=1 output.hevc


Where obviously "input.hevc" is the source-stream and "output.hevc" will be the result. Put the cmd file with a copy of ffmpeg.exe in same folder where input-stream is and run.

-QfG-
24th September 2023, 20:57
but why is there an option to convert fps in hybrid script ?

Simply for dubbing. I'm from Germany and i must dub sometimes US movies. If i have a German BD with 24 FPS, but the Hybrid stream is 23,976 fps, i change the fps of the stream.
This function is not needed to adjust DV timestamps.

Atlantis
25th September 2023, 01:08
Is it possible to convert those strange purple looking Dolby Vision files to DV that is compatible with HDR?
Dolby Vision, Version 1.0, dvhe.05.06, BL+RPU

GodzilaAvenger
25th September 2023, 07:42
They use different color spaces, so the practical answer is no. Look at earlier posts for more info.

Atlantis
25th September 2023, 14:00
I can't read 720 posts! But it was so easy. You don't need to know anything to do Dolby Vision! Extracted the RPU and added it to an HDR version. Nothing goes wrong with DV!

von Suppé
25th September 2023, 17:15
I'd say much can go wrong with Dolby Vision. I made quite a bunch of mistakes in the beginning. Goes with learning.

Atlantis
25th September 2023, 17:33
I mean for us the simple users using the Dolby_Vision_Tool. It's so well written. It proposes all the correct settings by default.

GodzilaAvenger
25th September 2023, 19:26
I tend to agree with von Suppè, you can easily screw up DV if your RPU isn't synced with your file, e.g. when RPU is from a WEB-DL source and you add it to a Blu-ray, which causes weird flashes; or you can set the L5 wrong which (if your playback device cares for it) crops in too much.

Atlantis
25th September 2023, 19:26
I didn't use the DDVT_HYBRID.

Extracted the RPU from DV and added it to an HDR version.

Does DDVT_HYBRID do something more, or using DDVT_DEMUXER and DDVT_INJECTOR is enough?

(I obviously frame check to see that the versions match frame by frame)

GodzilaAvenger
25th September 2023, 21:06
As far as I know hybrid is just demuxer and injector rolled into one, for convenience. Demuxes RPU from one file and injects into another.

Fuso
27th September 2023, 09:02
Is there a way to implement also DoVi baker, for combining the FEL from P7 with the base HDR?

von Suppé
27th September 2023, 15:27
Is there a way to implement also DoVi baker, for combining the FEL from P7 with the base HDR?
Would you care to explain what "DoVi baker" is? Never heard of the term.

dkangel
27th September 2023, 16:30
Simply for dubbing. I'm from Germany and i must dub sometimes US movies. If i have a German BD with 24 FPS, but the Hybrid stream is 23,976 fps, i change the fps of the stream.
This function is not needed to adjust DV timestamps.

Thank you for your explanation. I understand it's better to change fps of the video without recoding than recoding audio.

GodzilaAvenger
28th September 2023, 00:01
Would you care to explain what "DoVi baker" is? Never heard of the term.

DoViBaker adds the EL information into the BL, essentially turning P7 into P8 without fully discarding the EL. At least that's what I think it does based on its GitHub repo.

-QfG-
5th October 2023, 22:04
v0.61 Online!

-v0.61
*Minor Bugfixes
*Some changes in scripts layout
*RENAMED Script Frameinfo.cmd to Fileinfo.cmd
Support for plotting DV / HDR10+ metadata graphs to png picture file.
If u use shell extensions start Options.cmd and reset Shell Extensions!
*Updated mkvtoolnix to v 79.0.0.0.

https://i.imgur.com/7IEDyAgh.png

EDIT v0.61a Online, some bugfixes.

von Suppé
6th October 2023, 11:16
Support for plotting DV / HDR10+ metadata graphs to png picture file.

Excellent addition, QfG.

A DoVi power user @ the MakeMKV forums has provided significant information on cases under what conditions certain RPU can or should not not be injected into BD video because of brightness expansion through FEL. Surely there are DoVi (Gung Ho) adventurers here that may appreciate it.

Hopefully you don't mind me putting up the link:

https://docs.google.com/spreadsheets/d/1jBIGF8XTVi9VmDBZ8a5hEyongYMCDlUiLHU9n1f_S74/edit#gid=0

dkangel
6th October 2023, 21:17
Thanks for the update but i don't see the hybrid shorcut anymore...

-QfG-
6th October 2023, 21:55
Hybrid Shortcut works only on background. Don't target a file an click the right button.

dkangel
6th October 2023, 22:04
Hybrid Shortcut works only on background. Don't target a file an click the right button.

ok thank you :)

dkangel
6th October 2023, 22:29
i have one more question

what would be the easy way to convert a profile 7 to profile 8 ?

-QfG-
6th October 2023, 23:06
V0.61.1 Online!

-v0.61.1
*Minor Bugfixes
*ADDED Video Bitrate Plotter in FILEINFO Script.
*ADDED MediaInfo File Writer in FILEINFO Script.

https://i.imgur.com/pnmaCwOh.png

what would be the easy way to convert a profile 7 to profile 8 ?

Use <DDVT_DEMUXER> Script if u will demux only the RPU in Profile 8 from Profile 7 Single Layer File
Use <DDVT_HYBRID> Script if you have a target movie. First place your target movie in the first HDR section and the DV P7 Movie in the secondary DV section.

dkangel
6th October 2023, 23:17
in fact i would like to convert a profile 7 file to profile 8 to gain space, i don't need the FEL

i will try your solution

thank you

-QfG-
7th October 2023, 08:58
P8 is always a DV profile without EL (FEL/MEL) and have only the RPU (Dynamic Metadata).

dkangel
8th October 2023, 12:41
yes i understand that.

it seems that a lot of player can't read FEL so profile 8 is enough for me
i have a shield

GodzilaAvenger
9th October 2023, 05:49
V0.61.1 Online!

-v0.61.1
*Minor Bugfixes
*ADDED Video Bitrate Plotter in FILEINFO Script.
*ADDED MediaInfo File Writer in FILEINFO Script.

Use <DDVT_DEMUXER> Script if u will demux only the RPU in Profile 8 from Profile 7 Single Layer File
Use <DDVT_HYBRID> Script if you have a target movie. First place your target movie in the first HDR section and the DV P7 Movie in the secondary DV section.

When I tried using the FILEINFO script it errored out, saying "RPU_[All Frames Info].json Error". I noticed that the .json files where generated, but at the DDVT root folder instead of the RPU folder. A new folder named "SAME AS SOURCE" also popped up in the DDVT root folder.

-QfG-
9th October 2023, 06:06
-v0.61.2
*Minor Bugfixes
*FIXED FFPROBE Bug with UAC On.

When I tried using the FILEINFO script it errored out, saying "RPU_[All Frames Info].json Error". I noticed that the .json files where generated, but at the DDVT root folder instead of the RPU folder. A new folder named "SAME AS SOURCE" also popped up in the DDVT root folder.

Fixed with v. 0.61.2

GodzilaAvenger
9th October 2023, 07:56
It doesn't seem to work with v0.61.2 either. I got it working by adding "!INPUTFILEPATH!" in front of !INPUTFILENAME! on lines 558, 567, 580, and 581.

-QfG-
9th October 2023, 08:53
Hmmmm it looks so if the script ignore the "pushd %~dp1" function. Will fix this ;).

EDIT:
--v0.61.3
*Updated dovi_tool to v2.1.0.
*Minor Bugfixes
*REMOVED Crop Check function in DEMUXER script.
*ADDED Crop Check function in FILEINFO script.
*ADDED SCENECUTS option in FILEINFO script without extracting ALL frames.

Try v0.61.3 :D

NeverExists
17th October 2023, 02:01
Hi, What is this FILEINFO script and how do we access it?

von Suppé
17th October 2023, 09:18
It's for retrieving certain informations of a video- and/or RPU file. You can also use it for getting FRAMEINFO, which script was in earlier packages.

Just drag & drop a file on DDVT_FILEINFO.cmd and it'll opt for several actions which are pretty self-explanatory.

von Suppé
18th October 2023, 10:25
Hi -QfG-

I noticed the demuxer script doesn't support DoVi P7 dual-track mp4 files. Is there a particular reason to this?

Atlantis
18th October 2023, 11:34
How do you work with HDR10+? Is it like Dolby Vision, demuxing and injecting a file?

I did a test, the RPU.bin file is 39 MB and the HDR10Plus.json is 224 MB! Is this normal? The HDR10+ metadata is so much larger than Dolby Vision?

von Suppé
18th October 2023, 12:02
Yes, similar to RPU, HDR10+ metadata can be extracted and injected.

I imagine HDR10+ binaries being of comparable size to RPU. Keeping the data in .json would require more space.

Atlantis
18th October 2023, 14:53
You mean when you inject the HDR10+ data, it will become smaller and not occupy the json file size?

-QfG-
18th October 2023, 20:38
Hi -QfG-

I noticed the demuxer script doesn't support DoVi P7 dual-track mp4 files. Is there a particular reason to this?

Will check if i can support this feature in next update.

You mean when you inject the HDR10+ data, it will become smaller and not occupy the json file size?

https://forum.doom9.org/showthread.php?p=1992626#post1992626

quietvoid
19th October 2023, 00:09
No, HDR10+ Metadata is a RAW JSON file included in the stream

What? No.
The JSON is always reencoded into a binary representation which is a lot smaller, then added into the bitstream as SEI.
It's smaller than Dolby Vision in the actual video stream.

von Suppé
19th October 2023, 10:42
I imagine HDR10+ binaries being of comparable size to RPU. Keeping the data in .json would require more space.

Just for getting the idea of difference in sizes of HDR10+ binaries in hevc stream and written as json format:

I did a testvideo which is a 5 min hevc stream including HDR10+ metadata. Which size is 2,580,627 KB. When HDR10+ is removed, the size is 2,580,114 KB. So the HDR10+ in-stream binaries would take up approx 513 KB, if my guess would be valid.
Whereas extracting and saving HDR10+, the json file comes out 7,095 KB.

Atlantis
19th October 2023, 13:54
I did a test and indeed when you inject the HDR10+ Metadata into the video, it goes back to smaller size.
After injection it is actually smaller than the Dolby Vision RPU. Extracted, the .json is 5 times bigger than RPU!