Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
realbabilu
Posts: 22
Joined: Sun May 15, 2022 4:23 am

Re: Dolby Vision now possible through MP4 Mux.

Post by realbabilu »

DonaldFaQ wrote:
Fri Sep 02, 2022 10:06 am
1. If the DV7 mkv extracted using DDVT_DEMUXER with crop off by default. i got rpu.bin that different range (rpu has 280x) as video range (0px)
so i got restarted again with DDVT_DEMUXER, crop on right?
2. When i got the rpu.bin it should be same folder as input mkv right, by using DDVT_INJECTOR to get mkv DV8, right?
3. What the best for budget DV TV: DV 8.1 or DV 8 HLG format from DV7 mkv.

*1 if you demux a P7 single layer file, you have 2 options. First, you can save the RPU only and you can crop this RPU if u will. Second, you can save the BL and the EL layer (or only BL, or only EL). If you save both layers you can build a UHD with TS-Muxer for example. If you crop the RPU and extract that binary, the RPU in the EL layer will be untouched.. Only the own extracted RPU will be edited.

*2 Yes right. If the RPU.bin in the same folder as the input file, RPU inject options will triggered. If a EL.hevc in the same folder, P7 mux settings will be triggered. if a custom.json file in the same folder, this script will be processed during the mux process. Attention! All settings from the custom.json script will be processed BEFORE the intern tool scripts processed.

*3 I don't know. I have an LG OLED TV with a Nvidia Shield pro as player and using HDR + P8. FEL Layers obsolete because no media player supports FEL playback. Exception the Oppo Player (or the clone) with files in ISO format. With this combi you can watch P7 FEL. All other players i know playbacks only MEL .
Hi DonaldFaq
I see DDVT_DEMUXER.cmd is using mp4box for creating / muxing mp4.
I had use crop check for mismatch pixels size in mp4 container.
the result cant be played in my hisense tv. just black.
i demuxed with mp4demuxer, and remux with github dolby mp4muxer, its fine now.
I hope there is a release for choosing mp4box or mp4muxer as a mp4 muxer tools.
staknhalo
Posts: 161
Joined: Sun Oct 11, 2020 12:05 am

Re: Dolby Vision now possible through MP4 Mux.

Post by staknhalo »

sw5163 wrote:
Sat Sep 03, 2022 7:44 am
staknhalo wrote:
Sat Sep 03, 2022 2:30 am
RESET_9999 wrote:
Fri Sep 02, 2022 10:26 pm
mp4muxer --dv-profile 5 --input-file BL.hevc --input-file audio.ec3 --dvh1flag 0 --output-file output.mp4
thank you
Don't use mp4muxer to change dvhe->dvh1 for iOS device.
Currently some files changed this way will lead to black screen on iOS device.(On mac will be fine)
I'm guessing it's because mp4muxer only change codec ID in hex instead of repackaging it.
Same as https://github.com/rixtox/mp4dovi/issues/9
Use mp4box instead
https://www.avsforum.com/threads/apple- ... t-61936696
yusesope wrote:
Fri Oct 23, 2020 10:45 am
The correct codec ID (for profile 8.1) should be "hvc1" in place of "hev1". But be careful, these boxes are not random: they indicate to the decoder how the information for the initialization of the latter is stored within the file. Changing the header with a hex editor isn't always enough!
yusesope wrote:
Sat Oct 24, 2020 10:30 am
As I said, very often it is not enough to change the header of a box for the file to be played. QuickTime is perhaps smarter and can retrieve the information needed to initialize the decoder. The iPad player may not be capable of it!
thank you
sw5163
Posts: 146
Joined: Sat Jun 25, 2022 7:28 am

Re: Dolby Vision now possible through MP4 Mux.

Post by sw5163 »

Trees wrote:
Sat Sep 03, 2022 8:18 am
TL;DR: I want to inject an Dolby Vision P8. 1 RPU into an 1080p film, how?
I don't think x264 supports HDR, so I'm assuming the 1080p track is a SDR one.
If that's the case, you can try muxing it into Profile 8.2 or Profile 9.

However, the result will very likely to be wrong, since it will need "reshaping data" in RPU for SDR->HDR10 colour and PQ change.
For example, 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 4:2:2 12bit to normally play. (I'm not sure what it's really for)

And I think we can only remove "reshaping data" for now rather than adding it.
Therefore, unless you have proper P8.2 RPU or P9 RPU with required "reshaping data" in it, I don't think it's currently possible.
staknhalo
Posts: 161
Joined: Sun Oct 11, 2020 12:05 am

Re: Dolby Vision now possible through MP4 Mux.

Post by staknhalo »

Hey guys just wanted to say, even though not a HDR capable device - my iPhone 8 Plus displays RPU effects when doing (both native/hybrid) P5 DVH1 - thanks again

Now, another problem/curiosity I never mentioned way back but just remembered - so if anyone here smarter than me on this wants to take a look

I have never seen this before or after when making a P5+HDR10 > Custom P8 - only ever on this one file/episode - and I've done many

