Log in

View Full Version : [DoVi_Scripts] Multi-Function Scripts for Dolby Vision processing and a lot more...


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] 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42

Kuler087
20th March 2025, 11:48
1- index single video in 9-1
2- export rpu/xml scene cut in 2-1
3- check sync like in the tutorial https://www.youtube.com/watch?v=lIO_ZfT-LnY

Korbus
21st March 2025, 15:44
Bit of help needed, please. Since an hour ago, whenever I start WF 1, after I drag and drop the mkv file, as soon as I hit Enter, the program (window) closes itself suddenly, with no error message. I have tried to switch on logging (and set to not delete the TEMP folder), but the window closes anyway and no temp folder is created to check the log or anything. This morning I used WF 8-2-1 with zero problems. The only change I can think of from today is installing ffmpeg on drive C: and then setting the path in Environment Variables (for Windows purposes - need it for zurg/rclone).
I have tried with multiple .mkvs and even tried running the .bat as administrator (typing manually the file path), same (non)result.

Kuler087
21st March 2025, 15:57
I dont know but there are not many codes between the first and second input so you can try to edit the script and add a couple of ''pause'' until you find out exactly where it crashes.
input 1 user prompt start at line 546

Korbus
21st March 2025, 16:02
How do I add pause? I have the script open, looking at line 545-548:

::user input
echo Drag and drop a file or a folder with files (MKV/TS/M2TS/HEVC/H265/RPU/XML/FOLDER) and press enter...
set /p video_path=
echo.

Kuler087
21st March 2025, 16:10
just type pause before each line you want to check and save the bat file.

::user input
echo Drag and drop a file or a folder with files (MKV/TS/M2TS/HEVC/H265/RPU/XML/FOLDER) and press enter...
set /p video_path=
echo.
pause
code
code
code
code
pause

Korbus
21st March 2025, 16:20
Did that, it closes after a couple of Enters. This is the log before the last Enter that causes the window to close: https://justpaste.it/b44eb

L.E. Sorry, there's one more Enter before it closes, with only these lines:

E:\Filme High Definition>goto :skip.direct

E:\Filme High Definition>pause
Press any key to continue . . .

Kuler087
21st March 2025, 16:53
looks like whatever you did broke the HDD space check...

You can try to remove the code, it wont affect the output.

