Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
staknhalo
Posts: 178
Joined: Sun Oct 11, 2020 12:05 am

Re: Dolby Vision now possible through MP4 Mux.

Post by staknhalo »

sw5163 wrote:
Mon Sep 05, 2022 4:34 pm

Code: Select all

mp4box -add dv.hevc:dv-profile=8.1 -new p81.hvc1.mp4
Off the top of your head, do you know what the command would be for profile 7 single layer FEL, if supported? Just:

Code: Select all

mp4box -add dv.hevc:dv-profile=7 -new p7.hvc1.mp4
Edit: Yes that was it

Double edit: No, spits out an p7 mp4, but still hev1

Triple edit: No, I'm a dummy, demux first, don't just go mp4>mp4, it spits out HVC1 though - could I now just hex edit that to DVH1? Let's see.........
sw5163
Posts: 146
Joined: Sat Jun 25, 2022 7:28 am

Re: Dolby Vision now possible through MP4 Mux.

Post by sw5163 »

staknhalo wrote:
Mon Sep 05, 2022 5:05 pm
Off the top of your head
No idea what that means.
staknhalo wrote:
Mon Sep 05, 2022 5:05 pm
do you know what the command would be for profile 7 single layer FEL, if supported? Just:
Apple doesn't support FEL, only MEL.
I have done all the possible conversions I could think of.
staknhalo
Posts: 178
Joined: Sun Oct 11, 2020 12:05 am

Re: Dolby Vision now possible through MP4 Mux.

Post by staknhalo »

staknhalo wrote:
Mon Sep 05, 2022 5:05 pm
sw5163 wrote:
Mon Sep 05, 2022 4:34 pm

Code: Select all

mp4box -add dv.hevc:dv-profile=8.1 -new p81.hvc1.mp4
Off the top of your head, do you know what the command would be for profile 7 single layer FEL, if supported? Just:

Code: Select all

mp4box -add dv.hevc:dv-profile=7 -new p7.hvc1.mp4
Edit: Yes that was it

Double edit: No, spits out an p7 mp4, but still hev1

Triple edit: No, I'm a dummy, demux first, don't just go mp4>mp4, it spits out HVC1 though - could I now just hex edit that to DVH1? Let's see.........
This is working with single layer FEL p7

