Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
quietvoid
Posts: 371
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

RESET_9999 wrote:
Wed Oct 27, 2021 11:24 pm
ok so I tried with plex resolution match on ... this makes the TV switch to 720p for 720p video but it stays in 1080p for 4k videos ...
So I guess the right setting is ''off '' but still no 4k for non-4k video if the firestick display setting is ''auto 4k max''
I remembered I did post about this before: https://www.avsforum.com/threads/offici ... t-61099898
So it's weird for it not to upscale at all for you..

Although I can't remember if I did that test on the new 4K Max.
DaMacFunkin
Posts: 311
Joined: Tue Oct 30, 2018 4:17 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by DaMacFunkin »

mattmarsden wrote:
Wed Oct 27, 2021 4:33 pm
Tormented12 wrote:
Tue Oct 26, 2021 4:26 pm
I have a question regarding encoding a file to 1920x1080p and add the Dolby Vision later. Somehow, I don't get the right file after RPU insertion.

I have encoded a Game of Thrones Episode (4K REMUX, which is Dolby Vision, Version 1.0, dvhe.07.06, BL+EL+RPU). I encoded it without cropping, (which I do for every encode, also movies, I just resize it from 3840x2160 to 1920x1080).

It got me an 1080p episode, which is HDR10. I used the following command to change the .mkv file to hevc:

ffmpeg -y -i GOT.S01E01.mkv -an -c:v copy -f hevc GOT.S01E01.hevc

After this, I use the command to extract the RPU from the HEVC with mode 2:

dovi_tool -m 2 extract-rpu GOT.S01E01.hevc, which gives me an RPU.bin, which, I think should be converted to profile 8.

After this, I use the ffmpeg command to change the re-encoded file from .mkv file to hevc.file. I then usethe following command to inject the RPU into the re-encoded HEVC.file:

dovi_tool inject-rpu -i GOT.S01E01.HDR.hevc --rpu-in RPU.bin -o injected_output.hevc

But somehow, I doesn't work for me. It keeps begin SMPTE 2086, HDR10. Dolby Vision won't be visible in the hevc output file. When I mux the hevc.file to .mkv, then it still is only HDR10, and not Dolby Vision.

What is the part where I screw up? I'm doing it somewhere, but I just can't put my finger on it. Or is it a cropping thing? Some help with this would be very appreciated!

Regards,

Tormented12
Try running the muxed mkv through MakeMKV
Makemkv is just adding the dvhe flag, in profile 7 and 8 you can do this quickly with a hex editor, it is in the linked to guide on the previous page.
Tormented12
Posts: 13
Joined: Tue Oct 26, 2021 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Tormented12 »

I'm facing a new problem with a movie: Bumblebee (2018).

I encoded the movie to 1920x1080p, the movie itself is DV 07.06, so I just extract the RPU (Shield Pro, so it does play). Somehow, when injected into the encode, and afterwards to .mkv and then makemkv, it is DV 04, which it sees as ''SDR''. I don't know why this is happening? When I extract the RPU with mode 2, I will get a DV 08.03 file. If I use mode 0, I also get DV 04. Does anyone know why this is happening with this movie?
quietvoid
Posts: 371
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

Tormented12 wrote:
Thu Oct 28, 2021 6:44 pm
I'm facing a new problem with a movie: Bumblebee (2018).

I encoded the movie to 1920x1080p, the movie itself is DV 07.06, so I just extract the RPU (Shield Pro, so it does play). Somehow, when injected into the encode, and afterwards to .mkv and then makemkv, it is DV 04, which it sees as ''SDR''. I don't know why this is happening? When I extract the RPU with mode 2, I will get a DV 08.03 file. If I use mode 0, I also get DV 04. Does anyone know why this is happening with this movie?
Can you provide the RPU file?
It would be weird for the profile to be detected as 4.
Tormented12
Posts: 13
Joined: Tue Oct 26, 2021 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Tormented12 »

quietvoid wrote:
Thu Oct 28, 2021 10:01 pm
Can you provide the RPU file?
It would be weird for the profile to be detected as 4.
https://mega.nz/file/atVkkZQJ#Ghn9_R5Mf ... 8J7Xal5GaA

I have uploaded the RPU.
NiCE77
Posts: 86
Joined: Sat Mar 28, 2020 7:49 am

Re: Dolby Vision now possible through MP4 Mux.

Post by NiCE77 »

@quietvoid
When I extract RPU from the Enhancement Layer, the resulting RPU length does not match the video length.
Mismatched lengths: video 163840, RPU 128978
This error has occurred in one movie so far.
I can send the sample EL.hevc file if you need via PM.
quietvoid
Posts: 371
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

