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

AgentXXL
2nd February 2025, 23:19
You're right, sorry forgot to process this switch. Fixed now, simply update the script.
https://github.com/DonaldFaQ/DDVT/blob/Scripts/DDVT_HYBRID.cmd

Thank you for your continued efforts on improving these scripts! They have saved me so much storage by only needing 1 file that will play on pretty much anything.

Is it recommended to download the latest scripts from your github site and unzip them into the folder containing the full DDVT package, overwriting the original scripts from the Mega download? I see that 65.2 is the latest on Mega but the github scripts are showing as 65.3. Are there any gotchas like needing updates to other apps in the Tools folder?

For all:

I am experiencing a related issue - drag 'n drop is no longer working on the main Win 11 PC I use to run these scripts. A Win 11 VM running the same Win version does still work. I've been trying various recommended solutions (13 of them so far) but all I've managed is being able to drag 'n drop ONLY to the Desktop.

Not to open apps/windows/websites with a drag 'n drop function. Plus I can only drag to the sides or bottom, not up past the explorer window title bar - that just drops the item being dragged just like pressing the ESC key while dragging. If anyone else has experienced this and fixed it, I'd be grateful if you shared your solution. Right now it's looking like a full Win re-install, which I'm reluctant to do.

I can still use cut & paste to 'drop' the source files into the scripts, but drag 'n drop is preferred.

Emulgator
3rd February 2025, 00:44
Maybe this helps, Ramesh Srinivasans fix helped on my Win10 too:
https://www.winhelponline.com/blog/drag-and-drop-not-working-file-explorer/

AgentXXL
3rd February 2025, 22:06
Maybe this helps, Ramesh Srinivasans fix helped on my Win10 too:
https://www.winhelponline.com/blog/drag-and-drop-not-working-file-explorer/

Thanks, but no-go. I hadn't come across this particular registry fix, but mine was already set properly for that Attributes key, and the other key in HKCU was not present.

I'm going to try removing the shell extensions for DDVT and clearing the registry of any DDVT specific keys. And then I'll try a fresh folder with the latest package and retry adding the shell extensions. If that fails, I'm going to reluctantly do the full fresh Win install.

jl0292
14th February 2025, 14:08
@-QfG-, sorry I am quite new here, but can we have updating version (currently it is 0.65.3 if I am correct).
I have tried to ddvt_demuxer to demux RPU.bin and HDR10+.json and then use ddvt_injector to inject these two into a compressed 4k film, but I kept constantly receiving error message on Editing Video HDR Metadata and Muxing test into MKV Container.
I honestly did not meet these issues on 0.64.x; however, I could not find previous versions on GITHUB database.
So whether you can provide previous version or possibly update version will be fine, hope it is not too much request for you, thanks!!

Here are the latest result of message as follows,

[Applying cropping values]
EditConfig {
"mode": 0,
"remove_cmv4": false,
"remove_mapping": false,
"active_area": {
"crop": false,
"presets": [
{
"id": 0,
"left": 0,
"right": 0,
"top": 0,
"bottom": 0
}
],
"edits": {
"all": 0
}
}
}
Parsing RPU file...
Editing active area offsets...
Final metadata length: 183837
Writing RPU file...
Done.

[Editing Video HDR Metadata]
Error.

[Fix Scenecuts]
EditConfig {
"mode": 0,
"remove_cmv4": false,
"remove_mapping": false,
"scene_cuts": {
"0-0": true
}
}
Parsing RPU file...
Editing scene cuts...
Final metadata length: 183837
Writing RPU file...
Done.

[Injecting RPU into stream]
Done.

[Muxing test into MKV Container]
Error.

== ERROR(S) ============================================================================================================

2 Error(s) during processing.

== LOGFILE END =========================================================================================================

2025/02/14 g 19:04:56.24

AgentXXL
20th February 2025, 20:24
I honestly did not meet these issues on 0.64.x; however, I could not find previous versions on GITHUB database.
So whether you can provide previous version or possibly update version will be fine, hope it is not too much request for you, thanks!!

The older releases are available on the MEGA site in the Older Versions folder. As for 65.3, you can download 65.2 from MEGA and then the 65.3 scripts from the Github site. Extract the MEGA archive to your destination folder and then extract the 65.3 scripts to that same folder to overwrite the 65.2 versions.

I've done this and so far it's working great. And once you use the Profile 8 Hybrid script with drag 'n drop support, you're unlikely to need the other scripts very often.

lemaireus
21st February 2025, 11:42
New as I am to Dolby Vision, I would appreciate an answer to what is presumably the most elementary question of all:

In Dolby Vision encodes in which the EL is excluded and only the RPU injected, does that RPU do any work at all without the FEL/MEL?

