Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
RESET_9999
Posts: 2406
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

dvfan wrote:
Wed Jul 06, 2022 9:49 pm
Hello, yes i installed the LAV Filters twice just to be sure. All works, i run madvr and it works, with HDR and everything. I can see the info on screen just fine as well. With all measurements, but when i run the script it always shows error with connecting to LAV Filter - failed.
I dont know. maybe try the nightly lavfilters ?

it's working on my end.

Code: Select all

1) MODE.1= HDR10(madVR) or HDR10plus to DoVi maker
2) MODE.2= Batch convert up to 13 HDR10plus videos to DoVi
3) MODE.3= Inject DV from existing measurement file
4) MODE.4= Batch measure a folder with mkv HDR10 files (credit to manni)
5) MODE.5= Back to main menu

Choice? [1,2,3,4,5]?1
                                         *********************
                                         * CHOOSE A WORKFLOW *
                                         *********************

1) Workflow.1= Convert 1 video + AUTO L5
2) Workflow.2= Convert 1 video + MANUAL L5
3) Workflow.3= Convert 1 video + MANUAL L5 + TrueHD_to_TrueHD.ac3 + DDP_1536kbps
4) Workflow.4= Convert 1 video + MANUAL L5 + TrueHD_to_TrueHD.ac3
5) Workflow.5= Convert 1 video + MANUAL L5 + DDP_1536kbps
6) Workflow.6= Convert 1 video + AUTO L5 + REMOVE HDR10plus (fire stick TV)
7) Workflow.7= Back to main menu

Choice? [1,2,3,4,5,6,7]?1
----------------------------------------------------------------------------------------------------
--This workflow will convert an HDR10 or HDR10plus video to DoVi and set L5 automatically
--The black bars detection may not be perfectly accurate. It's maybe better to measure them manually
----------------------------------------------------------------------------------------------------
Drag and drop your HDR10 or HDR10plus MKV/MP4/TS file and press enter...D:\samples\hdr10.mkv
Do you want to crop RPU... y or n ? (y when HDR10-BL is cropped) and/or press enter...
Measuring the HDR10 video letterbox...
min: 0.0001 cd/m2, max: 1000 cd/m2
Extracting track 0 with the CodecID 'V_MPEGH/ISO/HEVC' to the file 'D:\TEMP\HDR.hevc'. Container format: HEVC/H.265 elementary stream
Progress: 100%
SMPTE ST 2086
HDR10plus metadata not present. Generating DoVi from HDR10 with madVR...
Measuring video file "D:\samples\hdr10.mkv" using D3D11 (native)...
Metadata:
  Mastering display luminance: 0.0001/1000, gamut: 0.68 0.32, 0.15 0.06, 0.265 0.69, 0.3127 0.329
  MaxCLL: 0, MaxFALL: 0 nits
Measurements:
  Frames: 10274, MaxCLL 100%: 623, 99.9%: 598, MaxFALL: 250, AvgFALL: 44, AvgFMLL: 416 nits
Parsing madVR measurement file...
Generating metadata: Profile 8.1 (HDR10)...
Generated metadata for 10274 frames
Done.
EditConfig {
    mode: 0,
    remove_cmv4: false,
    remove_mapping: false,
    active_area: Some(
        ActiveArea {
            crop: false,
            drop_l5: None,
            presets: Some(
                [
                    ActiveAreaOffsets {
                        id: 0,
                        left: 0,
                        right: 0,
                        top: 276,
                        bottom: 276,
                    },
                ],
            ),
            edits: Some(
                {
                    "all": 0,
                },
            ),
        },
    ),
    remove: None,
    duplicate: None,
    min_pq: None,
    max_pq: None,
    level6: None,
    level9: None,
    level11: None,
}
Parsing RPU file...
Editing active area offsets...
Final metadata length: 10274
Writing RPU file...
EditConfig {
    mode: 0,
    remove_cmv4: false,
    remove_mapping: false,
    active_area: None,
    remove: None,
    duplicate: None,
    min_pq: None,
    max_pq: None,
    level6: Some(
        ExtMetadataBlockLevel6 {
            max_display_mastering_luminance: 1000,
            min_display_mastering_luminance: 1,
            max_content_light_level: 0,
            max_frame_average_light_level: 0,
        },
    ),
    level9: None,
    level11: None,
}
Parsing RPU file...
Final metadata length: 10274
Writing RPU file...
"left": 0
"right": 0
"top": 276
"bottom": 276
MDL.max: 1000
MDL.min: 1
Maxcll: 0
Maxfall: 0
Display P3
injecting RPU-L6-L5.bin ...
Parsing RPU file...
Processing input video for frame order info...

