Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
Woodstock
Posts: 10808
Joined: Sun Jul 24, 2011 11:21 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Woodstock »

I cannot give you specifics because I've been ignoring most of the Dolby and HDR stuff (not important to me). But the "enhancement layer" would be applied against the base layer... and running the base layer through a non-HDR tool like handbrake is going to change the what the enhancement applies to.

At the very least, whatever you use to reduce the size must pass through the original HDR data and maintain the same frame rate. And I do know that handbrake can't do that for you.
MartyMcNuts
Posts: 4590
Joined: Wed Nov 22, 2017 11:45 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by MartyMcNuts »

stephon1024 wrote:
Sat May 23, 2020 4:16 pm
Woodstock wrote:
Sat May 23, 2020 4:08 pm
stephon1024 wrote:
Sat May 23, 2020 3:57 pm
I've been doing it in handbrake then using Tsmuxer to extract the hevc file - but when I pop it in the tool it only starts analyzing and building the base layer and ignores the enhancement layer...
Handbrake does not handle HDR, let alone DV, so you lose the color mapping.

Also, if you compress the main video track, the hints in the DV track would no longer be valid.
Hey Woodstock, the EL i've already separated from the MakeMKV backup. So I had both streams, base and enhancement - are you saying that even though I have a base layer and a EL, there is still DV info on that base layer? That would make sense if true, but I was under the impression that there isn't anything special about the base layer, it's the EL where all the DV info lives. So shouldn't I be able to compress the base layer without removing the DV info? Then just use yusesope's tool to add the DV EL back?

It was an attempt... The massive BL_EL_RPU file that I created plays on my LG C9 but it stutters like mad making me think it's too much for the SOC on the C9 to handle. I get the DV tag showing up in the upper right and it looks amazing... just doesn't play right. This is my attempt to lower the overall bitrate of the stream
I have previously used NVencC64 command line to compress the base layer of Gemini Man and it still worked in yusesope's tool. Once muxed to ts file, mediainfo shows it as DV. (I do not have a Dolby Vision TV so could not test the files) although I did provide some sample links. I'm not sure if I used the right tsmuxer version but you could test these and see if they work for you before going any further.

See https://www.makemkv.com/forum/viewtopic ... 145#p87824

If they work for you and you want to give it a try, let me know and I can give you the nvenc command.
Cheers :D
----------------------------------------------------------------------------------------------------------------------------
For UHD enabled drives (AU/NZ/SG + Others) & DIY Single Drive Flasher (WW): https://uhdenableddrives.com
stephon1024
Posts: 14
Joined: Thu May 21, 2020 8:30 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by stephon1024 »

MartyMcNuts wrote:
Sun May 24, 2020 12:09 am
stephon1024 wrote:
Sat May 23, 2020 4:16 pm
Woodstock wrote:
Sat May 23, 2020 4:08 pm


Handbrake does not handle HDR, let alone DV, so you lose the color mapping.

Also, if you compress the main video track, the hints in the DV track would no longer be valid.
Hey Woodstock, the EL i've already separated from the MakeMKV backup. So I had both streams, base and enhancement - are you saying that even though I have a base layer and a EL, there is still DV info on that base layer? That would make sense if true, but I was under the impression that there isn't anything special about the base layer, it's the EL where all the DV info lives. So shouldn't I be able to compress the base layer without removing the DV info? Then just use yusesope's tool to add the DV EL back?

It was an attempt... The massive BL_EL_RPU file that I created plays on my LG C9 but it stutters like mad making me think it's too much for the SOC on the C9 to handle. I get the DV tag showing up in the upper right and it looks amazing... just doesn't play right. This is my attempt to lower the overall bitrate of the stream
I have previously used NVencC64 command line to compress the base layer of Gemini Man and it still worked in yusesope's tool. Once muxed to ts file, mediainfo shows it as DV. (I do not have a Dolby Vision TV so could not test the files) although I did provide some sample links. I'm not sure if I used the right tsmuxer version but you could test these and see if they work for you before going any further.

See https://www.makemkv.com/forum/viewtopic ... 145#p87824