I'm sure an answer is hidden somewhere in this forum, but I haven't been able to find it and it would be great if you could please post a link or point me to the page. Thank you.

The second question is a little more elaborate so I shall post that in a separate message below.

lemaireus
21st February 2025, 11:54
Hi -QfG-, would you please help me with this one?:

Each time I try injecting an MEL/FEL into a cropped encode with, for example, 2.39:1 aspect ratio, I get the message that

a) VIDEO INPUT (all borders rightly with a zero value since I've cropped the top and bottom black bars in my encode) does not match with the RPU-EL.
b) And the EL INPUT which, rightly again, has borders (for example, LEFT=0 TOP=276 RIGHT=0 BOTTOM=276), since it's taken from a blu-ray, does not match with the video.
c) The borders of the FILE OUTPUT, however, match with video. Here is a screenshot of what I am talking about:

https://i.postimg.cc/KcpP6Bf5/Screenshot-2025-02-21-150839-Px.jpg

What am I supposed to in such a case?
a) Set "match L6 metadata to 'yes'?
b) Do I need to edit L6 metadata?
c) Do I need to 'EDIT ACTIVE AREA' and set the borders again? I am guessing that the answer to this question is a "No" because the cropped borders are correct.
d) Do nothing, because the encode is correctly cropped and the EL data is set for the active picture, that is, the EL data excludes the area with black bars?

I run into this problem only and only when I try to inject an EL into an encode, never when I leave the EL alone and inject only an RPU. Yes, I do set the correct crop values when extracting an RPU and an EL.

What would be the right way of injecting the EL in the scenario outlined above?

[PS: In case this is relevant: yes, I would like to retain DV Profile 7.6.]

GodzilaAvenger
21st February 2025, 21:21
Hi, I'm not -QfG- but I've used DDVT enough to think I can answer your questions.

First, MEL is simply the RPU, which is the dynamic metadata that tells your TV how to adjust its brightness and colors based on the scene. If you have FEL (i.e. EL + RPU) the EL is simply the layer added to the HDR10 stream to reconstruct the original 12-bit stream, i.e. EL = original 12-bit stream - 10-bit HDR10 stream.

As for your second question, a), b), do whatever you want with the L6 metadata, I don't think your TV cares what they are. c) and d), do D here because everything is correct, if somehow the auto-detected borders are wrong then you can use C to correct them.

I'm curious if your Profile 7.6 would even work though (assuming you have a player capable of showing it), because we had a discussion in this thread a few years ago about it and I remember being told that the order of frames in the NAL changes when encoding, which means if you add the EL into the encode the frames between the two streams don't match. Ask quietvoid though, he knows a lot more about this than I do.

lemaireus
22nd February 2025, 06:25
Thank you, GodzillaAvenger, for providing exactly the kind of illuminating, helpful guidance I was looking for. Your reply settles all my queries nicely.

As for my decision to go with DV profile 7.6: I have a collection of 6000+ titles and I am in the process of re-encoding as many of them as have become available in 4k resolution. Currently there is no player that I know of which plays 7.6, nor do I have a 12-bit display. However, I do not wish to re-encode my entire library all over again as and when--if?--a player that supports 7.6 becomes available or when 12-bit displays become mainstream.

Until we get to the point where 7.6, 12-bit playback becomes mainstream--and maybe that might never happen--keeping 7.6 FEL gives me the option of running it through DDVT and converting to 8.1 right before I wish to watch the movie. That is, my library preserves 7.6 FEL in the hope that players and displays might support this format in the near future. Even if that never happens, I lose nothing: I simply run my FEL encode through DDVT before playback.

I wasn't aware of the change in the order of frames in the NAL when we re-encode and compress a blu-ray source. I wonder if there is any way in which I can verify that the FEL or the RPU I have injected back into the re-encode remains frame-by-frame-accurately-mapped to the source video. Any help from quietvoid or -QfG- or anyone else who knows the ins and outs of Dolby Vision better than I do would be much appreciated.

GodzilaAvenger
22nd February 2025, 10:59
A few Bluray players like Sony's X800M2 can play FEL off the disk. But more recently, I know Ugoos AM6B+ with CoreELEC+PM4K can play full fat Profile 7.6 FEL straight from mkv. TVs are another story, but Dolby argues even on a 10-bit display FEL can help with banding. Personally, I think studios mostly use FEL to hide their shitty encoding. Case in point, Oppenheimer doesn't even have DV!

Your approach is interesting, I personally keep the remux if it has FEL (so as to not lose the EL) and an encoded version with P8.1 to stream over low bandwidths. It does take up space, but also, HDDs are relatively cheap.