Warning: Input file already has RPUs, they will be replaced.
Rewriting file with interleaved RPU NALs..
        {
          "Level1": {
            "min_pq": 0,
            "max_pq": 2708,
            "avg_pq": 1141
          }
        },
        {
          "Level5": {
            "active_area_left_offset": 0,
            "active_area_right_offset": 0,
            "active_area_top_offset": 276,
            "active_area_bottom_offset": 276
          }
        },
        {
          "Level6": {
            "max_display_mastering_luminance": 1000,
            "min_display_mastering_luminance": 1,
            "max_content_light_level": 0,
            "max_frame_average_light_level": 0
          }
        }
      ]
    },
    "cmv40_metadata": {
      "num_ext_blocks": 3,
      "ext_metadata_blocks": [
        {
          "Level9": {
            "length": 1,
            "source_primary_index": 0
          }
        },
        {
          "Level11": {
            "content_type": 1,
            "whitepoint": 0,
            "reference_mode_flag": true,
            "reserved_byte2": 0,
            "reserved_byte3": 0
          }
        },
        {
          "Level254": {
            "dm_mode": 0,
            "dm_version_index": 2
          }
        }
      ]
    }
  },
  "rpu_data_crc32": 867262424
}
Parsing RPU file...

Summary:
  Frames: 10274
  Profile: 8
  DM version: 2 (CM v4.x)
  Scene/shot count: 177
"The script has completed."
Sorry for my English.
G5 / AM6B+ / Denon 7.2.4
DoVi_Scripts
DoVi Playback Devices
dvfan
Posts: 6
Joined: Wed Jul 06, 2022 8:32 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by dvfan »

RESET_9999 wrote:
Wed Jul 06, 2022 10:22 pm
dvfan wrote:
Wed Jul 06, 2022 9:49 pm
Hello, yes i installed the LAV Filters twice just to be sure. All works, i run madvr and it works, with HDR and everything. I can see the info on screen just fine as well. With all measurements, but when i run the script it always shows error with connecting to LAV Filter - failed.
I dont know. maybe try the nightly lavfilters ?

it's working on my end.

Code: Select all

1) MODE.1= HDR10(madVR) or HDR10plus to DoVi maker
2) MODE.2= Batch convert up to 13 HDR10plus videos to DoVi
3) MODE.3= Inject DV from existing measurement file
4) MODE.4= Batch measure a folder with mkv HDR10 files (credit to manni)
5) MODE.5= Back to main menu

Choice? [1,2,3,4,5]?1
                                         *********************
                                         * CHOOSE A WORKFLOW *
                                         *********************

1) Workflow.1= Convert 1 video + AUTO L5
2) Workflow.2= Convert 1 video + MANUAL L5
3) Workflow.3= Convert 1 video + MANUAL L5 + TrueHD_to_TrueHD.ac3 + DDP_1536kbps
4) Workflow.4= Convert 1 video + MANUAL L5 + TrueHD_to_TrueHD.ac3
5) Workflow.5= Convert 1 video + MANUAL L5 + DDP_1536kbps
6) Workflow.6= Convert 1 video + AUTO L5 + REMOVE HDR10plus (fire stick TV)
7) Workflow.7= Back to main menu

Choice? [1,2,3,4,5,6,7]?1
----------------------------------------------------------------------------------------------------
--This workflow will convert an HDR10 or HDR10plus video to DoVi and set L5 automatically
--The black bars detection may not be perfectly accurate. It's maybe better to measure them manually
----------------------------------------------------------------------------------------------------
Drag and drop your HDR10 or HDR10plus MKV/MP4/TS file and press enter...D:\samples\hdr10.mkv
Do you want to crop RPU... y or n ? (y when HDR10-BL is cropped) and/or press enter...
Measuring the HDR10 video letterbox...
min: 0.0001 cd/m2, max: 1000 cd/m2
Extracting track 0 with the CodecID 'V_MPEGH/ISO/HEVC' to the file 'D:\TEMP\HDR.hevc'. Container format: HEVC/H.265 elementary stream
Progress: 100%
SMPTE ST 2086
HDR10plus metadata not present. Generating DoVi from HDR10 with madVR...
Measuring video file "D:\samples\hdr10.mkv" using D3D11 (native)...
Metadata:
  Mastering display luminance: 0.0001/1000, gamut: 0.68 0.32, 0.15 0.06, 0.265 0.69, 0.3127 0.329
  MaxCLL: 0, MaxFALL: 0 nits
