Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
dwalme
Posts: 28
Joined: Sat Dec 10, 2011 2:38 am

Re: Dolby Vision now possible through MP4 Mux.

Post by dwalme »

Found another issue with the script. I was testing the removal of HDR10plus. (MODE.M->MODE.1->Workflow.1)

I end up with a 0 byte *_HDR10plus_removed.hevc file in the output folder.

Code: Select all

1) Workflow.1= Remove HDR10plus
2) Workflow.2= Remove Dolby Vision
3) Workflow.3= Back to main menu

Choice? [1,2,3]?1
Drag and drop an MKV HDR10 file and press enter...C:\D\Dolby-Vision-Tools\HDR10plus-tv.mkv
Extracting track 0 with the CodecID 'V_MPEGH/ISO/HEVC' to the file 'I:\TEMP\HDR.hevc'. Container format: HEVC/H.265 elementary stream
Progress: 100%
Reordering metadata... Done.
Parsing RPU file...
Error: No NALU start codes found in the file. Maybe not a valid RPU?
the script has completed...
Press any key to continue . . .
RESET_9999
Posts: 1843
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

dwalme wrote:
Thu Jun 23, 2022 1:30 am
Found another issue with the script.
I don't know, it's working on my end. Did you try to manually remove hdr10plus without the script? maybe your file has a problem?
or maybe your file doesnt have DV? this mode is for input that has both HDR10plus and DV.

Code: Select all

1) Workflow.1= Remove HDR10plus
2) Workflow.2= Remove Dolby Vision
3) Workflow.3= Back to main menu

Choice? [1,2,3]?1
Drag and drop an MKV HDR10 file and press enter..."D:\samples\hdr10-plus(THD SRT).mkv"
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%
Reordering metadata... Done.
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..
the script has completed...
Appuyez sur une touche pour continuer...
dwalme
Posts: 28
Joined: Sat Dec 10, 2011 2:38 am

Re: Dolby Vision now possible through MP4 Mux.

Post by dwalme »

RESET_9999 wrote:
Thu Jun 23, 2022 1:48 am
dwalme wrote:
Thu Jun 23, 2022 1:30 am
Found another issue with the script.
I don't know, it's working on my end. Did you try to manually remove hdr10plus without the script? maybe your file has a problem?
or maybe your file doesnt have DV? this mode is for input that has both HDR10plus and DV.

Code: Select all

1) Workflow.1= Remove HDR10plus
2) Workflow.2= Remove Dolby Vision
3) Workflow.3= Back to main menu

Choice? [1,2,3]?1
Drag and drop an MKV HDR10 file and press enter..."D:\samples\hdr10-plus(THD SRT).mkv"
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%
Reordering metadata... Done.
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..
the script has completed...
Appuyez sur une touche pour continuer...

My fault then. This particular file does not have DV. I didn’t realize this only worked for files that were both hdr10+ and DV.
RESET_9999
Posts: 1843
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

yeah my bad too, I'll add a warning in the next version.
realbabilu
Posts: 22
Joined: Sun May 15, 2022 4:23 am

Re: Dolby Vision now possible through MP4 Mux.

Post by realbabilu »

I got unique situation.

Usually Profile 5 need Dolby Vision proper detection with Dolby Vision TV or color will be strange, this is dvhe 05.09
example from dolby http://media.developer.dolby.com/DolbyV ... 00kbps.mp4
So if i convert to mkv, usually my TV false to detect Dolby vision, coloring it false as purple, AND also my SDR PC monitor got it wrong.
So it need to be muxed as mp4 with dolby mp4muxer, and played as mp4 in DV TV to get it detected right and coloring right.


I got sample dvhe Profile 05.06 color limited while it backwards....
I uploded 30s here https://1fichier.com/?gat31olgv9yjtn2iyc2o
The color on SDR PC is right.
While i remuxed to profile 5 with mp4muxer to enable Dolby Vision and Atmos detection, it colors wrong....purple..
1. What can be wrong with this? Its possible the encoder wrong? or just my DV tv is un-capable?
2. Does anyone has other 05.06 sample?
3. What if there is wrong profile typed when muxing ?
sw5163
Posts: 139
Joined: Sat Jun 25, 2022 7:28 am

