R3S3t9999 / DoVi_Scripts

User-friendly / drag & drop scripts to process any HDR / Dolby Vision files and more...
143 stars 6 forks source link

hdr10+ sync #16

Closed boohboot closed 7 months ago

boohboot commented 7 months ago

Hey, its BooHboot from youtube, I was no longer able to reply.

check this out

https://uploadnow.io/f/C9wsqCq

R3S3t9999 commented 7 months ago

Yes, I know how the resynced json is supposed to look but I don't have a script to do it and as explained on youtube, I was only to write a python script that can resync all the scene blocks but I couldn't get the scene summary right at the end of the json. If you have a script that works, I'll be happy to integrate into the dovi_scripts and allow HDR10plus resync. thanks

boohboot commented 7 months ago

But thats what im telling you, it is done upon injection.

R3S3t9999 commented 7 months ago

What? I don't understand... I dont follow the hdr10plus_tool dev a lot but please tell me what CLI you use that can resync HDR10plus. AFAIK, if you just inject metadata that is not in sync with the BL, the outcome will be OOS. You can verify with workflow 2-3 in dovi_scripts

boohboot commented 7 months ago

I did it manually with a text editor just added 16 frames to the sceneinfo and injected.

https://github.com/quietvoid/hdr10plus_tool/issues/41

R3S3t9999 commented 7 months ago

Sorry I dont follow. Please give me your original and edited json. if I understand you, you're saying that you only have to edit the ''SceneInfoSummary'' ?

In my book, you have to remove or duplicate sceneinfo blocks and adjust all the shots frame index/scene cuts and adjust the summary which is something that would take forever to do manually.

boohboot commented 7 months ago

no, I dont edit the summary just the sceneinfo.

i copied 16 of these :

"BezierCurveData": { "Anchors": [ 178, 359, 542, 702, 750, 794, 848, 902, 936 ], "KneePointX": 36, "KneePointY": 76 }, "LuminanceParameters": { "AverageRGB": 9, "LuminanceDistributions": { "DistributionIndex": [ 1, 5, 10, 25, 50, 75, 90, 95, 99 ], "DistributionValues": [ 0, 9996, 100, 0, 0, 1, 11, 31, 10447 ] }, "MaxScl": [ 17726, 11224, 30127 ] }, "NumberOfWindows": 1, "TargetedSystemDisplayMaximumLuminance": 500, "SceneFrameIndex": 0, "SceneId": 0, "SequenceFrameIndex": 0 }, {

to the start and injected it, the tool did the rest.

here are the jsons.

https://uploadnow.io/f/jL4KY2t

R3S3t9999 commented 7 months ago

ok, now I understand. I should be able to script something...

Did you try if it works when you remove blocks?

boohboot commented 7 months ago

Yes, both trimming and adding affect the sync :)

R3S3t9999 commented 7 months ago

please try this version And you have to put this python script in your tools folder

Workflow 1-1.. metadata input must be a json

boohboot commented 7 months ago

First run didnt work, maybe i dont dependencies for the py script.

whats this?

Input frame rate seems messed up, it was forced to 23.976 but you should fix it in 2-1-3...

when i try to extract the hevc from the injected file i also get this

Application provided invalid, non monotonically increasing dts to muxer in stream 0: 3502 >= 3502

R3S3t9999 commented 7 months ago

It works fine on my end. Try manually:

python D:\DoVi_Scripts\tools\HDR10plus_resync.py -input D:\input.json -output D:\output.json -r 120 python D:\DoVi_Scripts\tools\HDR10plus_resync.py -input D:\input.json -output D:\output.json -d 120

''Application provided invalid, non monotonically increasing dts to muxer in stream 0: 3502 >= 3502'' I don't know, ffmpeg reports that sometimes.

boohboot commented 7 months ago

there is seems to be a problem with the final mkv output of your script. i think the jsons are identical (after extraction) but its a remuxing problem. scenecut 2336 is off by +1 frame.

i remuxed it manually with toolnix and it was ok.

https://uploadnow.io/f/35cg9nC

use scenecut number 2336 for testing

R3S3t9999 commented 7 months ago

Theres a bug in 2.0.2 for workflow 2-1-3, so if you tried to fix the framerate first, it is probably the source of your problem. use the latest beta I gave you if you want to fix the framerate first.

boohboot commented 7 months ago

I didn't fix anything. (what's there is to fix?) just used 1-1 like u told me.

R3S3t9999 commented 7 months ago

I use 1-1 every day, theres no muxing issue. And you're the one who talked about messed up framerate and 2-1-3

''Input frame rate seems messed up, it was forced to 23.976 but you should fix it in 2-1-3...''

boohboot commented 7 months ago

I don't know man, i have a headache. lol...

zdm9981 commented 4 months ago

hi i used your script to sync the metadata, but i noticed some parts are not resyned in the plot. is it correct? hdr10plus_plot

resynced_hdr10plus_plot

R3S3t9999 commented 4 months ago

I guess... But you should always double-check your synced scene cuts compared to the BL in workflow 2-3

zdm9981 commented 4 months ago

well i tried but it gives me an error for the resynced json

Error: Config length is not the same as shots total duration. Config: 172388, Shots: 172401 Parsing RPU file... Error: No RPU found

R3S3t9999 commented 4 months ago

Update your HDR10plus_tool.exe

zdm9981 commented 4 months ago

its the lastest one

R3S3t9999 commented 4 months ago

then, you'll have to extract the synced HDR10plus json from your video. I think you can input the mkv in 2-3 and if your input has both DV and HDR10plus, you can add ''FORCEHDR10PLUS'' in the filename.

zdm9981 commented 4 months ago

matches perfectly!

thank you :)