View Full Version : [DoVi_Scripts] Multi-Function Scripts for Dolby Vision processing and a lot more...
MwenDavo
19th April 2026, 05:42
Hi, I seem to have found a movie (Avatar 2009 Director's Cut) that has both the HDR10 and RPU L6 MaxCLL/MaxFALL set to 0. How does the script handle these during FEL Baking?
Kuler087
19th April 2026, 13:40
The script ignores L6
MwenDavo
19th April 2026, 15:30
The script ignores L6
Didn't 8-6-1 use the HDR10 MaxCLL/MaxFALL for MEL and RPU MaxCLL/MaxFALL for FEL for the luminance encoding parameter? What does it do if both values are 0 or don't exist?
Kuler087
19th April 2026, 15:36
Yes, it uses the original HDR10 cll/fall for MEL and the RPU L1 max/avg values for FEL.
When cll/fall are 0, the script uses 0. You can edit the metadata after the encoding with workflow 9-9.
MwenDavo
19th April 2026, 15:44
Yes, it uses the original HDR10 cll/fall for MEL and the RPU L1 max/avg values for FEL.
When cll/fall are 0, the script uses 0. You can edit the metadata after the encoding with workflow 9-9.
Oh! So it calculates the max/avg from plotting the whole L1 from the RPU? I didn't notice that. Does it use the P7 RPU or the converted P8 one?
Kuler087
19th April 2026, 16:28
Does it use the P7 RPU or the converted P8 one?
Converting an RPU profile doesnt change the dynamic metadata.
halls
21st April 2026, 21:18
Hi!
I need a litle help.
I would like to mux a 4k uhd dovi bd disc into mkv. BL+RPU is the goal.
The disc is MEL with cmv4 dovi algorithm, 7.6 dovi profile.
I extracted the base layer, now its dovi free.
I also extracted the 7.6 profile rpu from the MEL layer and converted it to profile 8.01 , I kept the 4.0 algorithm during the conversion.
Do I need to modify anything else in the new RPU or can I inject it back into the base layer?
Thank You!
Kuler087
21st April 2026, 21:22
You can inject the P8 rpu with workflow 1, nothing else to edit.
PS, you didn't have to do that manually. You could just run your original disc(or P7 mkv) in workflow 4-1.
halls
21st April 2026, 21:24
You can inject the P8 rpu with workflow 1, nothing else to edit.
PS, you didn't have to do that manually. You could just run your original disc(or P7 mkv) in workflow 4-1.
Thank You Sir!
rollmayonnaise
30th April 2026, 08:56
EDIT3: ChatGPT told me to replace .mov. with .avs. at line 10380. Workflow 6-2 ran correctly, so I think that was the error.
EDIT2: Actually, the second error (workflow 6-2) is still there.
EDIT: Nevermind, I hadn't updated the tools folder from the latest public release.
Hello. since updating to the latest beta and adding additional files in the tools folder from this thread many of the workflows don't work anymore. Do you have a repository that includes all files to add when using a specific beta? When trying workflow 7-5, I get the following error:
usage: creates_metadata_json.py [-h] --source_min_pq SOURCE_MIN_PQ --source_max_pq SOURCE_MAX_PQ
[--block1_start BLOCK1_START] [--block1_duration BLOCK1_DURATION]
[--raw_block1 RAW_BLOCK1] [--block1_L1_min BLOCK1_L1_MIN]
[--block1_L1_max BLOCK1_L1_MAX] [--block1_L1_avg BLOCK1_L1_AVG]
[--block1_L2_2081_trim_slope BLOCK1_L2_2081_TRIM_SLOPE]
[--block1_L2_2081_trim_offset BLOCK1_L2_2081_TRIM_OFFSET]
[...]
[--block8_L8_49_hue_vector_field4 BLOCK8_L8_49_HUE_VECTOR_FIELD4]
[--block8_L8_49_saturation_vector_field5 BLOCK8_L8_49_SATURATION_VECTOR_FIELD5]
[--block8_L8_49_hue_vector_field5 BLOCK8_L8_49_HUE_VECTOR_FIELD5] -o OUTPUT
creates_metadata_json.py: error: unrecognized arguments: --raw_block9 H:\tempy\temp.folder76\raw8.txt --block9_start 1086 --block9_duration 138 --raw_block10 H:\tempy\temp.folder76\raw9.txt --block10_start 1224 --block10_duration 138 --raw_block11 H:\tempy\temp.folder76\raw10.txt --block11_start 1362 --block11_duration 138
Error: The system cannot find the file specified. (os error 2)
Error: The system cannot find the file specified. (os error 2)
Error: The system cannot find the file specified. (os error 2)
When trying workflow 6-2, I get this:
Measuring video file "H:\tempy\temp.folder81\a_transfer=hdr.matrix=2020.avs" using D3D11 (native)...
Metadata:
Mastering display luminance: 0/0, gamut: 0 0, 0 0, 0 0, 0 0
MaxCLL: 0, MaxFALL: 0 nits
Measurements:
Frames: 156701, MaxCLL 100%: 398, 99.9%: 350, MaxFALL: 237, AvgFALL: 8, AvgFMLL: 178 nits
Reading generate config file...
Parsing madVR measurement file...
Generating metadata: Profile 8.1 (HDR10)...
Generated metadata for 156701 frames
Done.
1 file(s) moved.
Parsing RPU file...
Plotting...
Done.
Parsing RPU file...
Exporting serialized RPU list...
Done.
Calculating per shot MaxFALL threshold...
Done.
Calculating per shot MaxCLL threshold...
Done.
Traceback (most recent call last):
File "F:\dovi\DoVi.Scripts\tools\madvr_parser.py", line 161, in <module>
main()
~~~~^^
File "F:\dovi\DoVi.Scripts\tools\madvr_parser.py", line 144, in main
frames = parse_maxcll_frames(args.input)
File "F:\dovi\DoVi.Scripts\tools\madvr_parser.py", line 28, in parse_maxcll_frames
with open(path, "rb") as f:
~~~~^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'H:\\tempy\\a_transfer=HDR.matrix=2020.mov.measurements'
Deleting TEMP folder...
Have you encountered these before?
Kuler087
30th April 2026, 14:07
ChatGPT told me to replace .mov. with .avs. at line 10380. Workflow 6-2 ran correctly, so I think that was the error.
for the latest beta, there are new files required in 6-2.
madvr parser:
https://drive.google.com/file/d/1udL_-fagZyadOa0nzMQV58E0c9klJIKU/view?usp=drive_link
This file parses madVR measurement files and plots the data frame by frame in an interactive graph, making it easy to display the MaxCLL/FALL of any frame.
example: https://typical-gold-cr4pa77lk9.edgeone.app/
DoVi_tool_SDR:
https://drive.google.com/file/d/1inQ1F6w-NFx7RZWjiWn-IpL7u_FhOzc4/view?usp=sharing
This new file caps the SDR plot graph at 100 nits, as it should. Since SDR has to be placed in an HDR container for plotting in madVR, artifacts or grain can cause madVR to read pixel values above 100 nits (255 in 8-bit), which isn’t possible for SDR.
CHANGES in beta since last public:
- EDITOR (1): added a mode that can upgrade cmv2.9 to 4.0 (Same as the Ugoos ''append''... remember that any L2 trims will then be ignored)
- (8-2-4): Can now deliver trim pass(es) from HDR10. Will use cm_anlayze to generate it
- (8-2-4): Can now encode a 100nits trim pass to x264/x265 SDR... Line 160 (default = NO)
- (3-1): New mode, can now generate DV with Davinci Resolve API. (Default=CM ) see line
- (3-1): Can now bake fel and upgrade a P7 rpu
- (3-1): Will now crop prores which can improve speed of the encoding, scene cut detection and metadata generation.
- (7-1 / 7-2): FEL baking is now supported without an Nvidia GPU. (was too slow before) You may gave to install the latest python(to path) and if you do, dont forget to re-install all the libraries
- (6-2): Will now create a separate maxcll frame by frame plot with interactive options. you have to run ''pip install plotly'' and add this new file in the tools folder:
- (8-2): Loop mode now has 3 options: NO, STILL or MOTION... Line 223 (default = NO)
- (7-2) Two or more 1080p inputs were upscaled to 2160p unless you manually disabled the upscaling in the settings. This is now automatic.
- (6-2): 50% faster processing of SDR inputs
- (8-2)(7-2)(6-2): added an option to specify the target nits for HLG inputs. line (default = 1000)
- (6-2) limit SDR plot to 100nits, new file needed in the tools folder.
- (8-2): BUGFIX: fix a ffms2(non-nvidia system) issue where dovibaker could fail (mismatched EL BL framecount).
ralberti
1st May 2026, 09:33
Hi guys,
I have a strange problem. I have a video file with DV Profile 8.1 dvhe 08.06. If playing the file on older android tv devices, my TV recognizes it as DV and works great. But on a newer device, with SOC S905X5M and Android 14, it starts as DV but immediatly changes to SDR. Other files don't have this problem, only some of them. I checked L5 trim and the RPU and video are aligned and I don't see any diference between this file and any other that works well. ¿Can you help me to get any clue what is happening?
Kind regards,
Kuler087
1st May 2026, 13:10
no idea
rollmayonnaise
3rd May 2026, 00:26
for the latest beta, there are new files required in 6-2.
[B]
Thanks for sharing the detailed beta changes. After downloading all the necessary files, I still had to correct what seems (from the code around it) like a small error on line 10380 of "DoVi_Scripts_MKV.bat". It looks like it should be ".avs." instead of ".mov."
Also, would you consider adding a workflow for generating comparison videos (similar to workflow 7-5) from two different sources, for example a DV P5 WEB-DL and an HDR remux? I am particularly interested in comparing cases where the WEB-DL grade appears brighter. For instance, I recently got a DV P5 WEB-DL of Rope (1948) that seems brighter according to madVR, especially compared to your HDR remux plot in your YouTube comparison.
Screenshots are not very practical for me since I cannot easily connect my PC to a proper HDR display. A video file would make it much easier to compare accurately and consistently on the appropriate device.
Kuler087
3rd May 2026, 01:04
I still had to correct what seems (from the code around it) like a small error on line 10380 of "DoVi_Scripts_MKV.bat". It looks like it should be ".avs." instead of ".mov."
Ah, right, it's because I use ProRes when I crop and I never tested the script default. set crop.prores62=NO
The script's default uses an avisynth script to crop, which is a lot slower.
Anyway, fixed in the latest beta (https://drive.google.com/file/d/128gq8aDUTKA_aT7SQsM9dkjA1EP1sosR/view?usp=drive_link).
Also, would you consider adding a workflow for generating comparison videos (similar to workflow 7-5) from two different sources, for example a DV P5 WEB-DL and an HDR remux? I am particularly interested in comparing cases where the WEB-DL grade appears brighter. For instance, I recently got a DV P5 WEB-DL of Rope (1948) that seems brighter according to madVR, especially compared to your HDR remux plot in your YouTube comparison.
Yes, I could do that.
I already have a script that creates my YouTube comparisons, but I just keep it to myself.
Kuler087
3rd May 2026, 01:27
ps: I improved the FEL expanded brightness detection in this beta version. It should be faster and even more reliable.
Can the picture type get added to the OSD for workflow 7-2 SDR 100-nit trim pass and is it possible to pick the same frame types or is it always random (B,I,P)
Kuler087
3rd May 2026, 04:20
It doesn’t get added when you use the trim-pass tone mapping because the frames are extracted from Dolby CM_Offline, which only supports intra-frame (I-frame–only) video like ProRes.
It would be possible with some effort, but I don’t think I care enough about that.
I see, thanks for the explanation.
Trying to get a more in depth understanding of MDL and L6 values. I've seen releases marked mismatched MDL specifically from MA or iTunes HDR10+ and that a hybrid P8 is not possible or improper. The CMv2.9 MDL over-dimming bug has been mentioned here as well as CMv4.0 alleviates this as it ignores the MDL value. Does the mismatch actually matter for hybrids (1000 cd/m2 vs 4000 cd/m2).
For L6 values I see a lot of releases that edit them to match HDR BL before injection. In your P8 hybrid video u noted this does not matter and can be skipped. Some releases also state if the values aren't edited it can cause under-exposure or clipping on TVs that don't support DV playback. I would assume those TVs don't access the RPU so it wouldn't even matter. So are there any implications to not matching the values in the RPU or is it just good practice?
Kuler087
3rd May 2026, 16:21
mdl mismatch doesnt matter as long as the grade check is done in 6-2(with cropping)
L6 is always useless and doesnt matter.
Gatorman3385
6th May 2026, 01:02
I have an HDR file that I would like to encode to SDR. Is there any advantage in picking a different Tuning preset when generating DV. My default is 1, Most Mapping. If my end result is an SDR file, should I use Balanced?
Kuler087
6th May 2026, 01:17
Same rule, T3 can clip.
I always use T1 + a small raise in gamma and slope. You can always use workflow 7-2 and test a few screenshots with different tuning.
fyi, automatic scene cut detection can cause unintended results with HDR compressed as low as 100nits SDR. Manual/verified SC is recommended.
Lucky38
6th May 2026, 08:15
Hello Kuler,
Do you know how to find for each hdr/dovi source white value to be used in below call?
pre = original.DGHDRtoSDR(mode="pq", white=849, gamma=1/2.4, tm=1.0)
SMDegrain(tr=3, thSAD=280, thSCD2=100, limit=140, limitC=120, thSADC=240, prefilter=pre, contrasharp=false)
Kuler087
6th May 2026, 11:34
No, and I don't care anymore about the other HDR to SDR tone mapping algo. Dolby tuning analysis(8-2-4) is way more accurate and better than anything else.
Lucky38
6th May 2026, 13:38
No, and I don't care anymore about the other HDR to SDR tone mapping algo. Dolby tuning analysis(8-2-4) is way more accurate and better than anything else.
i do not wont to convert hdr to sdr, i would like to find white point to be able to add value to smdegrain only...
Kuler087
6th May 2026, 14:00
Sorry, I dont know and can't help you with that.
What's the recommended workflow for HLG vs a retail SDR source for tonemapping?
Kuler087
7th May 2026, 13:13
You should specify a target nits that match your display.
set HLG_target_nits=1000
Kontrarian
8th May 2026, 06:37
Finally back up and running with my new computer!
This Core Ultra 7 265F and RTX 5060 Ti 16GB desktop is much faster than my i7 and GTX 1060 laptop running some of these scripts.
Thank you for everything you do @Kuler087!
I have a movie I'm looking to compare the MA DV version against the 1080p SDR BD version.
Is there a way to make a test clip for that in DoVi_Scripts?
dbuser38
8th May 2026, 11:08
I'm new to this but would understand some workflows better.
Is there a Way (Workflow) to made a HDR10 mkv File to Dolby Vision (mostly i think Profile 8.1 - that doesn't matter) ?
Kuler087
8th May 2026, 11:31
I'm new to this but would understand some workflows better.
Is there a Way (Workflow) to made a HDR10 mkv File to Dolby Vision (mostly i think Profile 8.1 - that doesn't matter) ?
workflow 3-1
Kuler087
8th May 2026, 11:33
Finally back up and running with my new computer!
This Core Ultra 7 265F and RTX 5060 Ti 16GB desktop is much faster than my i7 and GTX 1060 laptop running some of these scripts.
Thank you for everything you do @Kuler087!
I have a movie I'm looking to compare the MA DV version against the 1080p SDR BD version.
Is there a way to make a test clip for that in DoVi_Scripts?
you can make samples in 9-3 or video comparison in the new 7-6( havent tested it yet)
rollmayonnaise
8th May 2026, 22:37
Hello,
I'm running into an issue where DoVi_Scripts sometimes treats a movie I encoded in Resolve or HandBrake as SDR when I try to use workflow 7-2 for Dolby Vision tonemapping.
Basically, I'm trying to correct the apparently incorrect color space on KL's release of The Phantom. I found a Color Space Transform in Resolve that seems to reverse whatever mistake happened during authoring, and the corrected image looks promising. But to confirm 100%, I want to export the DV-tonemapped screenshot of that correction and make sure it matches with the NEW SDR Blu-ray. If I can get this working properly, I may try it on a few other titles as well.
The problem is that after exporting and injecting the RPU, I get inconsistent results. Sometimes MediaInfo reports the file as Dolby Vision Profile 8.5 with an SDR BL. Other times, if I export to ProRes/DNxHR and then encode in HandBrake, or if I export from Resolve on my Mac instead of my Windows PC, MediaInfo reports it as Dolby Vision Profile 8, but not specifically Profile 8.1.
With that latter file, when I use workflow 7-2 in DoVi_Scripts, the screenshots come out looking like the source was treated as SDR. MediaInfo does show the file as PQ / BT.2020, so I'm not sure why it's being handled that way.
One thing I wondered about is whether the lack of HDR10 metadata could be part of the issue. Maybe having HDR10 metadata present would help DoVi_Scripts, or another tool in the chain, recognize or construct it as a proper DV Profile 8.1 file. I'm not sure if that's actually relevant, though, and I don't have Resolve Studio, so I can't add HDR10 metadata directly from Resolve.
Have you successfully used your own PQ HDR encodes without HDR10 metadata, injected an RPU into them, and had DoVi_Scripts recognize them correctly? Any suggestions for making sure these files are read properly would be appreciated. Thanks!
Kuler087
8th May 2026, 22:48
If the script cannot detect HDR, it assumes SDR.
if not "!v%%i!"=="HDR" if not "!v%%i!"=="p5" if not "!v%%i!"=="HLG" set "v%%i=709"
You can try to add the HDR10 metadata with the workflow 9-9.
or
You could deliver to ProRes and then encode to HEVC with workflow 8-2-1; the script will ask you to select proper HDR10 metadata. And inject the DV metadata after the encode with workflow 1
ps: I wouldn't use HandBrake, Staxrip is a way better GUI for x265.
Same rule, T3 can clip.
I always use T1 + a small raise in gamma and slope. You can always use workflow 7-2 and test a few screenshots with different tuning.
fyi, automatic scene cut detection can cause unintended results with HDR compressed as low as 100nits SDR. Manual/verified SC is recommended.
Interesting.
I assume that in the Dolby Vision Primary Controls, "gain" is the equivalent of "slope"?
What is your typical range for gamma and slope (gain)?
What about mid-tone offset?
Thanks in advance.
Kuler087
9th May 2026, 13:48
yes gain = slope
I never raise slope too much because it clips highlights. I dont touch mid-tone.
https://i.ibb.co/Kpfn8ffY/Resolve-n-Q1-Nznt-Kjv.png
rollmayonnaise
10th May 2026, 15:05
If the script cannot detect HDR, it assumes SDR.
if not "!v%%i!"=="HDR" if not "!v%%i!"=="p5" if not "!v%%i!"=="HLG" set "v%%i=709"
You can try to add the HDR10 metadata with the workflow 9-9.
or
You could deliver to ProRes and then encode to HEVC with workflow 8-2-1; the script will ask you to select proper HDR10 metadata. And inject the DV metadata after the encode with workflow 1
ps: I wouldn't use HandBrake, Staxrip is a way better GUI for x265.
Thanks, I went with the ProRes workflow. I'll look into Staxrip. I exported the screenshots but I think I might have done something wrong at some point. So, instead of trying again, I ended up borrowing a Studio license key to preview the 100-nit DV-tonemapped look in Resolve directly compared to the (wrapped in HDR) New SDR Blu-ray. I did find one color space transform that works almost perfectly to fix The Phantom (1996)'s HDR but there is a very slight difference still. I used P3-D65 as output colorspace on the HDR clip.
Kuler087
10th May 2026, 15:13
Yes, this movie and Dead Again have color space issues (P3 vs. BT.2020) during their encoding workflow. @Dorian on Blu-ray.com showed that it could be corrected (https://forum.blu-ray.com/showpost.php?p=24027633&postcount=228).
Leprechaun is another example, but that one looks much worse.
I did a video comparison for these 3 movies:
https://youtu.be/bp8rEqs-esU
https://youtu.be/VqVjmM3_joU
https://youtu.be/M9DieaMRO2s
rollmayonnaise
10th May 2026, 16:30
Yes, this movie and Dead Again have color space issues (P3 vs. BT.2020) during their encoding workflow. @Dorian on Blu-ray.com showed that it could be corrected (https://forum.blu-ray.com/showpost.php?p=24027633&postcount=228).
Leprechaun is another example, but that one looks much worse.
I did a video comparison for these 3 movies:
https://youtu.be/bp8rEqs-esU
https://youtu.be/VqVjmM3_joU
https://youtu.be/M9DieaMRO2s
Yes, I've seen all of your comparisons and the Blu-ray.com thread, which is why I thought about trying to correct the colorspace issue. That said, the suggested fix seems to match the new SDR Blu-ray look very closely, but not perfectly when toggling back and forth in Resolve.
On another note, I just exported screenshots from the new SDR Blu-ray of Babe (1995), since that's another recent Kino Lorber release where you posted DV-tonemapped screenshots, but only compared them to the old SDR Blu-ray. I downloaded your DV-tonemapped screenshots from Slow.pics and reuploaded them alongside the new SDR Blu-ray screenshots:
I do see a noticeable difference, but I wouldn't say it looks like a colorspace issue, right? Were your Babe screenshots made with an earlier version of the script where the workflow was flawed?
Either way, it's concerning to me that two KL releases have had colorspace issues. It makes me wonder if this might affect more of them and people just haven't noticed yet. I hope they at least correct the mistake in their workflow going forward, rather than compromising remasters we may never see on the format again. I do appreciate them using FEL and keeping CMv4.0, though.
Kuler087
10th May 2026, 16:47
There's no color issues in Babe. Just because there's a DV 100nits trim pass doesn't mean that's always what they use for their SDR deliverable.
And please don't use content with filenames related to piracy, it's against this forum's rules.
Yes, this movie and Dead Again have color space issues (P3 vs. BT.2020) during their encoding workflow. @Dorian on Blu-ray.com showed that it could be corrected (https://forum.blu-ray.com/showpost.php?p=24027633&postcount=228).......
Can the correction be made using just CST?
Thank you
https://i.postimg.cc/yxwrgnGQ/Screenshot-2026-05-10-181124.png
Kuler087
10th May 2026, 17:22
I dont know, I dont care enough about these movies to try anything.
Kuler087
10th May 2026, 19:13
had a quick look using my youtube video as source, and the BT2020 to P3 resolve CS transformation function works. https://slow.pics/c/mE63qNeA
had a quick look using my youtube video as source, and the BT2020 to P3 resolve CS transformation function works. https://slow.pics/c/mE63qNeA
Perfect, it looks much better now.
The color grading is correct.
It's strange that they didn't notice the color space conversion error.
Kuler087
10th May 2026, 19:22
These so-called professionals are actually some of the biggest amateurs when it comes to quality control, so I’m not surprised.
It’s the same story with Kaleidescape. I’ve had to get them to correct tons of releases for the exact same reasons.
It would be helpful to have a list of all the movies with incorrect color spaces; maybe I have some of them myself and just haven’t looked into it further.
rollmayonnaise
10th May 2026, 20:54
And please don't use content with filenames related to piracy, it's against this forum's rules.
Sorry about that.
There's no color issues in Babe. Just because there's a DV 100nits trim pass doesn't mean that's always what they use for their SDR deliverable.
Yes, you must be right about the separate SDR deliverable. I just incorrectly assumed that it would be done the same as KL's 2 other recent releases with a trim pass delivery.
daffie
11th May 2026, 16:05
It would be helpful to have a list of all the movies with incorrect color spaces; maybe I have some of them myself and just haven’t looked into it further.
Yeah, I'm also interested in such a list.
MwenDavo
12th May 2026, 21:42
Hi. Does the script support HDR10+ to Dolby Vision Profile 8 conversion? If so, which workflow would it be? I found the 3-2 workflow but it shows as not recommended.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.