Measurements:
  Frames: 10274, MaxCLL 100%: 623, 99.9%: 598, MaxFALL: 250, AvgFALL: 44, AvgFMLL: 416 nits
Parsing madVR measurement file...
Generating metadata: Profile 8.1 (HDR10)...
Generated metadata for 10274 frames
Done.
EditConfig {
    mode: 0,
    remove_cmv4: false,
    remove_mapping: false,
    active_area: Some(
        ActiveArea {
            crop: false,
            drop_l5: None,
            presets: Some(
                [
                    ActiveAreaOffsets {
                        id: 0,
                        left: 0,
                        right: 0,
                        top: 276,
                        bottom: 276,
                    },
                ],
            ),
            edits: Some(
                {
                    "all": 0,
                },
            ),
        },
    ),
    remove: None,
    duplicate: None,
    min_pq: None,
    max_pq: None,
    level6: None,
    level9: None,
    level11: None,
}
Parsing RPU file...
Editing active area offsets...
Final metadata length: 10274
Writing RPU file...
EditConfig {
    mode: 0,
    remove_cmv4: false,
    remove_mapping: false,
    active_area: None,
    remove: None,
    duplicate: None,
    min_pq: None,
    max_pq: None,
    level6: Some(
        ExtMetadataBlockLevel6 {
            max_display_mastering_luminance: 1000,
            min_display_mastering_luminance: 1,
            max_content_light_level: 0,
            max_frame_average_light_level: 0,
        },
    ),
    level9: None,
    level11: None,
}
Parsing RPU file...
Final metadata length: 10274
Writing RPU file...
"left": 0
"right": 0
"top": 276
"bottom": 276
MDL.max: 1000
MDL.min: 1
Maxcll: 0
Maxfall: 0
Display P3
injecting RPU-L6-L5.bin ...
Parsing RPU file...
Processing input video for frame order info...

Warning: Input file already has RPUs, they will be replaced.
Rewriting file with interleaved RPU NALs..
        {
          "Level1": {
            "min_pq": 0,
            "max_pq": 2708,
            "avg_pq": 1141
          }
        },
        {
          "Level5": {
            "active_area_left_offset": 0,
            "active_area_right_offset": 0,
            "active_area_top_offset": 276,
            "active_area_bottom_offset": 276
          }
        },
        {
          "Level6": {
            "max_display_mastering_luminance": 1000,
            "min_display_mastering_luminance": 1,
            "max_content_light_level": 0,
            "max_frame_average_light_level": 0
          }
        }
      ]
    },
    "cmv40_metadata": {
      "num_ext_blocks": 3,
      "ext_metadata_blocks": [
        {
          "Level9": {
            "length": 1,
            "source_primary_index": 0
          }
        },
        {
          "Level11": {
            "content_type": 1,
            "whitepoint": 0,
            "reference_mode_flag": true,
            "reserved_byte2": 0,
            "reserved_byte3": 0
          }
        },
        {
          "Level254": {
            "dm_mode": 0,
            "dm_version_index": 2
          }
        }
      ]
    }
  },
  "rpu_data_crc32": 867262424
}
Parsing RPU file...

Summary:
  Frames: 10274
  Profile: 8
  DM version: 2 (CM v4.x)
  Scene/shot count: 177
"The script has completed."
Hello, i installed the folder into the C:\ instead. It was on F drive before.

Now it worked, somehow it had issues with other driver rather than system drive.

I have a question, is there any way to make the resulting MKV file to show the mastering display luminance/MaxFALL/MaxCLL and color mastering metadata , like when watching with MadVR and you hit Ctrl-F to show info? now it shows only BT. 2020 primaries and BT. 2020 color, nothing else there. It should show the nits mastering followed by the color mastering. Like: 1000 nits HDR - BT. 2020 > DCI-P3 .....
RESET_9999
Posts: 2406
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

dvfan wrote:
Thu Jul 07, 2022 4:07 am
I have a question, is there any way to make the resulting MKV file to show the mastering display luminance/MaxFALL/MaxCLL and color mastering metadata , like when watching with MadVR and you hit Ctrl-F to show info? now it shows only BT. 2020 primaries and BT. 2020 color, nothing else there. It should show the nits mastering followed by the color mastering. Like: 1000 nits HDR - BT. 2020 > DCI-P3 .....
I'm not sure I understand but, the script cannot change/remove the static HDR10 metadata of the resulting MKV.
Sorry for my English.
G5 / AM6B+ / Denon 7.2.4
DoVi_Scripts
DoVi Playback Devices
dvfan
Posts: 6
Joined: Wed Jul 06, 2022 8:32 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by dvfan »

