Dolby Vision

MKV playback, recompression, remuxing, codec packs, players, howtos, etc.
Nodiaque
Posts: 18
Joined: Wed Apr 28, 2021 6:41 pm

Re: Dolby Vision

Post by Nodiaque »

I think a found a way to do less hoops. I tried mkvmerge and it keep the dv info. Thus I'll simply merge the audio with mkvtoolnix for the audio
Nodiaque
Posts: 18
Joined: Wed Apr 28, 2021 6:41 pm

Re: Dolby Vision

Post by Nodiaque »

centuryx476 wrote:
Tue Nov 09, 2021 1:48 pm
Coopervid wrote:
Tue Nov 09, 2021 11:38 am
Yes, that should work. Like said in the tutorial you don't use the RPU.bin that is created.
Thank you.
Quick question. Do you know how to extract the BL.hevc and EL.hevc using x265, ffmpeg ? I don't want to use the extractor provided on that forum.

Edit: I think I got it
ffmpeg -i my.mkv -c:v copy -vbsf hevc_mp4toannexb -f hevc - | dovi_tool demux -

This outputs a BL.hevc and EL.hevc using dovi_tool
I tried using your ffmpeg command line and I get "at least one output file must be specified"
centuryx476
Posts: 25
Joined: Fri Apr 24, 2020 7:11 pm

Re: Dolby Vision

Post by centuryx476 »

Make sure to include the - at the end of the command. IT is there for a reason
ffmpeg -i my.mkv -c:v copy -vbsf hevc_mp4toannexb -f hevc - | dovi_tool demux -
Nodiaque
Posts: 18
Joined: Wed Apr 28, 2021 6:41 pm

Re: Dolby Vision

Post by Nodiaque »

AH! didn't see that one, saw the pother. In the end, I just put a filename and it worked (I only had 1 stream anyway).
Coopervid
Posts: 1931
Joined: Tue Feb 19, 2019 10:32 pm

Re: Dolby Vision

Post by Coopervid »

OK guys! I see I got you started :D
centuryx476
Posts: 25
Joined: Fri Apr 24, 2020 7:11 pm

Re: Dolby Vision

Post by centuryx476 »

Coopervid wrote:
Tue Nov 09, 2021 5:14 pm
OK guys! I see I got you started :D
Indeed you did. I been trying to organize the CHAOS that is dolby vision. I'm trying to merge all these different softwares into a unified software (Luckily I am a programmer).

Some questions about the BL and EL layers.
I encode down the BL layer which is no problem.
What exactly is the EL layer ? IT seems to be a 1920x1080 resolution. A google search says something that the EL is the difference between the BL. It is a little confusing.
Why do we need it for dolby vision ? If also the RPU.bin file is the actual metadata ?
Nodiaque
Posts: 18
Joined: Wed Apr 28, 2021 6:41 pm

Re: Dolby Vision

Post by Nodiaque »

Yup, big help. I manage to use ffmpeg to extract my compressed mkv so I could use tsmuxer to create a new file with the compress bl and el, then use makemkv to extract an audioless mkv and then mkvtoolnix to merge the audio in. At least I don't have to recompress everything. makemkv did says there was a lot of sync issue (while there's no audio) but I played the file and don't see any issue.

I had to find a way because fastflix output mkv. The author had no intention on supporting DV thuse I might get the code from github and see if I can add it myself. I'll have to check dovitools, seems really nice.

My understanding is EL is the actual data for the DV. It's the lumance (or whatever the real name) data like HDR have. Don't know what is RPU since we don't even put it back in or use it
Coopervid
Posts: 1931
Joined: Tue Feb 19, 2019 10:32 pm

Re: Dolby Vision

Post by Coopervid »

The EL layer is the DV information. It adusts the luminance continously during the whole movie. Normal HDR is only static and uses the same luminance during the whole movie
centuryx476
Posts: 25
Joined: Fri Apr 24, 2020 7:11 pm

Re: Dolby Vision

Post by centuryx476 »

Coopervid wrote:
Tue Nov 09, 2021 5:35 pm
The EL layer is the DV information. It adusts the luminance continously during the whole movie. Normal HDR is only static and uses the same luminance during the whole movie
OK I understand now the EL layer. VERY important layer then.

