Dolby Vision now possible through MP4 Mux.

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

Re: Dolby Vision now possible through MP4 Mux.

Post by staknhalo »

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
sw5163
Posts: 143
Joined: Sat Jun 25, 2022 7:28 am

Re: Dolby Vision now possible through MP4 Mux.

Post by sw5163 »

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!
Trees
Posts: 41
Joined: Sat Sep 03, 2022 8:04 am

Re: Dolby Vision now possible through MP4 Mux.

Post by Trees »

Hello everyone.

After years of lurking, and mastering hybriding 4K films and series, I'm looking to hybrid an RPU taken from an already hybrided film (P5 to P8.1) to a 1080p *.264 codec as opposed to a *.x265/HEVC codec.

I've found that a certain films look much much better in 1080p than they do in 2160p (caps-a-holic can confirm this), the upscaling has been done very poorly.

Is what I'm asking possible at all with public tools? I am not able to get content directly from streaming services so I'm relying on public tools to get this job done.

Looking forward to your replies.

TL;DR: I want to inject an Dolby Vision P8. 1 RPU into an 1080p film, how?
kazuma
Posts: 136
Joined: Fri Nov 08, 2019 9:51 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by kazuma »

what was the path for eac3to334? i've the program but forgot this.
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: 145
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: 143
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: 145
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: 305
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: 1891
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: 305
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: 1891
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: 143
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: 145
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 ? :/
Post Reply