Something that you may not know is that some of those FEL are fake. If the EL bandwidth is around 2 Mbps or less, the FEL is just a grey static image and you can discard it and only keep the RPU. Based on my experience out of the major studios that use DV (so not Disney and their cheap a**), WB and Sony generally include the fake FEL and only Universal and Paramount have a real FEL (if you look at their FEL bandwidth it's usually ~5-10 Mbps).

quietvoid
22nd February 2025, 14:27
The EL is required (expected at least) to be in sync with the BL, at the bitstream level (decoding timestamps).
So you can't just re-encode and add it back. It won't be valid for the re-encoded video, even if it was in sync.

If you plan on re-encoding you need to process the EL beforehand so that its effects are present in the video itself.

lemaireus
22nd February 2025, 17:03
GodzillaAvenger, I continue to stick with the PC as the core around which my home theatre system is organised and have thus far not used Ugoos or any other hardware players. My feeling is that we are still some distance away from that inflection point at which Dolby Vision becomes as universally supported and accessible as once upon a time, for example, x264 after DivX and xVid. There is already so much wonderful work put in by the open-source community--quietvoid, -QfG-, Kuler087, to mention only three on Doom9--that by the end of 2025, I think, we should have fairly widespread support for DV encoding and playback. The hardware too, by the same logic, should improve by leaps and bounds, and at the moment, with my level of expertise--rather, lack of it--all I can do is to wait for software and hardware support for DV to mature past that inflection point at which it becomes useful for someone with my skill level.

At the moment I use Energy Media Player, suggested by Kuler087, on my HTPC for DV playback. I used to think that MPC-HC--the latest builds on GitHub--supports DV (it claims "MPCVR also supports Dolby Vision"), but Kuler told me that it merely tone maps the colour space to HDR10 while ignoring dynamic metadata. Ideally, I would be looking for a player which can simply passthrough DV metadate to the display so that the TV can do the work it was bought to do.

I had no idea that some of the FELs are fake. Thank you for sharing that information, even if that muddies the waters even more for me.

lemaireus
22nd February 2025, 17:18
The EL is required (expected at least) to be in sync with the BL, at the bitstream level (decoding timestamps).
So you can't just re-encode and add it back. It won't be valid for the re-encoded video, even if it was in sync.

If you plan on re-encoding you need to process the EL beforehand so that its effects are present in the video itself.

Sigh! :confused:

Thank you for sharing that information, quietvoid. That will save me lots and lots of wasted hours of work, not counting the ones already in the dump.

Thus far, I have been re-encoding UHD blu-rays with RibBot264 (10-bit, x265), and then, using DDVT, demuxing and injecting the EL or the RPU from the blu-ray back into that encode, assuming that the BL is preserved in the RipBot encode. I've done nearly 1500 movies using this method; all to no purpose, it appears.

I'll just keep my fingers crossed and hope that you all of you guys working on DV can tame the hydra-headed monster to the point at which the technologically-challenged such as myself can use it without feeling utterly lost.

Is there no point in injecting an RPU either to a re-encode? Thus far I've been working with the idea that timestamps and frame numbers remain unchanged, are carried over without any change, across any number of encodes. And this after twenty-plus years of re-encoding. One learns the hard way, I suppose.

SeeMoreDigital
22nd February 2025, 17:28
Something that you may not know is that some of those FEL are fake. If the EL bandwidth is around 2 Mbps or less, the FEL is just a grey static image and you can discard it and only keep the RPU. Based on my experience out of the major studios that use DV (so not Disney and their cheap a**), WB and Sony generally include the fake FEL and only Universal and Paramount have a real FEL (if you look at their FEL bandwidth it's usually ~5-10 Mbps).I had no idea that some of the FELs are fake. Thank you for sharing that information, even if that muddies the waters even more for me.I thought the Dolby Vision encodes with a 'green' (not grey) static image' video track were MELs...

quietvoid
22nd February 2025, 19:32
Sigh! :confused:
Is there no point in injecting an RPU either to a re-encode? Thus far I've been working with the idea that timestamps and frame numbers remain unchanged, are carried over without any change, across any number of encodes. And this after twenty-plus years of re-encoding. One learns the hard way, I suppose.

The issue only applies to keeping the EL video, because the RPU is synced to that EL video.
And not the re-encoded one.

RPU just needs the metadata associated to the correct frame, which is done by x265 or whatever you use.

I don't know what DDVT does for "injecting the EL or the RPU".
Injecting the RPU is fine. Muxing in the EL is not.

For your existing files, you'd have to check if the EL was kept or not.
It would be a bit more involved to extract/re-inject the RPU if that's the case.

Skav
22nd February 2025, 22:50
Hi, is it possible to prevent the cmd window from closing by itself, regardless of the script file used ?

GodzilaAvenger
23rd February 2025, 00:46
I thought the Dolby Vision encodes with a 'grey static image' (video) track were MELs...

They are technically FEL because they still have that static image video track. In true MEL the EL is only the RPU and the bitrate is ~100 kbps.

Is there no point in injecting an RPU either to a re-encode?

As quietvoid mentioned the RPU, when injected alone, only needs frame numbers (you can use DDVT_FILEINFO to convert the RPU binary into a readable .json format and look at the data). A common practice (which I also use) is to extract the RPU from the remux P7.6 and convert it to P8.1 (using something like DDVT_DEMUXER) and then add it back into the re-encoded HDR10 BL using DDVT_INJECTOR. Worth mentioning DDVT uses quietvoid's dovi_tool (https://github.com/quietvoid/dovi_tool) and hdr10plus_tool (https://github.com/quietvoid/hdr10plus_tool) to manipulate DV/HDR10+ metadata and FFmpeg/MKVToolNix to work with video files.

Thus far I've been working with the idea that timestamps and frame numbers remain unchanged, are carried over without any change, across any number of encodes. And this after twenty-plus years of re-encoding. One learns the hard way, I suppose.

Honestly, we're all here to learn. I asked the same questions you did a few years back in this very thread and a lot of folks here helped me out.

lemaireus
23rd February 2025, 06:22
I don't know what DDVT does for "injecting the EL or the RPU".
Injecting the RPU is fine. Muxing in the EL is not.

Thank you, quietvoid, for providing that clarity. I'll have to start from scratch, yet again.

Thank you also for all the work that you have put into the HDR tools which DDVT uses to make DV a bit more accessible to the likes of myself.

lemaireus
23rd February 2025, 06:38
A common practice (which I also use) is to extract the RPU from the remux P7.6 and convert it to P8.1 (using something like DDVT_DEMUXER) and then add it back into the re-encoded HDR10 BL using DDVT_INJECTOR. Worth mentioning DDVT uses quietvoid's dovi_tool (https://github.com/quietvoid/dovi_tool) and hdr10plus_tool (https://github.com/quietvoid/hdr10plus_tool) to manipulate DV/HDR10+ metadata and FFmpeg/MKVToolNix to work with video files.

I guess I have no choice but to go down that route as well. Retaining only the RPU and converting that from profile 7.6 to 8.1 seems to be the safest option and also the best supported one in playback.

Honestly, we're all here to learn. I asked the same questions you did a few years back in this very thread and a lot of folks here helped me out.

The real question here would be: is there an application out there which can help someone with my rudimentary familiarity with Dolby Vision keep the FEL/MEL intact and synced?

Has anyone tried DoVi_Scripts? If yes, does that keep the EL perfectly synced with the BL, while providing flexible bitrate control (to manage output file size, when necessary) and, importantly for me, has the application's GUI become user-friendly enough for tech-challenged users?

GodzilaAvenger
23rd February 2025, 10:09
I haven't used DoVi_Scripts, but I think DoViBaker may be closer to what you are looking for (haven't used it either, just saying based on the documentation).

lemaireus
23rd February 2025, 11:19
I haven't used DoVi_Scripts, but I think DoViBaker may be closer to what you are looking for (haven't used it either, just saying based on the documentation).