So, using the txmuxer outputs as a .ts file. Is there a way to have this as a .mkv file ? That way my OCD can be happy - LOL
Coopervid
Posts: 1931
Joined: Tue Feb 19, 2019 10:32 pm

Re: Dolby Vision

Post by Coopervid »

The RPU.bin is actually also contained in the EL data. I have read that RPU.bin is only interesting for people who want to change anything when they recode using X265. So for muxing BL and EL are sufficient.
Coopervid
Posts: 1931
Joined: Tue Feb 19, 2019 10:32 pm

Re: Dolby Vision

Post by Coopervid »

You can output to ISO instead of m2ts in TSMuxer and then read the ISO in Makemkv.
centuryx476
Posts: 25
Joined: Fri Apr 24, 2020 7:11 pm

Re: Dolby Vision

Post by centuryx476 »

Coopervid wrote:
Tue Nov 09, 2021 5:41 pm
You can output to ISO instead of m2ts in TSMuxer and then read the ISO in Makemkv.
OK, and then just output to .mkv. Talk about full circle. Rip with makemkv and then Rip again with makemkv as the last step. LOL
This is a lot of steps but to be honest. IT is not too bad.
I can now start figuring out a way to make this into an uber script.

Moving on too Dolby Vision Profiles.
The RAW 4K movie I am using looks like Profile 7 (BL + EL + RPU)
MediaInfo - HDR format : Dolby Vision, Version 1.0, dvhe.07.06, BL+EL+RPU, Blu-ray compatible / SMPTE ST 2086, HDR10 compatible
Once I am done completing all these steps it will be profile 5 or 8.1 ? Almost every source I read says we cannot replicate a Profile 7 Dolby Vision...
Am I making sense ?
Coopervid
Posts: 1931
Joined: Tue Feb 19, 2019 10:32 pm

Re: Dolby Vision

Post by Coopervid »

Yeah a lot of steps. Since I own CloneBD I can just rip the main movie, compress it, keep DV and could run it through Makemkv. But I just use the ISO. So no steps needed for my purposes.
But I have checked that makemkv produces 7.06 Dolby Vision. So if you rip to MKV with it, demux, compress the BL layer, remux to ISO and the create a MKV with Makemkv it should result again 7.06.

I think you are confusing this with making a MP4 with DV.
centuryx476
Posts: 25
Joined: Fri Apr 24, 2020 7:11 pm

Re: Dolby Vision

Post by centuryx476 »

Coopervid wrote:
Tue Nov 09, 2021 6:08 pm
Yeah a lot of steps. Since I own CloneBD I can just rip the main movie, compress it, keep DV and could run it through Makemkv. But I just use the ISO. So no steps needed for my purposes.
But I have checked that makemkv produces 7.06 Dolby Vision. So if you rip to MKV with it, demux, compress the BL layer, remux to ISO and the create a MKV with Makemkv it should result again 7.06.

I think you are confusing this with making a MP4 with DV.
I think you are correct on me confusing with MP4.
OK, I have a LOT of work to do and a lot of code to review!
Then comes the actually playing of the file. Looks like the only device that can handle all DV profiles is the nvidia pro shield 2019. Otherwise its a waste and it falls back to HDR10. Unless i'm reading it wrong!!!

DV Profile 5: This is just BL+RPU - This means the file is just Dolby Vision and no HDR10.
DV Profile 7: This is BL + EL + RPU - This has Dolby Vision and HDR10. So if the device you playing on does NOT support DV then it falls back to HDR10
DV Profile 8.1: This is just also BL+RPU but is HDR10 compatible.

So in theory I can convert a profile 7 movie to profile 5 with the knowledge that it will only work on Dolby Vision devices. Since it will NOT have HDR10.
How accurate am I in the above ?

I'm bringing this up because my Sony TV can only play DV Profile 5. I have to get a nvidia shield pro in order to play the other profiles. ITs the only device that can render these profiles.
Coopervid
Posts: 1931
Joined: Tue Feb 19, 2019 10:32 pm

Re: Dolby Vision

Post by Coopervid »

I can't help you since I only verified the tutorial. It's not anything I really do. Good luck with your progress. Maybe you can write a tutorial for that when you have success. That would be beneficial for those who want to do the same,
Post Reply