RESET_9999 wrote:
Thu Jul 07, 2022 12:37 pm
dvfan wrote:
Thu Jul 07, 2022 4:07 am
I have a question, is there any way to make the resulting MKV file to show the mastering display luminance/MaxFALL/MaxCLL and color mastering metadata , like when watching with MadVR and you hit Ctrl-F to show info? now it shows only BT. 2020 primaries and BT. 2020 color, nothing else there. It should show the nits mastering followed by the color mastering. Like: 1000 nits HDR - BT. 2020 > DCI-P3 .....
I'm not sure I understand but, the script cannot change/remove the static HDR10 metadata of the resulting MKV.
Yes, it's just the Metadata for the video track. Which in this case would be inside the DV Profile 8.

This is an example so you can understand.

Spider-Man NWH Dolby Vision Profile 8 - MadVR On-Screen INFO:

Image

It shows HDR 9978 nits, since the metadata is properly injected:

Image

You see the Mastering Display numbers at the bottom.

But this is how it ends up when using the Script ( From HDR10 video, which includes this metadata information, but it goes away in the resulting MKV with DV Profile 8 ) :

https://i.imgur.com/3XhJntC.jpg

You can check at the bottom the Mastering Display information metadata is lost.

I've always did this by additional commands to the MKVToolNixGUI. Though if i add these additional commands when muxing the DV Profile 8, it will show duplicate HDR10 metadata.

Like for example MediaInfo shows HDR10/HDR10

And in the detailed information it shows the added metadata for Mastering Display Nits/MaxFall/MaxCLL and Color "P3" though in MadVR won't show up.

Looks like this works kinda different when doing Dolby Vision muxing. It may be added in a future update for the muxing tools used.
RESET_9999
Posts: 2406
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

dvfan wrote:
Thu Jul 07, 2022 4:12 pm


But this is how it ends up when using the Script ( From HDR10 video, which includes this metadata information, but it goes away in the resulting MKV with DV Profile 8 ) :

https://i.imgur.com/3XhJntC.jpg

You can check at the bottom the Mastering Display information metadata is lost.

I've always did this by additional commands to the MKVToolNixGUI. Though if i add these additional commands when muxing the DV Profile 8, it will show duplicate HDR10 metadata.

Like for example MediaInfo shows HDR10/HDR10

And in the detailed information it shows the added metadata for Mastering Display Nits/MaxFall/MaxCLL and Color "P3" though in MadVR won't show up.

Looks like this works kinda different when doing Dolby Vision muxing. It may be added in a future update for the muxing tools used.
The script will not change/remove the original static hdr10. Custom metadata with mkvmerge cli is another story and I don't really care about it because I use TS container and those custom metadata are lost anyway when muxed in tsmuxer (and probably in the mp4muxer too) and there's nothing I can do about it. Plus it doesnt matter in DV.

my SM no way home using the script... clearly your picture isn't right .. even chroma type 2 is different... level 6.1 ? whatever you did to split that file broke it.

Code: Select all

Video
ID                                       : 4117 (0x1015)
Menu ID                                  : 1 (0x1)
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5.1@High
HDR format                               : Dolby Vision, Version 1.0, dvhe.08.06, BL+RPU, HDR10 compatible / SMPTE ST 2086, HDR10 compatible
Codec ID                                 : 36
Duration                                 : 2 h 28 min
Bit rate                                 : 55.9 Mb/s
Width                                    : 3 840 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0 (Type 2)
Bit depth                                : 10 bits
Bits/(Pixel*Frame)                       : 0.281
Stream size                              : 57.8 GiB (92%)
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : PQ
Matrix coefficients                      : BT.2020 non-constant
Mastering display color primaries        : BT.2020
Mastering display luminance              : min: 0.0001 cd/m2, max: 1000 cd/m2
Maximum Content Light Level              : 9978 cd/m2
Maximum Frame-Average Light Level        : 867 cd/m2
Sorry for my English.
G5 / AM6B+ / Denon 7.2.4
DoVi_Scripts
DoVi Playback Devices
Donpoku
Posts: 66
Joined: Wed Jul 03, 2019 3:43 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Donpoku »

spider-man nwm is Dve 07.06, why change it to 08.06?
RESET_9999
Posts: 2406
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