Thank you for the suggestion. I shall check out DoViBaker.

SeeMoreDigital
23rd February 2025, 11:36
They are technically FEL because they still have that static image video track. In true MEL the EL is only the RPU and the bitrate is ~100 kbps.

So are you saying that all Dolby Vision encoded 4K UHD Blu-ray discs are FEL but some are more FEL than others?

So this 'secondary' video stream is considered to be 'full' FEL: -
https://i.ibb.co/XZdNX8cj/fel.jpg

But this 'secondary' video stream is considered to be 'fake' FEL: -
https://i.ibb.co/fdDZ2M98/mel.png

I was under the impression that Dolby Vision encodes with 'green' secondary streams (like the one above) are 'MEL'...

GodzilaAvenger
23rd February 2025, 12:43
Your examples for the difference between FEL and fake FEL are spot on. That said, some DV disks are actually MEL. Here's an example:

Casino Royale (MEL):

Video: MPEG-H HEVC Video / 41863 kbps / 2160p / 23.976 fps / 16:9 / Main 10 @ Level 5.1 @ High / 10 bits / HDR10 / BT.2020
* Video: MPEG-H HEVC Video / 65 kbps / 1080p / 23.976 fps / 16:9 / Main 10 @ Level 5.1 @ High / 10 bits / Dolby Vision / BT.2020

2001: A Space Odyssey (fake FEL):

