Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
Message
Author
legosoff
Posts: 42
Joined: Sun Sep 25, 2022 1:43 pm

Re: Dolby Vision now possible through MP4 Mux.

#7441 Post by legosoff » Mon Sep 26, 2022 8:17 am

sw5163 wrote:
Mon Sep 26, 2022 12:13 am
legosoff wrote:
Sun Sep 25, 2022 1:55 pm
Hi! 7) MODE.M4= MP4_MUXER Workflows / 4) MODE.4= Apple iOS compatible MP4 after my iPhone 12 Pro max why is the screen green? https://radikal.host/i/photo.1wEtX
It's most likely caused by the additional mapping data in FEL RPU.
sw5163 wrote:
Tue Sep 06, 2022 12:28 am
staknhalo wrote:
Mon Sep 05, 2022 10:54 pm
You see flashing color artifacts as a result of RPU being improperly misaligned, but processed (or attempted, it's affecting it in some way)
I think those are caused by processing "reshaping data" in RPU (polynomial, and MMR mapping).

From my understanding, P5 RPU has "reshaping data" for ICtCp->YCbCr.
P8.1 RPU doesn't need "reshaping data" for HDR10->HDR10.
P8.4 RPU has "reshaping data" for HLG->PQ.
P7 RPU has "reshaping data" for processing the weird colour in EL (I'm not sure what it really does)

MPV can adapt those polynomial, and MMR mapping for ICtCp->YCbCr, HLG->HDR10 etc.
However, it can't process EL and merge that with BL like proper dolby decoding engine.
Resulting in wrongly processing those "reshaping data" on BL.

I think RPU consists ("reshaping data" for colour space transformation) + (Levels for brightness/contrast trimming)
So you can see some artifacts when scene/brightness change, but it's wrong.
And MPV just abandons all the brightness/contrast trimming.

It’s also probably the reason why it’s so important to “remove_mapping” when converting FEL->MEL

I'm not sure about this, please point out my mistakes, many thanks.
I'm not sure if RESET_9999 's script supports "remove_mapping", you may need to wait for his guidance.
If not, you can also do it manually https://www.avsforum.com/threads/apple- ... n.3252865/
Thanks for the reply. How do I re-process, 4) MODE.P= / 2) MODE.2= right?

RESET_9999
Posts: 2094
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

#7442 Post by RESET_9999 » Mon Sep 26, 2022 12:51 pm

legosoff wrote:
Mon Sep 26, 2022 8:17 am
Thanks for the reply. How do I re-process, 4) MODE.P= / 2) MODE.2= right?
if your input is a bluray disc folder yes. 7-4-2 or 7-4-3
if it's a P7 mkv then use 7-4-4 or 7-4-5

7-4-1 is only for when you want to mux raw P5/P8 HEVC,AC3,EC3,SRT...

hell001
Posts: 11
Joined: Sat Mar 26, 2022 1:29 am

Re: Dolby Vision now possible through MP4 Mux.

#7443 Post by hell001 » Mon Sep 26, 2022 3:46 pm

Hi all. Stupid question here, but is there a difference between a 1080p DV layer and 2160p DV layer? There is a release I am trying to hybridize and I have the 4K HDR, but only have access to the 1080p Profile 5 DV. Does anyone have any experience with something like that?

kazuma
Posts: 162
Joined: Fri Nov 08, 2019 9:51 pm

Re: Dolby Vision now possible through MP4 Mux.

#7444 Post by kazuma » Mon Sep 26, 2022 4:02 pm

RESET_9999 wrote:
Mon Sep 26, 2022 12:51 pm
legosoff wrote:
Mon Sep 26, 2022 8:17 am
Thanks for the reply. How do I re-process, 4) MODE.P= / 2) MODE.2= right?
if your input is a bluray disc folder yes. 7-4-2 or 7-4-3
if it's a P7 mkv then use 7-4-4 or 7-4-5

7-4-1 is only for when you want to mux raw P5/P8 HEVC,AC3,EC3,SRT...
how do i know when it is a profile 7 file?

LV8HD
Posts: 37
Joined: Tue Jan 11, 2022 3:48 pm