NiCE77 wrote:
Fri Oct 29, 2021 8:53 am
@quietvoid
When I extract RPU from the Enhancement Layer, the resulting RPU length does not match the video length.
Mismatched lengths: video 163840, RPU 128978
This error has occurred in one movie so far.
I can send the sample EL.hevc file if you need via PM.
The EL was probably cut off somehow.
In the past tsMuxer did that, you should try getting it directly from the m2ts with ffmpeg.
I don't need the sample because it wouldn't be very useful unless you're 100% sure it's complete.
quietvoid
Posts: 371
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

Tormented12 wrote:
Fri Oct 29, 2021 5:01 am
https://mega.nz/file/atVkkZQJ#Ghn9_R5Mf ... 8J7Xal5GaA

I have uploaded the RPU.
Thanks. I can't reproduce the profile 4 issue with MakeMKV.

Regardless of if the RPU is added with x265 or injected, it always shows profile 7: Codec: MpegH HEVC Main10@L5.1 (dvhe.07.00 BL+RPU)
MKVToolNix (v62) also adds the correct block: Dolby Vision, Version 1.0, dvhe.07.06, BL+EL+RPU, Blu-ray compatible

By the way, you shouldn't be reencoding unless the RPU is profile 8.
Because the EL would probably be out of sync, and might not even work with 1080p base video.
And keeping a profile 7 RPU makes no sense without the EL.
Tormented12
Posts: 13
Joined: Tue Oct 26, 2021 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Tormented12 »

quietvoid wrote:
Fri Oct 29, 2021 11:49 am
Thanks. I can't reproduce the profile 4 issue with MakeMKV.

Regardless of if the RPU is added with x265 or injected, it always shows profile 7: Codec: MpegH HEVC Main10@L5.1 (dvhe.07.00 BL+RPU)
MKVToolNix (v62) also adds the correct block: Dolby Vision, Version 1.0, dvhe.07.06, BL+EL+RPU, Blu-ray compatible

By the way, you shouldn't be reencoding unless the RPU is profile 8.
Because the EL would probably be out of sync, and might not even work with 1080p base video.
And keeping a profile 7 RPU makes no sense without the EL.
Thanks for your reply.

What do you mean with the reencoding? Wouldn't it be possible to encode the DV 07.06-> change profile to 08 and inject it back?

As for the profile 7 RPU without the EL, I think I have to check the differences between profiles. What would be ''better'' to use? Convert to profile 08? Since that did work with Bumblebee (somehow 08.03, not 08.06). Is there a difference between 08.03 / 08.06? Another forummer told me I could change the HEX using the HEX-editor to change the profile from 08.03 to 08.06, but I don't know how to use/do that. Any advice what would work best?
quietvoid
Posts: 371
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

Tormented12 wrote:
Fri Oct 29, 2021 1:54 pm
Thanks for your reply.

What do you mean with the reencoding? Wouldn't it be possible to encode the DV 07.06-> change profile to 08 and inject it back?
If you're reencoding just use x265 and the RPU directly: https://x265.readthedocs.io/en/master/c ... vision-rpu
You should just convert to profile 8.

Tormented12 wrote:
Fri Oct 29, 2021 1:54 pm
As for the profile 7 RPU without the EL, I think I have to check the differences between profiles. What would be ''better'' to use? Convert to profile 08? Since that did work with Bumblebee (somehow 08.03, not 08.06). Is there a difference between 08.03 / 08.06? Another forummer told me I could change the HEX using the HEX-editor to change the profile from 08.03 to 08.06, but I don't know how to use/do that. Any advice what would work best?
8.03 and 8.06 is just a level difference, because the 03 is 1080p while 06 is 2160p.
With most devices, there's no difference between profile 7 and profile 8, especially if you use MKV.

The hex editing thing only applies for MP4s, you shouldn't have to do anything if you use MKVToolNix v58+.
MakeMKV isn't necesary either, for encodes without an EL.
Tormented12
Posts: 13
Joined: Tue Oct 26, 2021 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Tormented12 »

quietvoid wrote:
Fri Oct 29, 2021 2:59 pm
Tormented12 wrote:
Fri Oct 29, 2021 1:54 pm
Thanks for your reply.

What do you mean with the reencoding? Wouldn't it be possible to encode the DV 07.06-> change profile to 08 and inject it back?
If you're reencoding just use x265 and the RPU directly: https://x265.readthedocs.io/en/master/c ... vision-rpu