Video: MPEG-H HEVC Video / 62181 kbps / 2160p / 23.976 fps / 16:9 / Main 10 @ Level 5.1 @ High / 10 bits / HDR10 / BT.2020
* Video: MPEG-H HEVC Video / 2093 kbps / 1080p / 23.976 fps / 16:9 / Main 10 @ Level 5.1 @ High / 10 bits / Dolby Vision / BT.2020

Gladiator (FEL):

Video: MPEG-H HEVC Video / 43317 kbps / 2160p / 23.976 fps / 16:9 / Main 10 @ Level 5.1 @ High / 10 bits / HDR10 / BT.2020
* Video: MPEG-H HEVC Video / 6825 kbps / 1080p / 23.976 fps / 16:9 / Main 10 @ Level 5.1 @ High / 10 bits / Dolby Vision / BT.2020

For Casino Royale that "1080p track" is actually just the RPU (based on the bitrate), hence MEL.

See this topic (https://forum.blu-ray.com/showthread.php?t=276448), though the list hasn't been updated in a few years.

Kuler087
23rd February 2025, 14:21
Has anyone tried DoVi_Scripts? If yes, does that keep the EL perfectly synced with the BL, while providing flexible bitrate control (to manage output file size, when necessary) and, importantly for me, has the application's GUI become user-friendly enough for tech-challenged users?
Of course, it can bake FEL: Workflow 8-2-1
Dovi_scripts can do ANYthing that is DV-related and there's no such thing as ''fake FEL''
and all the modes/workflows are described on the main page:

MODE.E (8) =
VIDEO/AUDIO ENCODERS

can convert audio (DDP 7.1 / Add silent or encoded core to TrueHD)
see tutorial (convert to ddp): https://www.youtube.com/watch?v=m5_Bt2yGPhE
see tutorial (add core): https://www.youtube.com/watch?v=X8CImPBh_DI
can encode bake fel to HDR10/P8 with dovibaker+x265 or NVenc
see tutorial: https://www.youtube.com/watch?v=8BvXqw_cGJE
can encode any HDR10/HLG/FELP7/P5 source to HDR or SDR (x265 or NVenc or prores)
can encode DV to SDR using official Level-2 100nits trim pass (Official Dolby cm_offline.exe)
can encode P7/P8 to profile 5 DV (requires DEE.exe)
can encode JPEG2000 IMF mxf and Prores files to profile 5 DV (requires DEE.exe)

SeeMoreDigital
23rd February 2025, 15:53
Your examples for the difference between FEL and fake FEL are spot on. That said, some DV disks are actually MEL. Here's an example:

Casino Royale (MEL):

Video: MPEG-H HEVC Video / 41863 kbps / 2160p / 23.976 fps / 16:9 / Main 10 @ Level 5.1 @ High / 10 bits / HDR10 / BT.2020
* Video: MPEG-H HEVC Video / 65 kbps / 1080p / 23.976 fps / 16:9 / Main 10 @ Level 5.1 @ High / 10 bits / Dolby Vision / BT.2020

2001: A Space Odyssey (fake FEL):

Video: MPEG-H HEVC Video / 62181 kbps / 2160p / 23.976 fps / 16:9 / Main 10 @ Level 5.1 @ High / 10 bits / HDR10 / BT.2020
* Video: MPEG-H HEVC Video / 2093 kbps / 1080p / 23.976 fps / 16:9 / Main 10 @ Level 5.1 @ High / 10 bits / Dolby Vision / BT.2020

Gladiator (FEL):

Video: MPEG-H HEVC Video / 43317 kbps / 2160p / 23.976 fps / 16:9 / Main 10 @ Level 5.1 @ High / 10 bits / HDR10 / BT.2020
* Video: MPEG-H HEVC Video / 6825 kbps / 1080p / 23.976 fps / 16:9 / Main 10 @ Level 5.1 @ High / 10 bits / Dolby Vision / BT.2020

For Casino Royale that "1080p track" is actually just the RPU (based on the bitrate), hence MEL.

See this topic (https://forum.blu-ray.com/showthread.php?t=276448), though the list hasn't been updated in a few years.

I see... I've posted a few times within that very Blu-ray.com forum topic/thread, indeed I'm even quoted in the second spoiler of the first post, but I wasnt aware of any Dolby Vision discs with secondary video streams encoded at very low bitrates (ie: below 100kbps)!

I have a few Dolby Vision discs encoded with 'green' secondary video streams or "fake FEL" but I don't think I have any "genuine MEL" discs, so I'll have to buy one.



Cheers

EDIT: I've just extracted the secondary video stream from Fifth Element (2h 6m 22s). It's file size is just 143MB and it's bitrate is just 146kbps. When the stream is played in either MPC-BE or VLC the video is green, not grey. Is this 'fake FEL' or 'genuine MEL'?

kolak
23rd February 2025, 21:46
I would say that green means empty?

SeeMoreDigital
23rd February 2025, 21:58
I would say that green means empty?I'm interested to know if 'secondary streams' encoded below 100kbps are green or grey?!

GodzilaAvenger
23rd February 2025, 22:09
Didn't notice you were the one quoted in that post :D

I'd say Fifth Element is MEL. I don't know why I said the secondary 1080p track is grey, my bad. I guess both MEL and fake FEL show the green image.

Here's how I see this FEL/MEL debate. There are disks like Gladiator where the EL contains both additional picture information and the RPU (EL bitrate higher than 3 Mbps), i.e. FEL. There are also those like Casino Royale and Fifth Element where the EL merely contains the RPU (EL bitrate around 100 kbps), i.e. MEL. Then there are the inbetweeners from (mostly) Sony and Warner Bros. (EL bitrate around 2 Mbps). You could argue these are MEL because, unlike FEL, the EL does not contain any additional picture information. Or, you could argue that these are FEL because, unlike MEL, based on the bitrate the EL contains something in addition to the RPU (what it is is a mystery to me, if someone here knows or has worked at Sony/Warner Bros. please share because I genuinely want to know). I just call them 'fake FEL' to encompass both sides of the argument (this post (https://www.kodinerds.net/thread/79532-fel-mel-und-dolby-vision-7-8/) from -QfG- is also helpful).

At the end of the day, I think this is mostly semantics. The point I was trying to make when answering lemaireus' question was that if they see an inbetweener they can simply keep the RPU and discard the rest of the EL.

Kuler087
23rd February 2025, 22:27
Forget about the bitrate or the image color. The only reliable and accurate way to tell if a video is FEL or MEL is by reading the RPU header flag.

"dovi_profile": 7,
"el_type": "FEL",


Also, I've seen some (https://docs.google.com/spreadsheets/d/15i0a84uiBtWiHZ5CXZZ7wygLFXwYOd84/edit?gid=1226038728#gid=1226038728) 16mb/s EL add visually nothing to the 12-bit decoded stream, and I've seen some 2-3mb/s EL add grains or brightness.

SeeMoreDigital
23rd February 2025, 22:36
Thanks for the reply GodzilaAvenger,

The thing that really annoys me (and probably everybody else) about Dolby Vision on 4K UHD disc is that the encodes are not all FEL. Indeed, I feel quite ripped off when I find out that the secondary stream on the disc has been encoded with a green video stream!

Emulgator
24th February 2025, 04:02
BTW, that green plane means: all component pixel values are zero.
(this is what MPC returns when the illegal triplet Y=U=V=0 is rendered.
U=0 gives (illegal FullScale) Yellow, V=0 gives (illegal FullScale) Cyan, U,V=0 give (illegal FullScale) Green)

SubSeven
24th February 2025, 11:39
Hi everyone,

great tools and great discussions.
Unfortunately I wasn't successful to convert my MKV Hybrid Release (DV with HDR10 fallback) Profile 8 into an mp4 + DV format that can be played on my LG OLED TV.

Can someone help me here?

Thanks and best regards.

SeeMoreDigital
24th February 2025, 12:58
Thanks for the reply GodzilaAvenger,

The thing that really annoys me (and probably everybody else) about Dolby Vision on 4K UHD disc is that the encodes are not all FEL. Indeed, I feel quite ripped off when I find out that the secondary stream on the disc has been encoded with a green video stream!Well just for a laugh I did some tinkering this morning.

I added a 'MEL' secondary video stream from '2001: A Space Odyssey' to the 1982 release of 'Blade Runner' using TSmuxerGUI. Upon playback both my OPPO UDP-203 and 2016 LG television flagged a Dolby Vision signal. Suffice to say, the image was brighter and the colours were a bit off. But it just goes to show how easy it is to create 'fake' Dolby Vision content!

EDIT: Today I swapped the 'MEL' secondary video stream from '2001: A Space Odyssey' with 'James Bond: Casino Royale' and created a new 'Blade Runner' mux. Doing this saved around 2GB in overall file size and seemed to reduce the brightness of the image.

lemaireus
24th February 2025, 13:13
Of course, it can bake FEL: Workflow 8-2-1
Dovi_scripts can do ANYthing that is DV-related and there's no such thing as ''fake FEL''
and all the modes/workflows are described on the main page:

Thank you, Kuler, for joining the conversation. You've always been hearteningly, illuminatingly helpful, and you are a veritable encyclopedia when it comes to matters related to Dolby Vision. I still have some nigging doubts left over with reference to "baking" (is "injecting" in DDVT tools an equivalent term? I ask because I've been using DDVT to "inject" MEL/FELs into re-encodes of blu-ray sources which, as the conversation here suggests, is not quite the right way of going about the process.), and perhaps it would be better if I raise those questions in the DoVi_Scripts forum in which you have already answered so many of my queries.

Kuler087
24th February 2025, 13:31
Thank you, Kuler, for joining the conversation. You've always been hearteningly, illuminatingly helpful, and you are a veritable encyclopedia when it comes to matters related to Dolby Vision. I still have some nigging doubts left over with reference to "baking" (is "injecting" in DDVT tools an equivalent term? I ask because I've been using DDVT to "inject" MEL/FELs into re-encodes of blu-ray sources which, as the conversation here suggests, is not quite the right way of going about the process.), and perhaps it would be better if I raise those questions in the DoVi_Scripts forum in which you have already answered so many of my queries.

