Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
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: 373
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: 373
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: 373
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: 373
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: 373
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: 2086
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?
NiCE77
Posts: 86
Joined: Sat Mar 28, 2020 7:49 am

Re: Dolby Vision now possible through MP4 Mux.

Post by NiCE77 »

RESET_9999 wrote:
Fri Oct 29, 2021 5:34 pm
NiCE77 wrote:
Fri Oct 29, 2021 4:22 pm

Thanks! It's working with ffmpeg!
I'm curious, what movie is that?
Despicable Me 3
NiCE77
Posts: 86
Joined: Sat Mar 28, 2020 7:49 am

Re: Dolby Vision now possible through MP4 Mux.

Post by NiCE77 »

I have a problem with another movie: Bumblebee (2018)
When I extract RPU with -m 2 parameter from the EL, and inject the resulted RPU.bin to the reencoded BL, the dolby's mp4muxer does not work with this injected hevc file.
It finishes in less than 1 minute and creates a 0-byte file, however, mkvtoolnix makes a working P8 mkv file.
Post Reply