WandaVision Ep2 - towards the start, (the entire scene IIRC) where her and Vision are scared of the noise in bed - only when made into a custom P8 there's incorrect strobing/flashing (not from RPU being misaligned, it's different) - I think it has to do with the base being black & white and something with the color shaping properties in a P5 RPU even though that's stripped or something? Or because of the ICtCp having to mimic just black & white but when put onto an actual black & white base layer? Like I said I don't really know, I just know it's something. You can see it on the walls when Vision is talking in bed really IIRC again.

If anyone is interested and can reproduce, I'm curious as to what you find. Might have even been a bug in Dovi_Tool back then, that's since been squashed for all I know or something?

I just ended keeping P5+HDR10 each for this ep myself.

Edit: And this didn't happen with Ep1 that was also black and white - but Ep1 and Ep2 are different styles of black and white - and I understand there's color info in there even though it looks black and white - it was more like specific objects/areas in the scene where strobing/flashing vs the entire screen - like I said, different from RPU misalignment, why I think it had something to do with 'color'
jayper
Posts: 318
Joined: Sat Sep 29, 2012 5:57 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by jayper »

For Mode I, Workflow 1 can you use an MP4 to extract the base layer? The command line states (MKV/TS/M2TS) so I wasn't sure.
RESET_9999
Posts: 2105
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

jayper wrote:
Sun Sep 04, 2022 6:40 pm
For Mode I, Workflow 1 can you use an MP4 to extract the base layer? The command line states (MKV/TS/M2TS) so I wasn't sure.
yes
jayper
Posts: 318
Joined: Sat Sep 29, 2012 5:57 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by jayper »

Much appreciated!
redoine322
Posts: 12
Joined: Fri Apr 15, 2022 2:16 am

Re: Dolby Vision now possible through MP4 Mux.

Post by redoine322 »

Hi Guys i want to ask what is the best way to convert movies to watch it on an internal LG C1 Player DV or HDR and how i can Convert Using your NEW script @RESET_9999 cause things got changed a bit, a big thanks for you amazing work Man
RESET_9999
Posts: 2105
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

redoine322 wrote:
Sun Sep 04, 2022 7:50 pm
Hi Guys i want to ask what is the best way to convert movies to watch it on an internal LG C1 Player DV or HDR and how i can Convert Using your NEW script @RESET_9999 cause things got changed a bit, a big thanks for you amazing work Man
DV BDMV input: 4-1-1
DV P7 MKV input: 4-2-3
sw5163
Posts: 146
Joined: Sat Jun 25, 2022 7:28 am

Re: Dolby Vision now possible through MP4 Mux.

Post by sw5163 »

staknhalo wrote:
Sun Sep 04, 2022 5:09 pm
Hey guys just wanted to say, even though not a HDR capable device - my iPhone 8 Plus displays RPU effects when doing (both native/hybrid) P5 DVH1 - thanks again
DV is supposed to deliver director's intention even on SDR/100nit device and trim the content as closed as possible to what filmmakers want us to see.
While keeping the maximum potential dynamic range at the same time.

That's why even some 500nit laptops can get DV certification.
It's very useful when adjusting screen brightness too, if 1000nit is just too bright to watch.
staknhalo
Posts: 161
Joined: Sun Oct 11, 2020 12:05 am

Re: Dolby Vision now possible through MP4 Mux.

Post by staknhalo »

sw5163 wrote:
Sun Sep 04, 2022 8:39 pm
staknhalo wrote:
Sun Sep 04, 2022 5:09 pm
Hey guys just wanted to say, even though not a HDR capable device - my iPhone 8 Plus displays RPU effects when doing (both native/hybrid) P5 DVH1 - thanks again
DV is supposed to deliver director's intention even on SDR/100nit device and trim the content as closed as possible to what filmmakers want us to see.
While keeping the maximum potential dynamic range at the same time.

That's why even some 500nit laptops can get DV certification.
It's very useful when adjusting screen brightness too, if 1000nit is just too bright to watch.
Yeah I had heard when these devices first came out in a review and were said to have Dolby Vision support even though not HDR they contacted Apple and they replied - "they have brightness/contrast enhancements when viewing Dolby Vision content" - I figured that meant RPU effects - I just never got it to work because I was missing the DVH1 flag

Now I have an issue with Ep 4, 6 and 8 of Mandalorian S1 DV Profile 5 - mp4box is telling me:
[H263Dmx] garbage before first frame!


Internet searches yield no results

This bad data(?) is in the (only) source so it wasn't a demux issue (used tsmuxer and ffmpeg) - mp4box was only spitting out blank screen incorrect length mp4 files with that error on Windows and iOS (but mp4muxer was making perfectly fine dvhe files with same inputs on Windows and Android but not iOS - iOS audio but no video)