I don't know what DDVT does or can do, I never used it but baking FEL requires re-encoding the base layer with x265 or NVenc (+ dovi baker).

Injecting or muxing the EL back into the BL is NOT the same as baking it and will be wrong.

But yeah, you probably should ask DS questions in the DS thread. The process is easy though, just make sure you have avisynthplus installed and run workflow 8-2-1 with your P7 mkv rip. The output will be P8 with the FEL essence baked in the BL. You can control the encoding type( crf, 1-pass, 2-pass), bitrate and settings at lines 148-158

lemaireus
24th February 2025, 13:54
I don't know what DDVT does or can do, I never used it but baking FEL requires re-encoding the base layer with x265 or NVenc (+ dovi baker).

Injecting or muxing the EL back into the BL is NOT the same as baking it and will be wrong.

But yeah, you probably should ask DS questions in the DS thread. The process is easy though, just make sure you have avisynthplus installed and run workflow 8-2-1 with your P7 mkv rip. The output will be P8 with the FEL essence baked in the BL. You can control the encoding type( crf, 1-pass, 2-pass), bitrate and settings at lines 148-158

Thank you, Kuler, for confirming what quietvoid and GodzillaAvenger had also pointed out regarding injecting EL into BL being the wrong way to go about the process of re-encoding. I'll take the questions about DoVi_Scripts to that forum, perhaps later, after I have played around long enough with DoVi_Scripts and become familiar with it. At the moment, I use it for EAC3 7.1 audio encodes of 7.1 TrueHD Atmos and DTS: X streams and it does a great job and, to my knowledge, is the only application that offers 7.1 audio encoding.