Tormented12 wrote:
Fri Oct 29, 2021 1:54 pm
As for the profile 7 RPU without the EL, I think I have to check the differences between profiles. What would be ''better'' to use? Convert to profile 08? Since that did work with Bumblebee (somehow 08.03, not 08.06). Is there a difference between 08.03 / 08.06? Another forummer told me I could change the HEX using the HEX-editor to change the profile from 08.03 to 08.06, but I don't know how to use/do that. Any advice what would work best?
8.03 and 8.06 is just a level difference, because the 03 is 1080p while 06 is 2160p.
With most devices, there's no difference between profile 7 and profile 8, especially if you use MKV.

The hex editing thing only applies for MP4s, you shouldn't have to do anything if you use MKVToolNix v58+.
MakeMKV isn't necesary either.
Thanks for your quick reply! So the 08.03 should be fine now?

I use Ripbotx264 for for the encoding. After I use ffmpeg to get the .mkv -> hevc, and extract the RPU (will extract with mode 2 from now on). Then i change the encoded file from .mkv -> hevc and inject the RPU into the encode. After this I mux to .mkv. Then it just says 'HDR10''. I really have to mux the .mkv file through Makemkv to make the DV 08.03 visible.
quietvoid
Posts: 371
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

Tormented12 wrote:
Fri Oct 29, 2021 3:04 pm
Thanks for your quick reply! So the 08.03 should be fine now?
Yes.

Tormented12 wrote:
Fri Oct 29, 2021 3:04 pm
I use Ripbotx264 for for the encoding. After I use ffmpeg to get the .mkv -> hevc, and extract the RPU (will extract with mode 2 from now on). Then i change the encoded file from .mkv -> hevc and inject the RPU into the encode. After this I mux to .mkv. Then it just says 'HDR10''. I really have to mux the .mkv file through Makemkv to make the DV 08.03 visible.
You probably have to update your MKVToolNix. Don't use ffmpeg for muxing to MKV.

Also, you can just use ffmpeg without having to demux before extracting the RPU.
Example:

Code: Select all

ffmpeg -i input.mkv -c:v copy -vbsf hevc_mp4toannexb -f hevc - | dovi_tool extract-rpu - -o RPU.bin
Tormented12
Posts: 13
Joined: Tue Oct 26, 2021 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Tormented12 »

quietvoid wrote:
Fri Oct 29, 2021 3:08 pm
Tormented12 wrote:
Fri Oct 29, 2021 3:04 pm
Thanks for your quick reply! So the 08.03 should be fine now?
Yes.

Tormented12 wrote:
Fri Oct 29, 2021 3:04 pm
I use Ripbotx264 for for the encoding. After I use ffmpeg to get the .mkv -> hevc, and extract the RPU (will extract with mode 2 from now on). Then i change the encoded file from .mkv -> hevc and inject the RPU into the encode. After this I mux to .mkv. Then it just says 'HDR10''. I really have to mux the .mkv file through Makemkv to make the DV 08.03 visible.
You probably have to update your MKVToolNix. Don't use ffmpeg for muxing to MKV.

Also, you can just use ffmpeg without having to demux before extracting the RPU.
Example:

Code: Select all

ffmpeg -i input.mkv -c:v copy -vbsf hevc_mp4toannexb -f hevc - | dovi_tool extract-rpu - -o RPU.bin
Somehow I'm getting a error when using that command. Thats why I seperate them. So .mkv -> hevc, after that I use dovi_tool -m 2 extract-rpu video.hevc.
NiCE77
Posts: 86
Joined: Sat Mar 28, 2020 7:49 am

Re: Dolby Vision now possible through MP4 Mux.

Post by NiCE77 »

quietvoid wrote:
Fri Oct 29, 2021 11:34 am
NiCE77 wrote:
Fri Oct 29, 2021 8:53 am
@quietvoid
When I extract RPU from the Enhancement Layer, the resulting RPU length does not match the video length.
Mismatched lengths: video 163840, RPU 128978
This error has occurred in one movie so far.
I can send the sample EL.hevc file if you need via PM.
The EL was probably cut off somehow.
In the past tsMuxer did that, you should try getting it directly from the m2ts with ffmpeg.
I don't need the sample because it wouldn't be very useful unless you're 100% sure it's complete.
Thanks! It's working with ffmpeg!
RESET_9999
Posts: 1853
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

NiCE77 wrote:
Fri Oct 29, 2021 4:22 pm

Thanks! It's working with ffmpeg!
I'm curious, what movie is that?
Post Reply