Dolby Vision now possible through MP4 Mux.
Re: Dolby Vision now possible through MP4 Mux.
Much appreciated!
-
redoine322
- Posts: 12
- Joined: Fri Apr 15, 2022 2:16 am
Re: Dolby Vision now possible through MP4 Mux.
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: 2406
- Joined: Mon Aug 05, 2019 7:12 pm
Re: Dolby Vision now possible through MP4 Mux.
DV BDMV input: 4-1-1redoine322 wrote: ↑Sun Sep 04, 2022 7:50 pmHi 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 P7 MKV input: 4-2-3
Re: Dolby Vision now possible through MP4 Mux.
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.
Re: Dolby Vision now possible through MP4 Mux.
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 flagsw5163 wrote: ↑Sun Sep 04, 2022 8:39 pmDV 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.
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
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)RESET_9999 wrote: ↑Fri Sep 02, 2022 10:26 pmmp4muxer --dv-profile 5 --input-file BL.hevc --input-file audio.ec3 --dvh1flag 0 --output-file output.mp4
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 ? :/
Re: Dolby Vision now possible through MP4 Mux.
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.
Re: Dolby Vision now possible through MP4 Mux.
Yeah, the mzabi release, even reacquired the 4-6-8 eps to confirm the missing/bad/garbage data was in sourcesw5163 wrote: ↑Sun Sep 04, 2022 10:55 pmI 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.
using
Code: Select all
mp4mux --track Video.hevc#dv_profile=5,frame_rate=23.976 --track audio.aac FileName.mp4mp4muxer 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
Re: Dolby Vision now possible through MP4 Mux.
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
Code: Select all
mp4box -cat first.hevc -cat second.hevc -new fix.dvh1.mp4
No idea what's going on with that file.
Also why using aac instead of EAC3/atmos inside the file?
Re: Dolby Vision now possible through MP4 Mux.
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
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
Re: Dolby Vision now possible through MP4 Mux.
For P8.1 you have to specify dolby vision base layer signal compatibility id to 1.(to 4 if DV hlg P8.4)
Code: Select all
mp4mux(bento4) --track dv.hevc#dv_profile=8,dv_bc=1,frame_rate=23.976 --track atmos.ec3 p81.hvc1.mp4
In fact, I have never been using it since mp4box v2.0 came out.
Use mp4muxer or mp4box or @RESET_9999 's script under his signature instead.
I see the file you have is already P8.1 dvhe, may I ask why would you like to convert it again?
Re: Dolby Vision now possible through MP4 Mux.
Because my OLED LG 55B6D can't play thie Dolbyvision.sw5163 wrote: I see the file you have is already P8.1 dvhe, may I ask why would you like to convert it again?
Tried mp4muxer but can't open a mkv file. Is there a Howto?sw5163 wrote: Use mp4muxer or mp4box or @RESET_9999 's script under his signature instead.
The other I will try out.
Re: Dolby Vision now possible through MP4 Mux.
This worked for Ep4, thankssw5163 wrote: ↑Mon Sep 05, 2022 2:14 amI 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:And then concat them together (lossless)Code: Select all
ffmpeg -i broken.mp4 -c copy -t 1:00 first.hevc ffmpeg -i broken.mp4 -c copy -ss 1:00 second.hevcIt will work on iOS devices.Code: Select all
mp4box -cat first.hevc -cat second.hevc -new fix.dvh1.mp4
No idea what's going on with that file.
Also why using aac instead of EAC3/atmos inside the file?
But Ep6 and Ep8 get audio sync issues even with this (not Ep4 strangely) - using either my aac encoded audio or original sources' eac3 audio (I only do soundbars and space adds up over files/time - why I encode to aac stereo - with Dolby upmix though so it's something better than nothing if ever played on surround)
And even going from source ffmpeg throws this on 6 & 8
Code: Select all
Error applying bitstream filters to an output packet for stream #0: Invalid data found when processing input
av_interleaved_write_frame(): Invalid data found when processing input
Error muxing a packet for output file #0I understand p8 alone and especially p8 with DVHE won't do DV on iOS, that's fine playback in HDR10 is what I'm fine with - but is the stutter always going to be there unless I make it a fake p5? Or is just because the iPhone 8 Plus is older, and on newer devices it will play smoother?
It's like even though DVHE it sees it's Dolby Vision and is just stuttering on the metadata on playback even if not displaying the RPU
Re: Dolby Vision now possible through MP4 Mux.
This release is just broken, I will give EP6 and 8 some tests.
First, mp4 with dvhe flag is not even playable by Apple's native player, you can only play that with third-party APP like Infuse/plex.staknhalo wrote: ↑Mon Sep 05, 2022 4:10 pmI understand p8 alone and especially p8 with DVHE won't do DV on iOS, that's fine playback in HDR10 is what I'm fine with - but is the stutter always going to be there unless I make it a fake p5? Or is just because the iPhone 8 Plus is older, and on newer devices it will play smoother?
Second, fake p5 is fine, Apple use it in their own ATV screensavers. The dolby windows app can play it, LG TV can play it.
https://sylvan.apple.com/Aerials/2x/entries.json
If you really don't want that, you can either: remove DV header (which won't do DV on anything)
Code: Select all
ffmpeg -i p8.dvhe.mp4 -c copy -vtag hvc1 hvc1.mp4
Code: Select all
mp4box -add dv.hevc:dv-profile=8.1 -new p81.hvc1.mp4
It's very likely that whatever the player you are using to decode DVHE is processing the video on its own, instead of hand them properly to Apple's player core. That's why I never use third part player on iOS.
Last edited by sw5163 on Mon Sep 05, 2022 4:46 pm, edited 2 times in total.
Re: Dolby Vision now possible through MP4 Mux.
That's what I'm after for p8 - so like DVHE/DVH1, it's a HEV1/HVC1 issue - but only with Dolby Vision files - but yet HEV1 files not Dolby Vision play fine - only HEV1 with Dolby Vision - any clue as to why besides just the way it is (according to Apple)? Edit: No, HEV1 even without Dolby Vision stutters. I have a lot of work to dosw5163 wrote: ↑Mon Sep 05, 2022 4:34 pmor convert to p8.1 hvc1 with DV(which won't do DV on Apple)Code: Select all
mp4box -add dv.hevc:dv-profile=8.1 -new p81.hvc1.mp4
Edit: Found this :
'hvc1' stores all parameter sets inside the MP4 container below the sample description boxes. 'hev1' stores all parameter sets in band (inside the HEVC stream).
The parameter sets are essentially mandatory metadata necessary to decode the streams.
So you have two slightly different ways of muxing HEVC into MP4.
I'd choose based on the play out and transport scenario.
Your player or your transport specification may require one or the other.
Plex for Android/iOS - Windows is just native Windows Store apps with Dolby Vision plugin simply to verify RPU alignment/sound and audio in sync/etc
Re: Dolby Vision now possible through MP4 Mux.
Yes, that's the reason mp4muxer/mp4dovi from github resulting in black screen.
Change fourcc codec in hex is not enough.
You can regard players that play hev1/dvhe are first doing "software decoding", then pass them to Apple's player core.staknhalo wrote: ↑Mon Sep 05, 2022 4:41 pmThat's what I'm after for p8 - so like DVHE/DVH1, it's a HEV1/HVC1 issue - but only with Dolby Vision files - but yet HEV1 files not Dolby Vision play fine - only HEV1 with Dolby Vision - any clue as to why besides just the way it is (according to Apple)? Edit: No, HEV1 even without Dolby Vision stutters. I have a lot of work to do![]()
While hvc1/dvh1 pass directly to Apple's player core and do "hardware decoding".
No, iPhone 8 Plus use A11 bionic and my iPad Pro 2017 use A10x fusion, they are way sufficient enough to play DV.
In fact, I think if Dolby allow Apple to play FEL, they can play even 4K 60 fps FEL and 4K 120fps MEL. (8K should have a problem though)
Last edited by sw5163 on Mon Sep 05, 2022 5:25 pm, edited 2 times in total.