In the meantime, if someone here can tell us exactly what DDVT tools does when it "injects" an FEL/MEL into an x265 re-encode of the BL, that would help.

GodzilaAvenger
24th February 2025, 18:39
From the code, my understanding is that DDVT uses dovi_tool's inject-rpu function, which based on the documentation "Interleaves RPU NAL units between slices in an HEVC encoded bitstream."

lemaireus
25th February 2025, 04:15
From the code, my understanding is that DDVT uses dovi_tool's inject-rpu function, which based on the documentation "Interleaves RPU NAL units between slices in an HEVC encoded bitstream."

Yes, it says as much when it injects the RPU. The question is about the FEL/MEL hevc file. Since DDVT offers the option to first demux and later inject the hevc FEL/MEL, one would think that it would/should take into account the problem that you, quietvoid, and Kuler refer to. If DDVT cannot sync the EL with the BL, then maybe the option to inject the EL should come with that cautionary note?

GodzilaAvenger
25th February 2025, 05:07
Perhaps. I guess it depends on the EL, if it is MEL (i.e. just RPU) then injecting it is probably fine.

lemaireus
25th February 2025, 10:40
I suppose the ones who compiled this wonderful, incredibly user-friendly set of tools are the only ones who can tell us what DDVT tools do when they "inject" an FEL hevc into an x265 re-encoded video from a blu-ray source.

SeeMoreDigital
13th March 2025, 11:28
Wrong topic

leotwo
20th March 2025, 10:39
The tool "can't find" the RPU in newly released web-dl videoes from Amazon Prime.

Mediainfo seems ok - showing there's and RPU and Profile 5.6, dolby vision profile 5 is found by the tool, but it somehow doesn't find the RPU or isn't able to extract it..