Playback is smooth on iOS/iPhone 8 Plus as just HDR10, triggers Dolby Vision on Android TV - both RPU on just SHIELD (doesn't support FEL) - and FEL and RPU on Tivo Stream 4k

Used Game of Thrones UHD FEL and Reset's Clockwork Orange FEL test file to confirm

Just hex edit fist HVC1 to DVH1 in hex editor after p7.mp4 output from mp4box (probably not needed, as I believe Android just reads from the HEV stream - but this way will show 'dvh1' codec ID in mediainfo)

Image

https://mega.nz/file/kGJwiBaL#XUH0tvI1J ... 9gHNfYZHKo
Last edited by staknhalo on Mon Sep 05, 2022 6:21 pm, edited 1 time in total.
sw5163
Posts: 146
Joined: Sat Jun 25, 2022 7:28 am

Re: Dolby Vision now possible through MP4 Mux.

Post by sw5163 »

staknhalo wrote:
Mon Sep 05, 2022 6:10 pm
Just hex edit fist HVC1 to DVH1 in hex editor after p7.mp4 output from mp4box
You can just use

Code: Select all

mp4box -add BL_RPU.hevc:dv-profile=f7 -new p7.dvh1.mp4
And yes it will play MEL, but please don't do this.
sw5163 wrote:
Mon Jul 18, 2022 6:11 pm
RESET_9999 wrote:
Mon Jul 18, 2022 3:15 pm
@ragico just tested and it's working in MP4 P8 DVH1 + LPCM audio.
Like I posted last month
sw5163 wrote:
Sun Jun 26, 2022 6:04 pm
mp4box with following command can also get dolby vision to work:
mp4box -add BL_RPU.hevc -new p5.dvh1.mp4
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 fake p5.dvh1 is the most stable way, it guarantee DV play.
Besides there are official release use fake p5.dvh1(those Apple TV screensaver).
And I've never seen p8 with dvh1 except from my experiment result.
So I think it's better for us to just stick to fake p5.dvh1 for now.
Also p8.dvh1 seems to let Apple think it's an HLG, video significantly darker than normal on my iPad.
p7.dvh1 play properly. Let's not make this even more complicated.
p7.dvh1 is never used by any release.
And if you are playing a true FEL on ATV and it shows DV, it's fake, RPU is not used.

There is "reshaping" data inside FEL RPU that needs to be removed to play MEL on ATV.
I don't know how to explain this easily, you will need to read around Page P455 and P460 to figure it out.
Last edited by sw5163 on Mon Sep 05, 2022 6:24 pm, edited 1 time in total.
staknhalo
Posts: 178
Joined: Sun Oct 11, 2020 12:05 am

Re: Dolby Vision now possible through MP4 Mux.

Post by staknhalo »

It's for my own file consistency, while maintaining broad playback compatibility, it's better for me and my own collection this way

Code: Select all

mp4box -add BL_RPU.hevc:dv-profile=f7 -new p7.dvh1.mp4
ok that's what I was missing, thanks

Here's Reset's Clockwork Orange FEL test made with that for anyone who wants it (tested separately and confirmed again just to make sure on iPhone 8 Plus/SHIELD/Tivo Stream 4K)

https://mega.nz/file/8bAAERgS#RV3DLJf7F ... 0P6QGMFWCc

I don't care about getting Dolby Vision from FEL files to play in Dolby Vision on iOS - I'm fine with FEL as HDR10 playback only on iOS - but unless you do all this (to make HVC1/DVH1) just HDR10 playback on iOS will be choppy still - that's what this was all about for me

So now on Android - P5 and P8 and P7 will play as so - Windows P5 and P8 will play as so, while P7 will be HDR10 only - and on iOS P5 will play as so, while P8 and P7 will play as HDR10 only (but without choppiness) - this is what this achieved for me and what I wanted

Before, when things were DVHE/HEV1, on Android and Windows things were like above, but EVERYTHING was choppy on iOS no matter what
Last edited by staknhalo on Mon Sep 05, 2022 6:41 pm, edited 1 time in total.
sw5163
Posts: 146
Joined: Sat Jun 25, 2022 7:28 am

Re: Dolby Vision now possible through MP4 Mux.

Post by sw5163 »

staknhalo wrote:
Mon Sep 05, 2022 6:23 pm
It's for my own file consistency, while maintaining broad playback compatibility, it's better for me and my own collection this way
If that's the case, still don't use p7.dvh1, use p7.hvc1 instead.

For FEL file:
FEL capable blu-ray player -- both p7.hvc1 and p7.dvh1 will work (most likely)

Apple devices with plex -- p7.hvc1 fall back to HDR10 properly / p7.dvh1 trigger fake DV
or even worse: wrong colour due to additional "reshaping" data in FEL.
(This is minor and hard to see at first, but noticeable when scene change/dark scene)

Apple devices with native player -- p7.hvc1 fall back to HDR10 properly / p7.dvh1 lead to system crash.

Non DV device -- p7.hvc1 fall back to HDR10 properly / p7.dvh1 probably won't be recognized.

For MEL/p8.1 file:
FEL capable blu-ray player -- all files should be fine.
Apple devices -- p7/p81.hvc1 fall back to HDR10 / p7.dvh1 trigger dv / p5.dvh1 trigger dv

Confirmed your sample p7.test.first won't play on Apple's native player, plex may be able to play it, but don't let it get into DV mode
1.PNG
2.PNG
3.PNG
Last edited by sw5163 on Mon Sep 05, 2022 7:09 pm, edited 1 time in total.
RESET_9999
Posts: 2406
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

staknhalo wrote:
Mon Sep 05, 2022 6:23 pm
Here's Reset's Clockwork Orange FEL test made with that for anyone who wants it (tested separately and confirmed again just to make sure on iPhone 8 Plus/SHIELD/Tivo Stream 4K)
https://mega.nz/file/8bAAERgS#RV3DLJf7F ... 0P6QGMFWCc
I now prefer to verify FEL with the original Power Rangers sample instead of that file with random EL.

ST-DL: https://drive.google.com/file/d/1XaQTE0 ... sp=sharing
DT-DL: https://drive.google.com/file/d/1Fjg5i7 ... sp=sharing

bright white text = FEL
grey darker text = No FEL
Sorry for my English.
G5 / AM6B+ / Denon 7.2.4
DoVi_Scripts
DoVi Playback Devices
staknhalo
Posts: 178
Joined: Sun Oct 11, 2020 12:05 am

Re: Dolby Vision now possible through MP4 Mux.

Post by staknhalo »

sw5163 wrote:
Mon Sep 05, 2022 6:40 pm
If that's the case, still don't use p7.dvh1, use p7.hvc1 instead.
So then a file like this

https://mega.nz/file/8D5xXAwI#BLWOWqujN ... k8aytMBliE

which I made using

Code: Select all

mp4box -add video.hevc:dv-profile=7 -new P7hvc1-yesDVcommand.mp4
iTunes still lets me add that to the iPhone and play it via Apple TV app - still plays fine as it should everywhere else (Windows/Plex/Android - and displays RPU on SHIELD and full FEL on Chromecast)

---------------------------------------------------------------------------------------------------------------------------------------

However if I make a file like this

https://mega.nz/file/pSI2hJTA#HWtLKnzNc ... ITONC1wTjY

made using this command you gave me

Code: Select all

mp4box -add video.hevc:dv-profile=f7 -new p7dvh1-yesDVcommand.mp4
Everything still plays as it should, the file will also have the DVH1 tag just for file consistency, and iTunes WILL NOT add it at all, so can't transfer to iPhone this way - so in theory you can't accidentally play it via Apple native video player

---------------------------------------------------------------------------------------------------------------------------------------

Just to test, I made this version

https://mega.nz/file/FfJSkZwB#IOXQ_baMR ... q-j_kNb5R4

using this command

Code: Select all

mp4box -add video.hevc -new P7hvc1-noDVcommand.mp4
And it DOES NOT play properly on Android/SHIELD/Tivo - HDR10 only everywhere - so it is not the inner HEVC stream they look at only/ever when playing like I thought - when using HVC1 they respect the rules and look to the container - see nothing - and so no DV playback

When using mp4muxer it is output as DVHE/HEV1 - so then they know to look to the inner HEVC stream (which is why mkv works too this way I suppose)
RESET_9999 wrote:
Mon Sep 05, 2022 7:04 pm
I now prefer to verify FEL with the original Power Rangers sample instead of that file with random EL.
I like the Clockwork Orange one, if what you want to see is there (flashing colors for RPU and/or Paramount/Dreamworks intro for FEL video data), it's like a punch in the face, you can't miss it :lol:
RESET_9999
Posts: 2406
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

staknhalo wrote:
Mon Sep 05, 2022 8:28 pm
I like the Clockwork Orange one, if what you want to see is there (flashing colors for RPU and/or Paramount/Dreamworks intro for FEL video data), it's like a punch in the face, you can't miss it :lol:
right but those flashes are just a buggy reaction, not the actual RPU working.
I prefer quietvoid's rpu test file + power rangers sample for fel

Because when you play the clockwork file on a player that is not supposed to have an L1/L2 RPU reaction like MPV, there's still a rpu reaction because the file is actually buggy and not because the rpu is working.
If you play quietvoid's rpu test file on MPV, there is no reaction at all which is the correct behavior.
Sorry for my English.
G5 / AM6B+ / Denon 7.2.4
DoVi_Scripts
DoVi Playback Devices
staknhalo
Posts: 178
Joined: Sun Oct 11, 2020 12:05 am

Re: Dolby Vision now possible through MP4 Mux.

Post by staknhalo »

RESET_9999 wrote:
Mon Sep 05, 2022 8:38 pm
staknhalo wrote:
Mon Sep 05, 2022 8:28 pm
I like the Clockwork Orange one, if what you want to see is there (flashing colors for RPU and/or Paramount/Dreamworks intro for FEL video data), it's like a punch in the face, you can't miss it :lol:
right but those flashes are just a buggy reaction, not the actual RPU working.
I prefer quietvoid's rpu test file + power rangers sample for fel

Because when you play the clockwork file on a player that is not supposed to have an RPU reaction like MPV, there's still a rpu reaction because the file is actually buggy and not because the rpu is working.
If you play quietvoid's rpu test file on MPV, there is no reaction at all which is the correct behavior.
Right it's artificing from misalignment - I saw the same thing when trying to encode 'Transformers (2007)' base layer and add full FEL layer back in before we realized encoding BL on FEL titles does this (misaligns slightly and creates random flashing artifacts at times) and you just have to remux them instead (without pro tools to re-encode I suppose) - that's what I made my own old FEL test file from

But it only shows the artifacts if trying to display the RPU - because it is RPU playback capable - is what I'm getting at, and the impression I was under - which would mean it still works as a test if so, right? I've never had it flash colors on a non-capable device.

MPV doesn't show color artifacts for me it stays red/orange until the BL changes itself. How were you able to get the flashing to show?

Edit: I do have the queitvoid test as well, and run through all of them on a device (the p7/p8/p5 test files)

Double edit: I can get the flashing to show in MPV, but just like Windows Store apps with Dolby Vision plugin - it IS supposed to show RPU this way - even if not 100% PQ accurate on playback if that's what you meant, because I know you don't like Windows Store apps for DV playback because of PQ/color inaccuracy - so just like the SHIELD, even though MPV can't show FEL video data, it uses RPU effects from FEL layer still to display some DV effects - so same effects output as if MEL (again, even if not 100% PQ accuracy)

Code: Select all

mpv.com --target-trc=pq --target-prim=bt.2020 --vo=gpu-next --gpu-context=d3d11 file.mp4/mkv/ts
https://www.avsforum.com/threads/author ... t-61416962

If you try to play without that command, it displays NO RPU effects/artifacts at all - as I would expect

So it does seem the flashing colors will only show when RPU is supposed to be displayed, which is how I always thought

Edit:
RESET_9999 wrote:
Mon Sep 05, 2022 8:38 pm
If you play quietvoid's rpu test file on MPV, there is no reaction at all which is the correct behavior.
I missed this part - but I still don't understand - how can it show artifacts from RPU if not processing RPU (even if inaccurately) ? Queitvoid's doesn't work like you said, but the Profile 5 misaligned file does work as intended too. Is it that it doesn't adhere to standards or certain formats/levels of authored RPU(CMV 4.0 or whatever it's called) ? - but it is still showing RPU (in all but queitvoid's test) when trying to, on purpose - and this only effects MPV curiously - I've never had a device work with the FEL test that didn't work with queitvoid's test - MPV now aside
RESET_9999
Posts: 2406
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

Well, sure it tells you if the device is "trying" make use of the rpu and I'm not really sure what those flashes are but it doesnt tell you if the RPU essence is working (L1/L2) which should be the main goal of an RPU response test file. But it's ok to use the clockwork file, I just prefer the more "official" test files over the handcrafted ones.

IIRC, you can also see a flash on the shield with the power rangers test file even though the EL+RPU was not delayed.
Sorry for my English.
G5 / AM6B+ / Denon 7.2.4
DoVi_Scripts
DoVi Playback Devices
staknhalo
Posts: 178
Joined: Sun Oct 11, 2020 12:05 am

Re: Dolby Vision now possible through MP4 Mux.

Post by staknhalo »

RESET_9999 wrote:
Mon Sep 05, 2022 9:49 pm
Well, sure it tells you if the device is "trying" make use of the rpu and I'm not really sure what those flashes are but it doesnt tell you if the RPU essence is working (L1/L2) which should be the main goal of an RPU response test file. But it's ok to use the clockwork file, I just prefer the more "official" test files over the handcrafted ones.

IIRC, you can also see a flash on the shield with the power rangers test file even though the EL+RPU was not delayed.
Right that's all I ever used it for - if a device can use the p7 FEL RPU at all (in addition to does FEL video data also show up or just RPU) - for testing a specific RPU effect or to see how many and which ones it does or doesn't support - I too use quietvoid's only - because I don't know what you put (or attempted to) in yours, and quietvoid gave me nice text to follow along with on the screen for each specific response/effect lol :P

But still why doesn't MPV work with his p8 test? Too new a metadata format or something and MPV just isn't updated to recognize it? It's just got me curious now is all. And really this (computer programs) is the only thing it would happen on I would think - you're not going to have a Dolby Vision physical product (streamer stick or disc player) that doesn't have ANY RPU response whatsoever - although I guess software could 'break' via update on a player product
Last edited by staknhalo on Mon Sep 05, 2022 10:07 pm, edited 2 times in total.
RESET_9999
Posts: 2406
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

IDK it just doesnt support it. I'm sure it will in the future. FEL too.
Sorry for my English.
G5 / AM6B+ / Denon 7.2.4
DoVi_Scripts
DoVi Playback Devices
staknhalo
Posts: 178
Joined: Sun Oct 11, 2020 12:05 am

Re: Dolby Vision now possible through MP4 Mux.

Post by staknhalo »

RESET_9999 wrote:
Mon Sep 05, 2022 10:02 pm
IDK it just doesnt support it. I'm sure it will in the future. FEL too.
Yeah I asked about that, I could only imagine if a beefy GPU to 'mix the streams' so to speak, or a beefy multi-core CPU to do the grunt work. But I'm sure a lot easier said than done. Especially when just me saying it :P :lol:
quietvoid
Posts: 377
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

staknhalo wrote:
Mon Sep 05, 2022 10:00 pm
But still why doesn't MPV work with his p8 test?
What test? mpv only supports the initial colour conversion (namely ICtCp to YCbCr, polynomial, and MMR mapping).
Any other dynamic metadata isn't used at all.
Post Reply