Re: Dolby Vision now possible through MP4 Mux.

#7445 Post by LV8HD » Mon Sep 26, 2022 4:11 pm

Hi, I'm kind of new to this script, and every time I try to measure something (HDR10, HDR10Plus or DoVi) I get many errors. I don't know why, since I'm pretty sure I installed all the required py modules. Anyway, this is the log file:

Code: Select all

Drag and drop an MKV HDR10 file and press enter..C:\Muxing\Nobody.2021.2160p.AMZN.WEB-DL.x265.10bit.HDR10Plus.DDP5.1-SWTYBLZ_chunk.mkv
Extracting track 0 with the CodecID 'V_MPEGH/ISO/HEVC' to the file 'C:\TEMP2_folder\BL.hevc'. Container format: HEVC/H.265 elementary stream
Progress: 100%
min: 0.0050 cd/m2, max: 1000 cd/m2
Extracting HDR10plus...
Reading parsed dynamic metadata... Done.
Reordering metadata... Done.
Generating and writing metadata to JSON file... Done.
Reading JSON file..
Plotting graph..
Traceback (most recent call last):
  File "C:\Muxing\Tools\Dolby_Vision\DoVi_Scripts\tools\hdr10plus_plot.py", line 97, in <module>
    plt.savefig('nits_plot.png', dpi=150)
  File "C:\Users\leona\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\pyplot.py", line 977, in savefig
    res = fig.savefig(*args, **kwargs)
  File "C:\Users\leona\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\figure.py", line 3058, in savefig
    self.canvas.print_figure(fname, **kwargs)
  File "C:\Users\leona\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\backends\backend_qtagg.py", line 85, in print_figure
    super().print_figure(*args, **kwargs)
  File "C:\Users\leona\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\backend_bases.py", line 2319, in print_figure
    result = print_method(
  File "C:\Users\leona\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\backend_bases.py", line 1648, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\leona\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\_api\deprecation.py", line 415, in wrapper
    return func(*inner_args, **inner_kwargs)
  File "C:\Users\leona\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\backends\backend_agg.py", line 541, in print_png
    mpl.image.imsave(
  File "C:\Users\leona\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\image.py", line 1675, in imsave
    image.save(fname, **pil_kwargs)
  File "C:\Users\leona\AppData\Local\Programs\Python\Python310\lib\site-packages\PIL\Image.py", line 2317, in save
    fp = builtins.open(filename, "w+b")
PermissionError: [Errno 13] Permission denied: 'nits_plot.png'
Impossibile trovare il file specificato.
""Nobody.2021.2160p.AMZN.WEB-DL.x265.10bit.HDR10Plus.DDP5.1-SWTYBLZ_chunk_HDR10plus_plot.png"" non è riconosciuto come comando interno o esterno,
 un programma eseguibile o un file batch.
the script has completed...
Premere un tasto per continuare . . .

To be 100% sure I have all the required modules this is my py list:

Code: Select all

Package           Version
----------------- -------
astroid           2.12.10
awsmfunc          1.3.2
colorama          0.4.5
colour-science    0.4.1
cycler            0.11.0
dill              0.3.5.1
ffprobe           0.5
fonttools         4.37.1
ijson             3.1.4
imageio           2.21.2
isort             5.10.1
kiwisolver        1.4.4
lazy-object-proxy 1.7.1
matplotlib        3.5.3
mccabe            0.7.0
mypy              0.971
mypy-extensions   0.4.3
numpy             1.23.3
packaging         21.3
Pillow            9.2.0
pip               22.2.2
platformdirs      2.5.2
plotbitrate       1.0.8.0
pylint            2.15.2
pyparsing         3.0.9
PyQt5             5.15.7
PyQt5-Qt5         5.15.2
PyQt5-sip         12.11.0
python-dateutil   2.8.2
scipy             1.9.1
setuptools        63.2.0
six               1.16.0
tomli             2.0.1
tomlkit           0.11.4
typing_extensions 4.3.0
ujson             5.5.0
VapourSynth       60
vs-rekt           1.0.0
vsutil            0.7.0
wheel             0.37.1
wrapt             1.14.1
Could someone help me?

RESET_9999
Posts: 2094
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

#7446 Post by RESET_9999 » Mon Sep 26, 2022 4:18 pm

hell001 wrote:
Mon Sep 26, 2022 3:46 pm
Hi all. Stupid question here, but is there a difference between a 1080p DV layer and 2160p DV layer? There is a release I am trying to hybridize and I have the 4K HDR, but only have access to the 1080p Profile 5 DV. Does anyone have any experience with something like that?
you only have to edit L5.
kazuma wrote:
Mon Sep 26, 2022 4:02 pm
how do i know when it is a profile 7 file?
mediainfo ( text view / HDR format):
Dolby Vision, Version 1.0, dvhe.07.06, BL+EL+RPU

you only need to know that information when you are using Workflow.1 (manual). the other workflows auto-detect the input profile.

RESET_9999
Posts: 2094
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

#7447 Post by RESET_9999 » Mon Sep 26, 2022 4:22 pm

LV8HD wrote:
Mon Sep 26, 2022 4:11 pm
Hi, I'm kind of new to this script, and every time I try to measure something (HDR10, HDR10Plus or DoVi) I get many errors. I don't know why, since I'm pretty sure I installed all the required py modules. Anyway, this is the log
Could someone help me?
interesting, it fails when it tries to save the data into a graph, I have never seen that error and I didn't write that python script so I can't really help you here.( I assure you it's working on my PC)

did you install this version of color science?
https://pypi.org/project/colour-science

hell001
Posts: 11
Joined: Sat Mar 26, 2022 1:29 am

Re: Dolby Vision now possible through MP4 Mux.

#7448 Post by hell001 » Mon Sep 26, 2022 4:28 pm

RESET_9999 wrote:
Mon Sep 26, 2022 4:18 pm
hell001 wrote:
Mon Sep 26, 2022 3:46 pm
Hi all. Stupid question here, but is there a difference between a 1080p DV layer and 2160p DV layer? There is a release I am trying to hybridize and I have the 4K HDR, but only have access to the 1080p Profile 5 DV. Does anyone have any experience with something like that?
you only have to edit L5.
Sorry, can you clarify what you mean? The phrasing of your answer seems to imply that it doesn't matter that it's 1080p, but I was hoping to hear more about it.

LV8HD
Posts: 37
Joined: Tue Jan 11, 2022 3:48 pm

Re: Dolby Vision now possible through MP4 Mux.

#7449 Post by LV8HD » Mon Sep 26, 2022 4:31 pm

RESET_9999 wrote:
Mon Sep 26, 2022 4:22 pm
LV8HD wrote:
Mon Sep 26, 2022 4:11 pm
Hi, I'm kind of new to this script, and every time I try to measure something (HDR10, HDR10Plus or DoVi) I get many errors. I don't know why, since I'm pretty sure I installed all the required py modules. Anyway, this is the log
Could someone help me?
interesting, it fails when it tries to save the data into a graph, I have never seen that error and I didn't write that python script so I can't really help you here.( I assure you it's working on my PC)

did you install this version of color science?
https://pypi.org/project/colour-science
I did, as you can see it is in my pip list

RESET_9999
Posts: 2094
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

#7450 Post by RESET_9999 » Mon Sep 26, 2022 4:34 pm

hell001 wrote:
Mon Sep 26, 2022 4:28 pm
Sorry, can you clarify what you mean? The phrasing of your answer seems to imply that it doesn't matter that it's 1080p, but I was hoping to hear more about it.
You can use my script (Mode.I / Workflow.1) and choose the automatic L5(when the script ask you)...

or

manually:
You convert the RPU to profile 8 as usual and you edit L5 to match the 4k video. E.G. if the 4k video has an active area of 1600px then L5 is:

Code: Select all

{
    "mode": 3,
    "active_area": {
        "crop": false,
        "presets": [
            {
                "id": 0,
                "left": 0,
                "right": 0,
                "top": 280,
                "bottom": 280
            }
        ],
        "edits": {
            "all": 0
        }
    }
}

hell001
Posts: 11
Joined: Sat Mar 26, 2022 1:29 am

Re: Dolby Vision now possible through MP4 Mux.

#7451 Post by hell001 » Mon Sep 26, 2022 4:42 pm

RESET_9999 wrote:
Mon Sep 26, 2022 4:34 pm
hell001 wrote:
Mon Sep 26, 2022 4:28 pm
Sorry, can you clarify what you mean? The phrasing of your answer seems to imply that it doesn't matter that it's 1080p, but I was hoping to hear more about it.
You can use my script (Mode.I / Worlflow.1) and choose the automatic L5(when the script ask you)...

or

manually:
You convert the RPU to profile 8 as usual and you edit L5 to match the 4k video. E.G. if the video has an active area of 1600px than L5 is:

Code: Select all

{
    "mode": 3,
    "active_area": {
        "crop": false,
        "presets": [
            {
                "id": 0,
                "left": 0,
                "right": 0,
                "top": 280,
                "bottom": 280
            }
        ],
        "edits": {
            "all": 0
        }
    }
}
Thank you, I'll check that out. I've made hybrids before, but not one where the quality on the DV source is different, so I was thrown off. Out of curiosity, what would be the difference if I simply had the 2160p DV layer? Would both layers produce the exact same thing, or is there slight quality loss with the 1080p layer?

kazuma
Posts: 162
Joined: Fri Nov 08, 2019 9:51 pm

Re: Dolby Vision now possible through MP4 Mux.

#7452 Post by kazuma » Mon Sep 26, 2022 4:48 pm

RESET_9999 wrote:
Mon Sep 26, 2022 4:18 pm
hell001 wrote:
Mon Sep 26, 2022 3:46 pm
Hi all. Stupid question here, but is there a difference between a 1080p DV layer and 2160p DV layer? There is a release I am trying to hybridize and I have the 4K HDR, but only have access to the 1080p Profile 5 DV. Does anyone have any experience with something like that?
you only have to edit L5.
kazuma wrote:
Mon Sep 26, 2022 4:02 pm
how do i know when it is a profile 7 file?
mediainfo ( text view / HDR format):
Dolby Vision, Version 1.0, dvhe.07.06, BL+EL+RPU

you only need to know that information when you are using Workflow.1 (manual). the other workflows auto-detect the input profile.
if i have 2 hevc files in the media container. 1 for main and 2 for DV metada. so which profile is this?

i'm now always converting my mkv file to ts and then i use you' re program, if there is only one hevc file in the container. is this the correct way? (4-2-3)

RESET_9999
Posts: 2094
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

#7453 Post by RESET_9999 » Mon Sep 26, 2022 5:01 pm

hell001 wrote:
Mon Sep 26, 2022 4:42 pm
Thank you, I'll check that out. I've made hybrids before, but not one where the quality on the DV source is different, so I was thrown off. Out of curiosity, what would be the difference if I simply had the 2160p DV layer? Would both layers produce the exact same thing, or is there slight quality loss with the 1080p layer?
The metadata are exactly the same (except the active area of course).
So no quality loss... I do it all the time by the way.

RESET_9999
Posts: 2094
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

#7454 Post by RESET_9999 » Mon Sep 26, 2022 5:04 pm

kazuma wrote:
Mon Sep 26, 2022 4:48 pm

if i have 2 hevc files in the media container. 1 for main and 2 for DV metada. so which profile is this?

i'm now always converting my mkv file to ts and then i use you' re program, if there is only one hevc file in the container. is this the correct way? (4-2-3)
2 video tracks = profile 7 but for an MKV file (or original m2ts) mediainfo won't display the information.

You don't have to remux to TS. (4-2) will do the conversion regardless of if your input is dual or single track.
This was added recently, so make sure you use the latest version of the script.

kazuma
Posts: 162
Joined: Fri Nov 08, 2019 9:51 pm

Re: Dolby Vision now possible through MP4 Mux.

#7455 Post by kazuma » Mon Sep 26, 2022 5:34 pm

RESET_9999 wrote:
Mon Sep 26, 2022 5:04 pm
kazuma wrote:
Mon Sep 26, 2022 4:48 pm

You don't have to remux to TS. (4-2) will do the conversion regardless of if your input is dual or single track.
even there are more subtitles and other audio files?

Post Reply