If they work for you and you want to give it a try, let me know and I can give you the nvenc command.
Marty, thank you so much for the response man! I didn't see that thread you posted, but it's exactly what I'm experiencing!

I'm going to give your test files a run on my LG C9, if they work and report back DV... You're a savior. I'll check out NVencC64 too... I'm guessing I'm just losing some DV metadata in Handbrake when I'm compressing. It's funny, handbrake nightly transfers HDR10 data just fine (if you use the right "advanced options" settings...) but completely erases DV data in the base layer...

I will report back to you as soon as I test the files you posted, it's late and I'm probably already in trouble with the wife...

Thanks again!
yusesope
Posts: 221
Joined: Sun Jul 28, 2019 3:34 am

Re: Dolby Vision now possible through MP4 Mux.

Post by yusesope »

stephon1024 wrote:
Sat May 23, 2020 3:57 pm
Is there anyway to use handbrake to compress the base file before using your special tool?
For this type of experiment, I recommend using the 0.0.4 alfa version of my tool.

You're right when you say "it's the EL where all the DV info lives" but keep in mind that the info contained in EL are "calibrated" on those inside BL.
If you re-encode BL, logically, you should also modify EL.
No one has yet reversed the algorithm needed to generate new RPU metadata (and, in the case of FEL layers, new frames).

Imagine a guy (BL layer) with a weight of 180Kg who, after following a diet, reaches a body weight of 80Kg.
His clothes (EL layer) are now unusable but the clothing stores (the algorithm) are closed due to the quarantine.
The guy will be forced to use his old clothes.
He will always have clothes on but his style will be a little "sui generis".
PapitaHD
Posts: 26
Joined: Sun Mar 01, 2020 10:31 am

Re: Dolby Vision now possible through MP4 Mux.

Post by PapitaHD »

yusesope wrote:
Sun May 24, 2020 6:40 am
stephon1024 wrote:
Sat May 23, 2020 3:57 pm
Is there anyway to use handbrake to compress the base file before using your special tool?
For this type of experiment, I recommend using the 0.0.4 alfa version of my tool.

You're right when you say "it's the EL where all the DV info lives" but keep in mind that the info contained in EL are "calibrated" on those inside BL.
If you re-encode BL, logically, you should also modify EL.
No one has yet reversed the algorithm needed to generate new RPU metadata (and, in the case of FEL layers, new frames).

Imagine a guy (BL layer) with a weight of 180Kg who, after following a diet, reaches a body weight of 80Kg.
His clothes (EL layer) are now unusable but the clothing stores (the algorithm) are closed due to the quarantine.
The guy will be forced to use his old clothes.
He will always have clothes on but his style will be a little "sui generis".
I've experimented a lot, re-encoding the BL layer with staxrip/x265 and 0.0.4alfa always merged it with EL without any problem. Also I have an m9702 so I can just mux the re-encoded BL and EL into full UHD BDVM structure (with tsMuxeR) and DV works. I spent hours by testing the results (re-encoded BL+EL), comparing them scene by scene to the HDR10 base layer and also to the full untouched UHD BluRay on my LG C8 Oled and I really beleive this method works perfectly. I've never noticed any difference between the files with re-encoded BL and the full UHD BluRays, but the differences were pretty significant comparing them to the untouched HDR10-base layer. I used the following movies for my tests: Aquaman, The Meg, Fantastic Beasts 2, Midway, Game of Thrones S08E03.
Using the right x265 settings, only the bitrate will be lower but everything else (including the HDR10 metadata) will be the same as in the original BL so I don't see why wouldn't it work.
yusesope
Posts: 221
Joined: Sun Jul 28, 2019 3:34 am

Re: Dolby Vision now possible through MP4 Mux.

Post by yusesope »

PapitaHD wrote:
Sun May 24, 2020 9:15 am
Using the right x265 settings, only the bitrate will be lower but everything else (including the HDR10 metadata) will be the same as in the original BL so I don't see why wouldn't it work.
Because (lowering the bitrate) you reduce the amount of information inside BL.
EL aims to improve the performance of BL but if that information that needed to be improved is no longer there, there may be a risk of producing artifacts.