I tried to use
RESET_9999 wrote:
Fri Sep 02, 2022 10:26 pm
mp4muxer --dv-profile 5 --input-file BL.hevc --input-file audio.ec3 --dvh1flag 0 --output-file output.mp4
And just FYI to others, that flag is only in the latest mp4muxer (Feb 2022) - took me a few to figure that out (tried the older one you had, then the slightly newer one I had, but didn't know it was updated since) :lol:

And same as old mp4muxer results as above - dvh1 flag now, but blank screen on iOS still but Windows and Android still fine

I guess just erroneous capture in the source ? :/
sw5163
Posts: 146
Joined: Sat Jun 25, 2022 7:28 am

Re: Dolby Vision now possible through MP4 Mux.

Post by sw5163 »

staknhalo wrote:
Sun Sep 04, 2022 9:46 pm
Now I have an issue with Ep 4, 6 and 8 of Mandalorian S1 DV Profile 5 - mp4box is telling me:
I had The.Mandalorian.S01.2160p.DSNP.WEB-DL.DDP5.1.Atmos.DV.MP4.x265-MZABI[rartv] converted when it came out.
Didn't remember there was an issue.

If you are certain the error is specific to those files, please try mp4mux - Bento4.

Command line is probably something like this:
mp4mux(bento4) --track dv.hevc#dv_profile=5,frame_rate=23.976 --track atmos.ec3 bento4sample.mp4

bento4 and mp4box are the only two tools I know on Windows that can get iOS compatible P5 DVH1 mp4.
(mp4muxer sometimes results in black screen)

bento4 is the tool I used before mp4muxer and mp4box, and is actually recommended by ShaoWeiguo, the author of mp4muxer, when I asked him about iOS black screen a long time ago.
But be careful bento4 has frame_rate mismatch issue so you have to specify frame_rate as above.
staknhalo
Posts: 161
Joined: Sun Oct 11, 2020 12:05 am

Re: Dolby Vision now possible through MP4 Mux.

Post by staknhalo »

sw5163 wrote:
Sun Sep 04, 2022 10:55 pm
staknhalo wrote:
Sun Sep 04, 2022 9:46 pm
Now I have an issue with Ep 4, 6 and 8 of Mandalorian S1 DV Profile 5 - mp4box is telling me:
I had The.Mandalorian.S01.2160p.DSNP.WEB-DL.DDP5.1.Atmos.DV.MP4.x265-MZABI[rartv] converted when it came out.
Didn't remember there was an issue.

If you are certain the error is specific to those files, please try mp4mux - Bento4.

Command line is probably something like this:
mp4mux(bento4) --track dv.hevc#dv_profile=5,frame_rate=23.976 --track atmos.ec3 bento4sample.mp4

bento4 and mp4box are the only two tools I know on Windows that can get iOS compatible P5 DVH1 mp4.
(mp4muxer sometimes results in black screen)

bento4 is the tool I used before mp4muxer and mp4box, and is actually recommended by ShaoWeiguo, the author of mp4muxer, when I asked him about iOS black screen a long time ago.
But be careful bento4 has frame_rate mismatch issue so you have to specify frame_rate as above.
Yeah, the mzabi release, even reacquired the 4-6-8 eps to confirm the missing/bad/garbage data was in source

using

Code: Select all

mp4mux --track Video.hevc#dv_profile=5,frame_rate=23.976 --track audio.aac FileName.mp4
mp4mux made a file without error - with dvh1 - but plays on Windows, but doesn't play on iOS or Android (iOS just spins never plays Android throws an error no playback)

mp4muxer dvhe/dvh1 are the only 'passable' outputs, though still not 100% accurate because doesn't work on iOS but does work on Windows/Android - it's gotta be the source, oh well

Edit: and I tried demuxing the video stream out of the mp4mux output file and using that in mp4box - still same 'garbage' error - out of 34 P5 files I have it was just those 3 - meh can't win them all
sw5163
Posts: 146
Joined: Sat Jun 25, 2022 7:28 am

Re: Dolby Vision now possible through MP4 Mux.

Post by sw5163 »

staknhalo wrote:
Sun Sep 04, 2022 11:40 pm
Yeah, the mzabi release, even reacquired the 4-6-8 eps to confirm the missing/bad/garbage data was in source
I reacquired one of the eps you mentioned. Can confirm there is something wrong with the mp4 package.
It seems mp4box recognize it as h.263, no idea what that is.
However, you can split it:

Code: Select all

ffmpeg -i broken.mp4 -c copy -t 1:00 first.hevc
ffmpeg -i broken.mp4 -c copy -ss 1:00 second.hevc
And then concat them together (lossless)

Code: Select all

mp4box -cat first.hevc -cat second.hevc -new fix.dvh1.mp4
It will work on iOS devices.
No idea what's going on with that file.

Also why using aac instead of EAC3/atmos inside the file?
xxyz1
Posts: 7
Joined: Mon Sep 05, 2022 1:21 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by xxyz1 »

Hi guys!

I've this file:
Dolby Vision, Version 1.0, dvhe.08.06, BL+RPU, HDR10 compatible / SMPTE ST 2086, HDR10 compatible

Trying this:

mp4mux --track track_1_und.hevc#dv_profile=8,frame_rate=23.976 --track track_2_deu.ec3 bento4sample.mp4

But it says
integer number for Dolby vision BL signal cross-compatibility ID

What I have to do?
Thanks so much
Post Reply