Donpoku wrote:
Fri Jul 08, 2022 10:19 am
spider-man nwm is Dve 07.06, why change it to 08.06?
I convert all the MEL movie to P8 so i can watch it anywhere ( TV internal player included). P7 is only useful for FEL.
Sorry for my English.
G5 / AM6B+ / Denon 7.2.4
DoVi_Scripts
DoVi Playback Devices
thetoad
Posts: 251
Joined: Thu Jul 28, 2016 4:18 am

Re: Dolby Vision now possible through MP4 Mux.

Post by thetoad »

quietvoid wrote:
Fri Jul 01, 2022 12:44 pm
thetoad wrote:
Fri Jul 01, 2022 7:54 am
Q, has there been any work done for colorspace conversion for DV profile 5 to HDR10 or SDR? There's plenty of work on tonemapping HDR10 to SDR, but wondering about for DV content on non DV devices.
Of course, it has been supported in libplacebo and mpv for a while now.
Also, Jellyfin has beta support for real time transcoding: https://www.reddit.com/r/jellyfin/comme ... is_coming/
how well does this work on linux? i.e. would the same gemini lake CPUs that can tonemap HDR10 to SDR also be able to handle DV to SDR? I'm also wondering about DV to HDR10, the link only says sdr)
thetoad
Posts: 251
Joined: Thu Jul 28, 2016 4:18 am

Re: Dolby Vision now possible through MP4 Mux.

Post by thetoad »

JoseTheBae wrote:
Tue Jul 05, 2022 12:07 am
Is there some trick to enabling lossless audio in Plex on the Ugoos AM6B Plus? Lossless audio works in Kodi. Oddly, the 32-bit Kodinerds build seems to discard the Full Enhancement Layer in Dolby Vision, even though Plex plays it perfectly. If I can just get lossless audio working in Plex, I will finally achieve full Dolby Vision (FEL) playback.
what plays the FEL? All I've heard is things that "work" with FEL play the MEL and ignore the FEL. so they play, but they don't play the full dolby vision experience. has this actually changed?
quietvoid
Posts: 377
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

thetoad wrote:
Mon Jul 11, 2022 4:56 pm
how well does this work on linux? i.e. would the same gemini lake CPUs that can tonemap HDR10 to SDR also be able to handle DV to SDR? I'm also wondering about DV to HDR10, the link only says sdr)
No idea, I don't use jellyfin.
dvfan
Posts: 6
Joined: Wed Jul 06, 2022 8:32 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by dvfan »

I'm wondering, using Sony A80J Internal Player ( via USB ) does not play mp4 profile 8 DV files converted by ffmpeg to mp4 ( it includes DV metadata ) though player says "File can't be opened"

MKV Profile 8 file playsback but no DV, just HDR10.

Through PLEX it works with Dolby Vision.

I just want to know why the Sony gets an error when trying to open MP4 with DV P8?

Any way to convert MKV to TS by also keeping DV metadata? May try with TS for the internal player.

Or may try tsmuxer ( load up the MKV DV P8 ) and mux it into TS?
sw5163
Posts: 146
Joined: Sat Jun 25, 2022 7:28 am

Re: Dolby Vision now possible through MP4 Mux.

Post by sw5163 »

dvfan wrote:
Tue Jul 12, 2022 12:41 am
I'm wondering, using Sony A80J Internal Player ( via USB ) does not play mp4 profile 8 DV files converted by ffmpeg to mp4 ( it includes DV metadata ) though player says "File can't be opened"
Are you sure ffmpeg can configure the DV box correctly?
Im using ffmpeg 4.4, it seems it ignores DV when generating mp4.
Maybe try mp4muxer for proper DV mp4 generation?
Most TV internal player don't support DV in MKV.
sofakng
Posts: 74
Joined: Fri Mar 19, 2010 12:51 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by sofakng »

Yikes... this is incredibly confusing.

What are the most recommend player(s) for best compatibility with the DV/Atmos formats?
dwalme
Posts: 28
Joined: Sat Dec 10, 2011 2:38 am

Re: Dolby Vision now possible through MP4 Mux.

Post by dwalme »

sofakng wrote:
Tue Jul 12, 2022 5:40 pm
What are the most recommend player(s) for best compatibility with the DV/Atmos formats?
Take a look at this:

Playback-Devices
sofakng
Posts: 74
Joined: Fri Mar 19, 2010 12:51 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by sofakng »

Thanks... It seems like there isn't any perfect solution.

Is it safe to safe the Sony x800m2 is probably the 'best' choice?
Post Reply