I'm not saying that this method doesn't work but I'm sure that the magic machine built by Dolby would return different ELs and RPUs using files with different bitrates.

Unfortunately, I don't have a screen compatible with Dolby Vision technology and I can express myself only by looking at the sequences of 0 and 1.
PapitaHD
Posts: 26
Joined: Sun Mar 01, 2020 10:31 am

Re: Dolby Vision now possible through MP4 Mux.

Post by PapitaHD »

yusesope wrote:
Sun May 24, 2020 10:16 am
PapitaHD wrote:
Sun May 24, 2020 9:15 am
Using the right x265 settings, only the bitrate will be lower but everything else (including the HDR10 metadata) will be the same as in the original BL so I don't see why wouldn't it work.
Because (lowering the bitrate) you reduce the amount of information inside BL.
EL aims to improve the performance of BL but if that information that needed to be improved is no longer there, there may be a risk of producing artifacts.

I'm not saying that this method doesn't work but I'm sure that the magic machine built by Dolby would return different ELs and RPUs using files with different bitrates.

Unfortunately, I don't have a screen compatible with Dolby Vision technology and I can express myself only by looking at the sequences of 0 and 1.
That all sounds logical, but I watched about 20 titles from start to finish all with re-encoded BLs and I've never seen any artifacts. And I used one of the best player+screen (screen was professionally calibrated) combos that is available for DV-testing purposes.
yusesope
Posts: 221
Joined: Sun Jul 28, 2019 3:34 am

Re: Dolby Vision now possible through MP4 Mux.

Post by yusesope »

PapitaHD wrote:
Sun May 24, 2020 10:55 am
That all sounds logical, but I watched about 20 titles from start to finish all with re-encoded BLs and I've never seen any artifacts. And I used one of the best player+screen (screen was professionally calibrated) combos that is available for DV-testing purposes.
I am sincerely happy to read what you write.

However, if someone asks me, I don't have the data to be able to certify the validity of this method.

It would be interesting to know the values ​​you use when encoding BL.
And it would be even more interesting to find out what the minimum bitrate value is before some artifacts appear (compared to the original bitrate).
PapitaHD
Posts: 26
Joined: Sun Mar 01, 2020 10:31 am

Re: Dolby Vision now possible through MP4 Mux.

Post by PapitaHD »

yusesope wrote:
Sun May 24, 2020 11:27 am
PapitaHD wrote:
Sun May 24, 2020 10:55 am
That all sounds logical, but I watched about 20 titles from start to finish all with re-encoded BLs and I've never seen any artifacts. And I used one of the best player+screen (screen was professionally calibrated) combos that is available for DV-testing purposes.
I am sincerely happy to read what you write.

However, if someone asks me, I don't have the data to be able to certify the validity of this method.

It would be interesting to know the values ​​you use when encoding BL.
And it would be even more interesting to find out what the minimum bitrate value is before some artifacts appear (compared to the original bitrate).
I always use crf 14-18, which generates variable bitrate. For newer movies that were recorded with digital cameras and have completely smooth picture I usually lower the bitrate to 40-60% of the original, but for grainy stuff (older movies recorded on film) I never go below 65%. Besides that, I mostly use default "slow preset" settings with a few changes (deblock -3:-3, no-sao, no-open-gop, bframes 8 ).
yusesope
Posts: 221
Joined: Sun Jul 28, 2019 3:34 am

Re: Dolby Vision now possible through MP4 Mux.

Post by yusesope »

PapitaHD wrote:
Sun May 24, 2020 11:42 am
...
Thanks.
One last question, if you saw Doctor Sleep , did you also encountered the problem of the girl's cheeks (as reported HERE) with your setup and your files?
PapitaHD
Posts: 26
Joined: Sun Mar 01, 2020 10:31 am

Re: Dolby Vision now possible through MP4 Mux.

Post by PapitaHD »