Dual layer FEL dolby vision to Apple compatible BL+RPU

Post by sw5163 »

First of all, thanks so much for quietvoid's and yusesope's amazing tool.
Sorry in advance if this has been posted or wrong.
I think it is possible to convert dual layer FEL to Apple compatible BL+RPU.

1. Extract bl.hevc and el.hevc from source
ffmpeg -i FEL_test_for_AVS.m2ts -c copy -map 0:0 bl.hevc -map 0:1 -c copy el.hevc

2. Mux and convert to P8 (it seems Apple indeed doesn't support FEL)
dovi_tool --edit-config fel_to_p81.json mux --bl bl.hevc --el el.hevc --discard

fel_to_p81.json
{
"mode": 2,
"remove_mapping": true
}

The result has similar RPU as in Apple's strange screensaver. (Thanks ValZapod)

According to quietvoid:
‘"remove_mapping" is useful for converting to profile 8.1 from FEL, where the video was preprocessed beforehand (like processing FEL).
Otherwise, the RPU would cause an additional mapping/processing on playback, so double the processing which is wrong.’
And without it, the result will end up with awful green screen.
https://user-images.githubusercontent.c ... 8510d9.PNG

3. Use mp4muxer from https://github.com/DolbyLaboratories
mp4muxer -i BL_RPU.hevc --dv-profile 5 --dvh1flag 0

This end up with a BL+RPU HDR10 based profile 5 mp4 just like their screensaver.
dvh1flag for Apple compatibility.
I know profile 5 shouldn't have HDR10 bl but it tricks Apple's native player to play dolby vision.

Sample mp4 as follow
https://drive.google.com/file/d/1kJTUMb ... sp=sharing
The birghtness around 28 and 40 second flicker, so it is dolby vision.

Original m2ts is from
https://www.avsforum.com/threads/dune-p ... t-60582530
Also Apple seems to ignore level 5 RPU data.

Do anyone know if there’s a better way to do it?
And can someone test the quality on iOS devices between FEL converted this way and proper streaming profile 5,thanks.
evilmatcher
Posts: 25
Joined: Fri Apr 24, 2020 9:17 am

Re: Dolby Vision now possible through MP4 Mux.

Post by evilmatcher »

I need some help on converting my copy of Saving Private Ryan ST-DL MKV (made with Makemkv 1.16.3) to DT-DL .ts format to play in my x800m2.

The video part works fine on the x800m2 and triggers DV on my TV and plays as it should, but I have no sound.

I have used the RESET_9999 script v.1.3.8 with Mode p7 --> Mode.3 --> workflow.1 and 2 and put the pieces back together in a TS-container with TSmuxer with same result.

My Denon receiver shows Atmos with the MKV-version, but I have no sound when played from the x800m2.

The mediainfo on both the MKV and TS version shows an Atmos True HD audiotrack. Please see the attached txt-files. When i press Info on my LG TV, it shows the DV video and a Dolby Digital+ 5.1 audiotrack.

Any suggestions to what i have missed?
Attachments
Mediainfo SVP TS.txt
(5.04 KiB) Downloaded 136 times
Mediainfo SVP MKV.txt
(6.47 KiB) Downloaded 134 times
RESET_9999
Posts: 1843
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

Well, I guess your AVR doesnt like the silent AC3 core TrueHD tracks. Very strange because I also have a Denon AVR and it plays those fine. Your file looks as it should.

you'll have to do the audio separately:
MODE.M ---> MODE.3 ---> Workflow 1 ( or 3 if your mkv doesnt have an ac3 track)

sw5163 wrote:
Sat Jun 25, 2022 7:51 am
I think it is possible to convert dual layer FEL to Apple compatible BL+RPU.
Appletv only support real profile 5 from streaming services which you cannot get from profile 7 rip.
evilmatcher
Posts: 25
Joined: Fri Apr 24, 2020 9:17 am

Re: Dolby Vision now possible through MP4 Mux.

Post by evilmatcher »

RESET_9999 wrote:
Sun Jun 26, 2022 12:53 pm
Well, I guess your AVR doesnt like the silent AC3 core TrueHD tracks. Very strange because I also have a Denon AVR and it plays those fine. Your file looks as it should.

you'll have to do the audio separately:
MODE.M ---> MODE.3 ---> Workflow 1 ( or 3 if your mkv doesnt have an ac3 track)
Is it possible that it is the TS-muxer that f.cks up? I have ripped Dune (2021) today from the disc (backup from disc and remux to TS) and exactly same happens. Dolby vision is fine, but the audio track is suddenly DD+. The mediainfo on the TS-file is Dolby TrueHD Atmos though.

I have tried the TS-muxer version I downloaded myself, but also the version from the DOVI tools. Same result.
RESET_9999
Posts: 1843
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

evilmatcher wrote:
Sun Jun 26, 2022 3:33 pm
Is it possible that it is the TS-muxer that f.cks up? I have ripped Dune (2021) today from the disc (backup from disc and remux to TS) and exactly same happens. Dolby vision is fine, but the audio track is suddenly DD+. The mediainfo on the TS-file is Dolby TrueHD Atmos though.

I have tried the TS-muxer version I downloaded myself, but also the version from the DOVI tools. Same result.
I ripped and watched Dune 2021 from the disc and had no issue with Atmos (old Denon X2300W)
dwalme
Posts: 28
Joined: Sat Dec 10, 2011 2:38 am

Re: Dolby Vision now possible through MP4 Mux.

Post by dwalme »

evilmatcher wrote:
Sun Jun 26, 2022 11:57 am
I need some help on converting my copy of Saving Private Ryan ST-DL MKV (made with Makemkv 1.16.3) to DT-DL .ts format to play in my x800m2.

The video part works fine on the x800m2 and triggers DV on my TV and plays as it should, but I have no sound.

I have used the RESET_9999 script v.1.3.8 with Mode p7 --> Mode.3 --> workflow.1 and 2 and put the pieces back together in a TS-container with TSmuxer with same result.

My Denon receiver shows Atmos with the MKV-version, but I have no sound when played from the x800m2.

The mediainfo on both the MKV and TS version shows an Atmos True HD audiotrack. Please see the attached txt-files. When i press Info on my LG TV, it shows the DV video and a Dolby Digital+ 5.1 audiotrack.

Any suggestions to what i have missed?
I just recently did the same thing and I tested my copy with my X800M2 after I read this. I have a silent core and have no issues with TrueHD/Atmos playing properly.
sw5163
Posts: 139
Joined: Sat Jun 25, 2022 7:28 am

Re: Dolby Vision now possible through MP4 Mux.

Post by sw5163 »

RESET_9999 wrote:
Sun Jun 26, 2022 12:53 pm
sw5163 wrote:
Sat Jun 25, 2022 7:51 am
I think it is possible to convert dual layer FEL to Apple compatible BL+RPU.
Appletv only support real profile 5 from streaming services which you cannot get from profile 7 rip.
Well, i'm using ios device but i'm pretty sure it is playing dolby vision with dynamic brightness adjustment.
Apple TV needs more test but I believe it will play properly.
RESET_9999 wrote:
Sun Jun 26, 2022 12:53 pm
Appletv only support real profile 5 from streaming services which you cannot get from profile 7 rip.
Check Apple tv's screensaver, they are HDR10 based profile 5 with similar RPU just like my sample.
https://sylvan.apple.com/Aerials/2x/Vid ... R_HEVC.mov
https://sylvan.apple.com/Aerials/2x/entries.json

dolby vision(left) looks very different from base HDR10 one(right)
GL.PNG
GL.PNG (1.65 MiB) Viewed 9803 times
The use of profile 5 is just to get 'dvh1' flag and trick Apple's player to play proper dolby vision p8.1.

mp4box with following command can also get dolby vision to work:
mp4box -add BL_RPU.hevc -new p5.dvh1.mp4 (recommend)
mp4box -add BL_RPU.hevc:dv-profile=8.1 -new p8.hvc1.mp4(this doesn't work, it's a SMB bug)
mp4box -add BL_RPU.hevc:dv-profile=f8.1 -new p8.dvh1.mp4
But may stutter when fast-forward, so I prefer mp4muxer.
Last edited by sw5163 on Mon Aug 01, 2022 2:19 pm, edited 2 times in total.
RESET_9999
Posts: 1843
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

go read the past weeks in this thread, all the test have been done and confirmed that the appletv only support genuine p5 DV. ( i dont know about other apple devices)
sw5163
Posts: 139
Joined: Sat Jun 25, 2022 7:28 am

Re: Dolby Vision now possible through MP4 Mux.

Post by sw5163 »

RESET_9999 wrote:
Sun Jun 26, 2022 8:24 pm
go read the past weeks in this thread, all the test have been done and confirmed that the appletv only support genuine p5 DV. ( i dont know about other apple devices)
You mean these files? Many thanks to quietvoid for providing them!
quietvoid wrote:
Wed Jun 08, 2022 1:51 am
You can try the files here: https://mega.nz/file/xNcAVQhJ#ldoifbK6D ... dXkzw2HYgs

On a DM v1 (CM v2.9) supporting display/device: p81_cmv29_tests, p84_cmv29_tests.
On a DM v2 (CM v4.x) supporting display/device: p81_cmv40_tests, p84_cmv40_tests

LG C2:
- CM v2.9: L1, L2 works
- CM v4.x: L1 works, L2 alone doesn't work. L3 works, L8 works up to clip_trim, the rest makes no difference.

FireTV Stick 4K Max:
- CM v2.9: L1, L2 works
- CM v4.x: L1, L2 works, L3 and L8 don't.

CM v4.x L8 trims are also very different to L2.

There's a bug with the first 3s for HLG since I forgot to add the reshaping.
Those p8.1 HDR one work on iPad once I convert them to dvh1 p5.
Don't much like HLG, maybe I will test HLG later.
Maybe im wrong but it makes no sense iOS devices can play them yet Apple TV can't.
Im using this Apple's "file app" smb video from my computer instead of INFUSE. Not sure if that's what it's called.
https://support.apple.com/en-us/102570
The attachment fileapp.png is no longer available
CM v2.9 test result:
https://drive.google.com/file/d/1ojAXiv ... sp=sharing
L1 works
L2 works except ms_weight, can't see a difference.

CM v4.0 test result:
https://drive.google.com/file/d/18uibAw ... sp=sharing
L1 works
L2 some works
L3 works
L8 some works

Those screenshots can stand for what I have seen.
Now im 99% sure I found the way to play p8.1 on iOS devices.
original.PNG
original.PNG (1.84 MiB) Viewed 9775 times
l8_trim_offset_0.75.PNG
l8_trim_offset_0.75.PNG (1.8 MiB) Viewed 9775 times
Converted p8.1 sample:
https://drive.google.com/drive/folders/ ... sp=sharing
Anyone can make this with the following command:
ffmpeg -i p81_cmv29_tests.mkv -c copy cmv29.hevc
mp4muxer -i cmv29.hevc --dv-profile 5 --dvh1flag 0 -o cmv29.mp4

update:
Now im 100% sure since iPhone can play the sample link directly in safari and have dolby vision.
Anyone with Apple tv feel free to test.
HLG also works on iOS device.
mp4muxer -i hlg.hevc --dv-profile 5 --dvh1flag 0 -o p5_dvh1_8.4_HLG.mp4
mp4muxer -i hlg.hevc --dv-profile 8 --dv-bl-compatible-id 4 --hvc1flag 0 -o p8.4_dvh1_8.4_HLG.mp4
Both work to some extent.

Can't believe I got both cmv2.9 and cmv4.0 to work on 5 years ago iPad.
Credit goes to quietvoid and yusesope and their amazing tool!
Thanks again for everyone's help!

aside:
When converting "real" streaming profile 5 dvhe->dvh1 (for iOS native player compatibility)
mp4muxer results in black screen, mp4box works fine. They have exact same RPU.
Infuse shouldn't have this problem since it doesn't even need the conversion.
Last edited by sw5163 on Sun Feb 04, 2024 3:29 pm, edited 4 times in total.
quietvoid
Posts: 371
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

Well it's interesting but the output is definitely SDR on your iPad.
Someone with the Apple TV should be able to test if your files work in regular HDR Dolby Vision output.
Post Reply