::Use PowerShell to get disk space information
for /f "tokens=*" %%A in ('powershell -command "(Get-WmiObject Win32_LogicalDisk | Where-Object { $_.DeviceID -eq '%letterpath%' }).FreeSpace"') do set "free=%%A"
for /f "tokens=*" %%A in ('powershell -command "(Get-WmiObject Win32_LogicalDisk | Where-Object { $_.DeviceID -eq '%letterpath%' }).Size"') do set "total=%%A"
::Calculate used space
for /f %%A in ('powershell -command "[math]::Floor([long]%free% / 1GB)"') do set "free_gb=%%A"
if %free_gb% leq 200 echo \033[31m WARNING: Output path "%output_path%" has only %free_gb%GB of free space. Processing large file may not work.... | "%cmdcolor%"

Korbus
21st March 2025, 17:07
I did, and then it progressed until the analysis of the input and closed again. I think it has something to do with Powershell, which might have been corrupted, and I don't know how to fix it, I'll just google it. Obviously, nothing to do with DoVi_Scripts.
Thanks for your help!

L.E. after trying to reinstall/upgrade PowerShell and Net Framework and getting no results, I have restored a 3-days old system backup (which i was very lucky to have, as I do backups only once in few months), from before my messing with ffmpeg and Git. Now DS runs without a problem, as expected.

Kuler087
21st March 2025, 21:20
Since my next TV (G5) will be able to play most content without tone mapping, I thought it would be useful to list all the 4000-nit movie grades. So, I added two new tabs to my Google Drive Excel sheet:

1- movies brighter than 1000nits: https://docs.google.com/spreadsheets/d/15i0a84uiBtWiHZ5CXZZ7wygLFXwYOd84/edit?gid=1557834794#gid=1557834794
2- movies that are practically SDR in HDR container: https://docs.google.com/spreadsheets/d/15i0a84uiBtWiHZ5CXZZ7wygLFXwYOd84/edit?gid=1488998734#gid=1488998734

The dark grades list will be updated frequently over the next few days, as many movies are graded under 300 nits, and I'm still going through my library. For the bright grades list, I think I found most of them (about 200 titles)

Kontrarian
22nd March 2025, 00:40
When you see DV trims that are just a straight line across do you just consider that fake DV and then generate your own?

Example: https://slow.pics/c/1RFW8qRG

Or do those straight trims on L3 still help your TV to tone map somewhat?

Kuler087
22nd March 2025, 01:27
There is no trim at all for this movie and the cmv4.0 metadata is only for the first two frames (older MA WEB-DLs have this weird authoring).
So yes, I generate cmv4.0 DV with original scene cuts (https://ibb.co/QvGCHyj6) when the original is only cmv2.9 without trims. I even did a trim (https://ibb.co/gLmXc9sZ) for this movie.

Kontrarian
22nd March 2025, 06:33
Yeah, I saw the P5 to P8 RPU on your Google drive (I think it's from iTunes).
When I plotted it I got L1 and L2 but no L3.
When I plotted the Movies Anywhere RPU I get the L3 but it just has MIN going straight across at 2048, MAX at 1641, and AVG at 1016.
So I figured it's probably best to use your "The Prestige (2006)_BD_Resolve.bin" but was wondering what's the deal with that L3 plot?

Kuler087
22nd March 2025, 15:35
it doesnt matter, its only for the first two frames.

https://i.ibb.co/HfhTjRMM/firefox-40-FW8-Tv-Snd.png

Kontrarian
25th March 2025, 12:04
Woah, I feel like an idiot... I didn't even pay attention to the X axis at all and just assumed it was the entire films timeline.

Which one of your files do you recommend we use, The Prestige (2006)_BD_Resolve.bin or The.Prestige.2006.BD-US.Generated.OSC.bin?

https://slow.pics/c/1ChKbXgp

coopzr
3rd April 2025, 08:56
@Kuler087

6-2 measure brightness with cropping produces a prores video much faster than 8-2-2.

Is the 6-2 prores video sufficient to generate the DV metadata in Resolve or would using the proper 8-2-2 video produce more accurate DV metadata in Resolve?

EDIT:
I was mistaken, they take the same time. I could have sworn 6-2 produced a prores faster previously...

Kuler087
3rd April 2025, 11:57
6-2 does process prores faster but it doesn't index the frames and use qscale 8(more compression).
It should still be fine for Resolve.

Kuler087
3rd April 2025, 11:58
Which one of your files do you recommend we use, The Prestige (2006)_BD_Resolve.bin or The.Prestige.2006.BD-US.Generated.OSC.bin?

https://slow.pics/c/1ChKbXgp
The one I did trims:

The.Prestige.2006 BD Generated OSC T3 (MANUAL TRIMS)

lauguru
8th April 2025, 11:36
@Kuler087 Salut!


Can XML (DaVinci) be converted to RPU or BIN? If so, could it be added?

Kuler087
8th April 2025, 12:16
yes, of course. Run it in workflow 1 or plot it in 6-3

lauguru
8th April 2025, 12:51
yes, of course. Run it in workflow 1 or plot it in 6-3

ok thanks

dapope
21st April 2025, 06:19
Hi @Kuler087 (thanks again for all your hard work!) or anyone else in the know.

Just wanted to check that I'm correctly understanding how the 1000 nits vs 4000 nits mdl stuff and L2 trims works.

Last night I watched The Nice Guys 2016 (which you analysed here: https://www.youtube.com/watch?v=wlix5YFMLI8&t=15s). I watched on my LG CX internal player after using your tool to convert to P8. The movie is MEL so no concerns about FEL expand brightness.

Highlights in the movie looked great however I thought that the overall look was a little dim. The movie is one of those that has a 4000 mdl but barely goes over 1000 nits, and in such cases you recommend changing the MDL to 1000 nits when creating a new DV grade from the algorithm. But am I correct in thinking that since the film has L2 trims and I wasn't creating a new DV grade, that the film was tonemapped appropriately and appeared as intended?

Thanks again!

Kuler087
21st April 2025, 12:03
Well, this movie was mastered with the old cmv2.9 algo, which has a slight black crush, especially with 4000/10000 MDL, and the trim in this movie doesn't add much(mostly static), so it might look better with the cmv4.0 balanced tuning @ 1000nits MDL indeed.

dapope
22nd April 2025, 06:39
Well, this movie was mastered with the old cmv2.9 algo, which has a slight black crush, especially with 4000/10000 MDL, and the trim in this movie doesn't add much(mostly static), so it might look better with the cmv4.0 balanced tuning @ 1000nits MDL indeed.

Thank you for your response!
To get a "not perfect, but good enough" solution, is there a quick way to simply edit the DV metadata to change the mdl to 1000 nits, or does such a change require remaking the DV from scratch? I had a poke around your program but couldn't find if it was an option.

Kuler087
22nd April 2025, 12:01
Workflow 1/Q can edit source_pq, but this would make metadata inaccurate because Dolby calculates (https://slow.pics/c/xlgE3H1t) them differently based on the MDL.

I generated cmv4.0 1000 MDL for this movie here (https://drive.google.com/file/d/1x-zgtaArhnwO9if-lzagweXJzrZaL5KS/view?usp=drive_link).

Kontrarian
25th April 2025, 23:36
@Kuler087

I see your signature has been updated to now show: LG OLED G5 77''

How are you liking it so far?
Care to share your impressions (pros and cons)?

Kuler087
26th April 2025, 00:06
Haven't received it yet; the tracking says it should arrive on Tuesday.
It will be a massive upgrade for sure (800nits C2 to 2500nits G5). The expanded brightness through some of the FEL movies is going to have a huge impact now, can't wait!

Kontrarian
29th April 2025, 23:32
@Kuler087, todays the BIG DAY!!!

Kuler087
30th April 2025, 00:06
YEAH! :D
Uniformity is already ten times better than on my C2... I just wish I didn’t have to work this week. More intensive testing will have to wait until the weekend.

SamuriHL
30th April 2025, 00:08
That's a good sign though. Are you planning on calibrating it?

Kuler087
30th April 2025, 00:26
Yep, for sure. I’ll give it a couple of weeks to break in and let a few firmware updates roll out before calibrating.

SamuriHL
30th April 2025, 00:49
Yea that makes sense. Given what you said about black crush there's no getting around a proper calibration to fix that. But I suspect that thing is going to ROCK once it's broken in and calibrated. They're finally getting closer to what I wanted to see for my next panel. I'm curious if they've improved on bt.2020 support in terms of percent covered.

TR-9970X
30th April 2025, 03:11
I'm pretty impressed with my "old" C4 65" LG, although I haven't bothered to calibrate it....it's SO much better that the 2018 55" I had (which died, btw, the screen just went black, one night, and that's it)

Kontrarian
30th April 2025, 06:16
Yeah, no point in calibrating a panel in it's first 200 hours, that's for sure.

My C8 is still hanging in there!

Gatorman3385
14th May 2025, 01:27
DoVi_Scripts (8-2-3) is running DoviBaker on a P7 MEL to ProRes. Is this the intended behavior?

Kuler087
14th May 2025, 01:50
nop...
fix: https://drive.google.com/file/d/128gq8aDUTKA_aT7SQsM9dkjA1EP1sosR/view?usp=drive_link

en6ads
14th May 2025, 15:07
Hi all,

Are the colorist's manual Level 2 / Level 8 adjustments from Level 1 (a Dolby algorithm) stored separately in the RPU?

If I use CPM A14 with the updated skins, in the PPI page can I see the Level 1 values, the Level 2/8 adjustments from Level 1, then the combined result?

I'd like to know what the colorist's are doing in Level 2/8 and how they differ from what Dolby calculates.

Thank you.

Kuler087
14th May 2025, 15:22
CPM OSD info is only for L1/L5 and will not display the trims values. How strong the trim's effect is will depend on your display target brightness.
DoVi_scripts has a workflow(7-4) that lets you see the L1 mapping alone and the L1+L2(or L8/L3) mapping. I already created many examples here:
https://drive.google.com/drive/folders/1g5I-z_sJmVu-SAIPNiiSlcdMiy2ka0mf

I also did a couple of L1 and L2/L8 trims test files here: https://drive.google.com/drive/u/1/folders/1nMz95KqgkO95EDGrYhrk-Ifx6vRYDEfs

Note that there will be a difference between cmv2.9 and 4.0. I just did some L1 mapping tests about it on my new G5 here:
https://docs.google.com/spreadsheets/d/15i0a84uiBtWiHZ5CXZZ7wygLFXwYOd84/edit?gid=1289366200#gid=1289366200

en6ads
14th May 2025, 15:58
CPM OSD info is only for L1/L5 and will not display the trims values. How strong the trim's effect is will depend on your display target brightness.
DoVi_scripts has a workflow(7-4) that lets you see the L1 mapping alone and the L1+L2(or L8/L3) mapping. I already created many examples here:
https://drive.google.com/drive/folders/1g5I-z_sJmVu-SAIPNiiSlcdMiy2ka0mf

I also did a couple of L1 and L2/L8 trims test files here: https://drive.google.com/drive/u/1/folders/1nMz95KqgkO95EDGrYhrk-Ifx6vRYDEfs

Note that there will be a difference between cmv2.9 and 4.0. I just did some L1 mapping tests about it on my new G5 here:
https://docs.google.com/spreadsheets/d/15i0a84uiBtWiHZ5CXZZ7wygLFXwYOd84/edit?gid=1289366200#gid=1289366200

Thank you. I've submitted a feature request to CPM github. I would like to see in the PPI osd if level 2 / 8 trims exist, and if so what are they. Also level 3 but how often does that get used?

Kuler087
14th May 2025, 16:28
Most movies are trimmed at least at 100nits and the other target gets interpolated from those adjustments.
L3 is auto-generated and stores the mid-offset adjustments.

Not sure how CPM will add the trim's value in the OSD. That would take a lot of space since the cmv4.0 workflow auto-generated L2 trims at 100,600 and 1000nits (to fix the buggy cmv2.9).
that's a lot of data to add, EG:

"Level2": {
"target_max_pq": 2081,
"trim_slope": 1611,
"trim_offset": 2023,
"trim_power": 1380,
"trim_chroma_weight": 2048,
"trim_saturation_gain": 2048,
"ms_weight": 2048
}
},
{
"Level2": {
"target_max_pq": 2851,
"trim_slope": 2066,
"trim_offset": 2048,
"trim_power": 1959,
"trim_chroma_weight": 2048,
"trim_saturation_gain": 2048,
"ms_weight": 2048
}
},
{
"Level2": {
"target_max_pq": 3079,
"trim_slope": 2049,
"trim_offset": 2048,
"trim_power": 2046,
"trim_chroma_weight": 2048,
"trim_saturation_gain": 2048,
"ms_weight": 2048
}
]
},
"cmv40_metadata": {
"num_ext_blocks": 6,
"ext_metadata_blocks": [
{
"Level3": {
"min_pq_offset": 2048,
"max_pq_offset": 2048,
"avg_pq_offset": 1660
}
},
{
"Level8": {
"length": 10,
"target_display_index": 1,
"trim_slope": 2060,
"trim_offset": 2048,
"trim_power": 2009,
"trim_chroma_weight": 2048,
"trim_saturation_gain": 2048,
"ms_weight": 2048
}
},
{
"Level8": {
"length": 10,
"target_display_index": 28,
"trim_slope": 2048,
"trim_offset": 2048,
"trim_power": 2048,
"trim_chroma_weight": 2048,
"trim_saturation_gain": 2048,
"ms_weight": 2048

en6ads
14th May 2025, 19:37
I'm sure they can fit L2/L8 and L3 data on the screen somewhere! Might get busy, but there's room.

Kuler087
14th May 2025, 20:29
I'd be surprised if he accepted your request because 99.999999% of users wouldn't even understand the data. Do you understand the data I just posted?
The trims metadata is not like L1, which is easy to understand because it just tells you about the scene's max, average, and minimum brightness.

If you want to see what the colorist did, just watch the tons of samples I posted or create a new sample from any frame of any movie using workflow 7-4.

EG:

https://i.ibb.co/RGB4V1Jy/manual-trims.gif

en6ads
15th May 2025, 03:18
What's the best Windows player currently for correct playback of Dolby Vision mkv rips on a laptop that has a HDR OLED panel (Samsung SDC419D, 10bit 450 nits) and official DV support? Most of my rips are profile 7 cm2.9 Mel and fel. I've seen your YouTube comparing Energy Player and Madvr but that was a while ago. Use case is just for travel. Don't worry I have a couple of Ugoos for home! Thank you.

en6ads
15th May 2025, 03:48
I'd be surprised if he accepted your request because 99.999999% of users wouldn't even understand the data. Do you understand the data I just posted?
The trims metadata is not like L1, which is easy to understand because it just tells you about the scene's max, average, and minimum brightness.

If you want to see what the colorist did, just watch the tons of samples I posted or create a new sample from any frame of any movie using workflow 7-4.

EG:

https://i.ibb.co/RGB4V1Jy/manual-trims.gif

I'm not a colorist and I've never used any of Dolby's trim controls. I know level 2 and 8 are per target as you say, Lift, Gamma and Gain, with cm4 increasing that to 21 total controls (sounds complicated!).

I'll go through your examples splitting out the levels - thank you for sharing.

I just feel like if CPM is only displaying level 1, then that's not the whole story. If there's a meaningful way to expose RPU L2 (cm2.9) and L3, L8 (cm 4.0), I'd like to see it.

Kontrarian
17th May 2025, 08:18
What's the best Windows player currently for correct playback of Dolby Vision mkv rips on a laptop that has a HDR OLED panel (Samsung SDC419D, 10bit 450 nits) and official DV support? Most of my rips are profile 7 cm2.9 Mel and fel. I've seen your YouTube comparing Energy Player and Madvr but that was a while ago. Use case is just for travel. Don't worry I have a couple of Ugoos for home! Thank you.

MPC-BE works well.

Fuso
17th May 2025, 14:13
These two movies look like day and night on my LG C2. Cars 3 is bright and vivid but Cars 2 is dull and dark. Is there any way I can "fix" that? I never really undrestood fully the L1-L6 settings of the DoVi. Only L5 is known to me which sets the borders for the active area of Dolby Vision. I see that both are CM v2.9 and from what I've noticed mentioning it here v4.0 is better.

https://i.ibb.co/27jP1kP0/Cars-3-2017-Hybrid-UHD-Blu-Ray-Remux-2160p-DV-L1-Plot.png (https://ibb.co/4ZjMnVMw)

https://i.ibb.co/cKrH1pKp/Cars-2-2011-Hybrid-UHD-Blu-Ray-Remux-2160p-DV-L1-Plot.png (https://ibb.co/p6L8xs6s)

Kuler087
17th May 2025, 14:13
What's the best Windows player currently for correct playback of Dolby Vision mkv rips on a laptop that has a HDR OLED panel (Samsung SDC419D, 10bit 450 nits) and official DV support? Most of my rips are profile 7 cm2.9 Mel and fel. I've seen your YouTube comparing Energy Player and Madvr but that was a while ago. Use case is just for travel. Don't worry I have a couple of Ugoos for home! Thank you.


Sorry, I missed your reply.

MPC/MadVR is great for HDR10/SDR, but for DV, the Energy player should be good on Windows 11. The red push bug I'm talking about in the YouTube video is only affecting Windows 10.
Windows 11 has a black crush problem in HDR10 though . Windows 10 is fine.

Kuler087
17th May 2025, 14:17
These two movies look like day and night on my LG C2. Cars 3 is bright and vivid but Cars 2 is dull and dark. Is there any way I can "fix" that? I never really undrestood fully the L1-L6 settings of the DoVi. Only L5 is known to me which sets the borders for the active area of Dolby Vision. I see that both are CM v2.9 and from what I've noticed mentioning it here v4.0 is better.



Nothing to fix here. One is graded at only 200 nits on average, and the other one looks like a 4000-nit master. I always find it funny when studios decide to grade movies so differently within the same franchise.

Fuso
18th May 2025, 11:32
I see. It is what it is... and congrats on the G5.

Kuler087
18th May 2025, 14:46
Thanks, the G5 is a beast and I love it, but HDR10 is broken (https://slow.pics/c/AYrYCbvm)(banding and posterization). It doesn't affect me because I generate DV for everything...

FYI, Cars 3 P8 hybrid cannot be made. The HDR10 BD layer is a 600 nits trim, and the DV master is 4000 nits.

Grade check...
Cars 1: https://slow.pics/c/PGCSvxu9
Cars 2: https://slow.pics/c/79SARikb
Cars 3: https://slow.pics/c/RldFk4g9

coopzr
19th May 2025, 13:48
Thanks, the G5 is a beast and I love it, but HDR10 is broken (https://slow.pics/c/AYrYCbvm)(banding and posterization). It doesn't affect me because I generate DV for everything...

HDR10 banding is common on other LG OLED's right? If I can recall from memory, I too saw the banding while watching the martian on the C4.