yusesope wrote:
Sun May 24, 2020 12:36 pm
PapitaHD wrote:
Sun May 24, 2020 11:42 am
...
Thanks.
One last question, if you saw Doctor Sleep , did you also encountered the problem of the girl's cheeks (as reported HERE) with your setup and your files?
I have that movie with re-encoded BL too (I encoded it with hdr10+ parser so only the bitrate is different once again) and I checked it again: the girl has blushed cheeks, but it seems natural to my eyes almost the same as on my HDR10 monitor and nothing like on the Shield/Plex pictures posted in your link.
shawnc22
Posts: 637
Joined: Tue Jan 21, 2020 7:40 am

Re: Dolby Vision now possible through MP4 Mux.

Post by shawnc22 »

PapitaHD wrote:
Sun May 24, 2020 3:03 pm
yusesope wrote:
Sun May 24, 2020 12:36 pm
PapitaHD wrote:
Sun May 24, 2020 11:42 am
...
Thanks.
One last question, if you saw Doctor Sleep , did you also encountered the problem of the girl's cheeks (as reported HERE) with your setup and your files?
I have that movie with re-encoded BL too (I encoded it with hdr10+ parser so only the bitrate is different once again) and I checked it again: the girl has blushed cheeks, but it seems natural to my eyes almost the same as on my HDR10 monitor and nothing like on the Shield/Plex pictures posted in your link.
Yeah that red push issue seems to be one isolated with the Shield. You wouldn’t happen to have one also would you? It’d be great to have some comparisons between the Shield and m9072 for playback of movies with an FEL.
tr000
Posts: 71
Joined: Thu Jul 18, 2019 11:03 am

Re: Dolby Vision now possible through MP4 Mux.

Post by tr000 »

I was growing tired of copying everything to my USB drive. For all my Roku peeps, after ~8 hours (in addition to the already countless) spent tinkering with this horrid format that I can't seem to get away from, I finally figured out a way to stream DV files with subtitles to a Roku Home Theater Dolby Vision TV via DLNA. Plex wasn't able to do it, Windows Media Streaming couldn't do it, only Serviio could. Note that you'll need to use Profile 4 files for this. Quantitatively and qualitatively, there is no real detriment to having Profile 4 files over 5 in my experience. I usually encode everything in Profile 5 simply because the number is higher, but the only difference in reality is that 5 uses a PQ algorithm to recreate the DV colorspace while 4 has an explicit EL. However, 5 can support a theoretically higher bitrate by way of having a higher DV level (which is distinct from profile!), though I've never seen a file as of yet that exceeds 4 or 5's level capabilities. Well, this is a tangent. Anyway, to stream DV files with subtitles on a Roku DV TV-use Serviio, put the .srt with the mp4, and press play.
shawnc22
Posts: 637
Joined: Tue Jan 21, 2020 7:40 am

Re: Dolby Vision now possible through MP4 Mux.

Post by shawnc22 »

tr000 wrote:
Sun May 24, 2020 4:30 pm
I usually encode everything in Profile 5 simply because the number is higher, but the only difference in reality is that 5 uses a PQ algorithm to recreate the DV colorspace while 4 has an explicit EL.
eeek don't do something simply because a number is higher. like you said, profile 5 cannot utilize an explicit EL, so there will be issues with FEL movies as a proper FEL->MEL conversion does not currently exist.
PapitaHD
Posts: 26
Joined: Sun Mar 01, 2020 10:31 am

Re: Dolby Vision now possible through MP4 Mux.

Post by PapitaHD »

shawnc22 wrote:
Sun May 24, 2020 3:22 pm
PapitaHD wrote:
Sun May 24, 2020 3:03 pm
yusesope wrote:
Sun May 24, 2020 12:36 pm

Thanks.
One last question, if you saw Doctor Sleep , did you also encountered the problem of the girl's cheeks (as reported HERE) with your setup and your files?
I have that movie with re-encoded BL too (I encoded it with hdr10+ parser so only the bitrate is different once again) and I checked it again: the girl has blushed cheeks, but it seems natural to my eyes almost the same as on my HDR10 monitor and nothing like on the Shield/Plex pictures posted in your link.
Yeah that red push issue seems to be one isolated with the Shield. You wouldn’t happen to have one also would you? It’d be great to have some comparisons between the Shield and m9072 for playback of movies with an FEL.
No, unfortunately I don't have a Shield.
Post Reply