pejok
20th March 2025, 18:49
It is not possible to convert DV profile 5 only (it doesn't contain HDR10) into DV Profile 8.1.
DV Profile 8.1 needs HDR10 base. You cannot have DV Profile 8.1 only without HDR10 base.
In this case, you have to find HDR10 version of the video (even without DV layer) and inject/make hybrid with DV Profile 5 file.

Or did you try to do direct hybrid with HDR10 video and not to demux only the DV Profile 5?

Correct me if I am wrong.

// EDIT:
I know what you meant now.
I just tried to demux and convert DV 5 file from AMZN Prime, and everything worked.
Latest v0.65.3

SOURCE:
https://i.ibb.co/skMZtww/Screenshot-2025-03-20-192147.png

DEMUX SETTINGS:
https://i.ibb.co/7JL9GwW3/Screenshot-2025-03-20-191946.png

DEMUX DONE:
https://i.ibb.co/5XvTY9gm/Screenshot-2025-03-20-192028.png

EXPORTED FILE:
https://i.ibb.co/5XpsdHDT/Screenshot-2025-03-20-192657.png

Amateur
27th March 2025, 03:40
Suddenly I'm getting a lot of errors with trying to use the Hybrid tool in the folder. After getting the error, I came back here to download an update but I still get the error.

From my pictures, the HDR file has HDR10+ and the DV file has Dolby Vision Profile 5.06. I drag-and-drop the files into the Hybrid window so it's not like I'm typing anything incorrectly.

The original DV mp4 file had some weirdness with the FPS so I muxed it into an MKV to see if that helped but it didn't.

I also notice that the screen says that it can turn HDR10+ into Dolby Vision 8 so I tried that as well and still got an error

What is going on?

GodzilaAvenger
27th March 2025, 06:40
Does the file path contain any special characters like ( & %?

Amateur
27th March 2025, 22:53
Does the file path contain any special characters like ( & %?

Only a dash (-) or a period. But I've been doing files from the same folder for a little while now.

I tried moving it into a shorter file path with no characters at all. This time I watched the process and noticed this for the DV file. How does it have DV profile 5 but no RPU?

Hansolo
29th March 2025, 16:41
Hello!

I did some test injecting with original metadata and modified metadata (removing some frames), and i cant see any difference seeing the film.

I thought that using modified metadata, the image will flash or similar when changing scene but film goes well.
What is supposed to be?

Regards!

Amateur
29th March 2025, 18:00
Suddenly I'm getting a lot of errors with trying to use the Hybrid tool in the folder. After getting the error, I came back here to download an update but I still get the error.

From my pictures, the HDR file has HDR10+ and the DV file has Dolby Vision Profile 5.06. I drag-and-drop the files into the Hybrid window so it's not like I'm typing anything incorrectly.

The original DV mp4 file had some weirdness with the FPS so I muxed it into an MKV to see if that helped but it didn't.

I also notice that the screen says that it can turn HDR10+ into Dolby Vision 8 so I tried that as well and still got an error

What is going on?

My desktop happened to have v0.61.4 which still worked. Any ideas what my issue could be? As far as I remember, you should only have to unpack the rar into its own folder and everything works right? No other other installations are necessary?

TempToday25
2nd April 2025, 01:06
Hi Kuler!

I believe I may have uncovered a bug or some unintended behavior. I am trying to create a Dolby Vision Profile 8.4 file from a higher-bitrate base HLG stream and an RPU from a Dolby Vision stream that has a lower-bitrate on it's own. Besides trying to create a best-of-both-worlds hybrid file, it's also the file that will be most compatible across the most platforms. The issue I'm running into is that the DDVT tool seems to force a "color_transfer" function value of "bt2020-10" when the original HLG file used "arib-std-b67". The reason that this is important is that this breaks HLG/HDR recognition on many devices (Infuse on Apple devices, VLC on Android and others). Is there a particular reason why DDVT pigeonholes HLG files to use this color transfer function? Here's the mediainfo of the original HLG file (using ffprobe -v error -show_streams -of json -i file.mkv:
"color_range": "tv",
"color_space": "bt2020nc",
"color_transfer": "arib-std-b67",
"color_primaries": "bt2020",
"chroma_location": "topleft",
And after running DDVT_Demuxer to convert a Profile 5 RPU to Profile 8.4 and then DDVT_Injector to interleave the RPU in the HLG file, here's what the mediainfo says:
"color_range": "tv",
"color_space": "bt2020nc",
"color_transfer": "bt2020-10",
"color_primaries": "bt2020",
"chroma_location": "topleft"

As you can see the "color_transfer" parameter changed. I've tried using ffmpeg to set the value of the parameter/metadata after the fact but to no avail. FFMPEG doesn't throw an error but the output of this command still shows the same "color_transfer" parameter value:
ffmpeg -i input.mp4 -map 0 -c copy -metadata:s:v:0 color_transfer="arib-std-b67" output.mkv

Can you help me with this please?

GodzilaAvenger
2nd April 2025, 06:10
Just to clarify, Kuler is the maintainer of DoVi_Scripts, -QfG- is the maintainer of DDVT.

As for the issue you're describing, I think (based on the DDVT code) it is related to dovi_tool that handles the DV stuff inside DDVT, perhaps @quietvoid can provide some more info about this.