Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
ad329
Posts: 1
Joined: Sat Dec 25, 2021 3:39 am

Re: Dolby Vision now possible through MP4 Mux.

Post by ad329 »

nasuel wrote:
Fri Dec 24, 2021 8:46 pm
quietvoid wrote:
Fri Dec 24, 2021 7:26 pm
nasuel wrote:
Fri Dec 24, 2021 7:13 pm
What steps have i to do to make the file to a Profile 5 file? I thought that was these two steps
You can't, the video is still HDR10.
Okay, so that means at the moment it is not possible to create a backup of a Dolby Vision UHD BD to play on AppleTV with Dolby Vision, correct.

Thanks and regards
Following up on this, I think this is correct but trying to figure out why this is the case? It's not the color space conversion, but for some reason the RPU can't be created? Why can't the RPU from a profile 8/7 be put on a profile 5 stream? Does it changed based on the color space or something? @yusescope said something about it here but I don't fully understand why - viewtopic.php?style=6&f=12&t=18602&start=2445#p90215
niteflyr
Posts: 35
Joined: Mon Oct 22, 2018 2:30 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by niteflyr »


You're trying to trick Infuse to think the file is profile 5 when it's not.
The Apple TV only supports profile 5 and profile 8.4, which are not HDR10.
Therefore you are saying, that this has somehow tricked Media Info into reporting this as a DV profile 5 video, but not really. Infuse knows better? Is there anyway possible to get an MKV DV rip, to profile 5 to play on ATV4K via Infuse?
quietvoid
Posts: 373
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

ad329 wrote:
Sat Dec 25, 2021 3:45 am
Following up on this, I think this is correct but trying to figure out why this is the case? It's not the color space conversion, but for some reason the RPU can't be created? Why can't the RPU from a profile 8/7 be put on a profile 5 stream? Does it changed based on the color space or something? @yusescope said something about it here but I don't fully understand why - viewtopic.php?style=6&f=12&t=18602&start=2445#p90215
When encoding profile 5, the video is encoded with a different colorspace, and is also reshaped from PQ to another custom transfer function.
This reshaping step generates metadata that is specific to that scene/frame.

Without both the original IPT colorspace video AND proper reshaping metadata, there is no way to have a correct profile 5 file.
If you use a different RPU from the one made specifically for the profile 5 video, it would not look correct.


niteflyr wrote:
Sat Dec 25, 2021 6:42 am
Therefore you are saying, that this has somehow tricked Media Info into reporting this as a DV profile 5 video, but not really. Infuse knows better? Is there anyway possible to get an MKV DV rip, to profile 5 to play on ATV4K via Infuse?
What you did is to remux the video into MP4, and the container tells Infuse "this here file should be profile 5".
However the actual video remains unchanged, and is still HDR10.

I don't know how Infuse sees it, but the actual device is the one ignoring the metadata.
There's no way as of today to convert it to profile 5.

Just play it as HDR10 or use another playback device which supports PQ based Dolby Vision such as profile 7 or 8.1.
Ride_UL
Posts: 10
Joined: Thu Jan 21, 2021 10:19 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Ride_UL »

chros wrote:
Sat Oct 09, 2021 8:44 am
process:

Code: Select all

# run madvr madmeasure on the mkv file
# generate RPU from madmeasure bin file
dovi_tool.exe generate -j generator_madvr.json --madvr-file l_0201.bin -o RPU_from_madVR.bin
# extract hevc video and audio with mkvextract
# inject the generated RPU into stream
dovi_tool.exe inject-rpu -i video.hevc --rpu-in RPU_from_madVR.bin -o injected_output.hevc
# mux together with tsmuxer
I'm was just trying to convert a HDR10 movie to DV P6 but got stuck with Step 2
Downloaded madVR, installed it & LAVfilters, copied madMeasureHDR to the madVR installation folder and got the .measurements file by running the mkv file through madMeasureHDR
Can you help me with the madmeasure bin file, how we can generate it?
Sorry, if i sound too noob
@@quietvoid
chros
Posts: 102
Joined: Sun Sep 20, 2020 8:36 am

Re: Dolby Vision now possible through MP4 Mux.

Post by chros »

Ride_UL wrote:
Sat Dec 25, 2021 3:59 pm
chros wrote:
Sat Oct 09, 2021 8:44 am
process:

Code: Select all

# run madvr madmeasure on the mkv file
# generate RPU from madmeasure bin file
dovi_tool.exe generate -j generator_madvr.json --madvr-file l_0201.bin -o RPU_from_madVR.bin
# extract hevc video and audio with mkvextract
# inject the generated RPU into stream
dovi_tool.exe inject-rpu -i video.hevc --rpu-in RPU_from_madVR.bin -o injected_output.hevc
# mux together with tsmuxer
I'm was just trying to convert a HDR10 movie to DV P6 but got stuck with Step 2
Downloaded madVR, installed it & LAVfilters, copied madMeasureHDR to the madVR installation folder and got the .measurements file by running the mkv file through madMeasureHDR
Can you help me with the madmeasure bin file, how we can generate it?
Sorry, if i sound too noob
@@quietvoid
That *. measure* file is the bin (binary) file, I just renamed it to *. bin
chros
Posts: 102
Joined: Sun Sep 20, 2020 8:36 am

Re: Dolby Vision now possible through MP4 Mux.

Post by chros »

quietvoid wrote:
Sat Dec 25, 2021 2:12 pm
ad329 wrote:
Sat Dec 25, 2021 3:45 am
Following up on this, I think this is correct but trying to figure out why this is the case? It's not the color space conversion, but for some reason the RPU can't be created? Why can't the RPU from a profile 8/7 be put on a profile 5 stream? Does it changed based on the color space or something? @yusescope said something about it here but I don't fully understand why - viewtopic.php?style=6&f=12&t=18602&start=2445#p90215
When encoding profile 5, the video is encoded with a different colorspace, and is also reshaped from PQ to another custom transfer function.
This reshaping step generates metadata that is specific to that scene/frame.

Without both the original IPT colorspace video AND proper reshaping metadata, there is no way to have a correct profile 5 file.
If you use a different RPU from the one made specifically for the profile 5 video, it would not look correct.
That's interesting, I didn't know about reshaping, thanks.
So, does dovi_tool take care of reshaping when a P5 RPU is converted into P8?
quietvoid
Posts: 373
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

chros wrote:
Sat Dec 25, 2021 5:27 pm
That's interesting, I didn't know about reshaping, thanks.
So, does dovi_tool take care of reshaping when a P5 RPU is converted into P8?
It discards the reshaping metadata, so yes.
RonRicoSuave
Posts: 1
Joined: Sat Dec 25, 2021 6:13 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RonRicoSuave »

ArArdin wrote:
Wed Dec 22, 2021 1:34 pm
DolbyVisionFTW wrote:
Wed Dec 22, 2021 10:18 am
Or is the conclusion that Chinoppo is still the only player that properly support FEL playback?
Ugoos AM6+ has a 2nd decoder so is able to playback FEl (from dual track mp4) but it's a very buggy player.

You may want to ask yourself how many tv's support full 12 bit processing. And then yet, those 12bit colors will be downscaled within max luminance capacity of the screen. TBH, I think that nowadays tv's will not hit enough nits to even support 10 bit to its full brightness.
DolbyVision's processing requires an upconversion to at least 14 bits in HDR space which is then mapped down to 12 then finally what the TV can actually manage, so any dv capable set can process it. Profile 8.1? I think it is (SDR BL, never actually seen one) is required to map the Rec. 709 BL up to 17 bits before performing a huge mess of color transformations. Most of the 17 bits is probably to avoid rounding errors propagating through the colorspace transforms, but still... I'd suspect the Rec.709 variant of HLG with profile 8.4 needs to do something similar, but I can't find any solid specs on that and it seems to mostly be a marketing ploy by Apple (editing in any of their software invalidates and removes the RPU), although it was technically allowed by spec for quite a while before they put it out there.

Similarly most current panels can accept 12bpc 4:4:4 or 4:2:2 over HDMI but as of yet there aren't any hardware decoders that can handle any form of HEVC Main12 that I'm aware of so this mainly applies to generated graphics (games, although none I'm aware of yet) and probably some raw formats of video that can decode in software smoothly given fast enough storage (or player-output DV).

I have nothing to test that with so take it with a grain of salt.
Ride_UL
Posts: 10
Joined: Thu Jan 21, 2021 10:19 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Ride_UL »

chros wrote:
Sat Dec 25, 2021 5:22 pm
Ride_UL wrote:
Sat Dec 25, 2021 3:59 pm
chros wrote:
Sat Oct 09, 2021 8:44 am
process:

Code: Select all

# run madvr madmeasure on the mkv file
# generate RPU from madmeasure bin file
dovi_tool.exe generate -j generator_madvr.json --madvr-file l_0201.bin -o RPU_from_madVR.bin
# extract hevc video and audio with mkvextract
# inject the generated RPU into stream
dovi_tool.exe inject-rpu -i video.hevc --rpu-in RPU_from_madVR.bin -o injected_output.hevc
# mux together with tsmuxer
I'm was just trying to convert a HDR10 movie to DV P6 but got stuck with Step 2
Downloaded madVR, installed it & LAVfilters, copied madMeasureHDR to the madVR installation folder and got the .measurements file by running the mkv file through madMeasureHDR
Can you help me with the madmeasure bin file, how we can generate it?
Sorry, if i sound too noob
@@quietvoid
That *. measure* file is the bin (binary) file, I just renamed it to *. bin
Thanks, it worked :)
stevenugent83
Posts: 4
Joined: Sun Dec 26, 2021 9:45 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by stevenugent83 »

I wonder if anyone can help,
I have an LG CX, I have tried following several of the steps on here to get a film with DV to play on my ttv but every single time I just get HDR 10 instead.

Tried (movies were gemini man and 1917)

1) Rip to MKV with MakeMKV
2) eac3to titlename.mkv 2: titlename.thd+ac3
Note: titlename should be replaced with the actual name of the MKV
3) Add the MKV and the thd+ac3 track to TSMuxer
4) Remux to TS

Media info shows dolby vision, only audio is ac3, yet only plays in HDR10.

Tried again using this guide.

"1. Make ISO of movie. I have only tested this with Black Panther since that's the only one I own. I will be buying Gladiator this weekend to test out though.

2. Use TS Muxer to open the ISO. Find the correct M2TS file and demux the following files:
A. HEVC1 in 4K (Base layer)
B. HEVC 2 in 1080p (this is the dolby vision enhancement layer)
C. Audio track which you will have to convert to AC3. This is a hard line limitation- you need to use AC3!!!"

Exactly the same, media info shows dolby vision is present in the file, but I only get HDR10 playing.

I have other movie files I downloaded that play dolby vision just fine in mp4, so it's obviously something i'm doing wrong.
ArArdin
Posts: 194
Joined: Fri Nov 20, 2020 1:40 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by ArArdin »

RonRicoSuave wrote:
Sat Dec 25, 2021 8:24 pm
Similarly most current panels can accept 12bpc 4:4:4 or 4:2:2 over HDMI but as of yet there aren't any hardware decoders that can handle any form of HEVC Main12 that I'm aware of...
Where does decoding HEVC Main12 take place with Dolby Vision? I had the impression that the player decodes two 10 bit HEVC streams and its compiler would create 12 bit YCbCr from the results. Please correct me if I'm wrong.
Or I must be unaware of a DV format with a HEVC 12 bit baselayer.
Buzzie
Posts: 18
Joined: Tue Oct 20, 2020 8:01 am

Re: Dolby Vision now possible through MP4 Mux.

Post by Buzzie »

Ok Guys,
Please help me out here coz this is driving me nuts.

I am trying to add DV metadata from WEB-DL sources to UHD sources.
I keep getting warning about mismatch lengths.

I have a WEB-DL DV source and a UHD HDR source

What i did are the following steps:

For the WEB-DL file :
c:\Dolby-Vision-Tools\ffmpeg\bin\ffmpeg -y -i z:\temp\DV_WEB-DL.mp4 -an -c:v copy -vbsf hevc_mp4toannexb -f hevc c:\temp\DV_MP4.hevc

For the UHD file :

c:\Dolby-Vision-Tools\ffmpeg\bin\ffmpeg -i "path_to_UHD.mkv" -c:v copy c:\temp\hdr10.hevc

Next Step :

c:\Dolby-Vision-Tools\dovi_tool.exe -m 3 extract-rpu c:\temp\DV_MP4.hevc

After that command i opened up both HEVC files in StaXrip and found in the video comparison an identical frame.
The DV had the particular frame at 3865 and the UHD at 3889

Meaning the UHD frame is higher then the DV so i have to duplicate the frames

This is my json:

{
"duplicate": [
{
"source": 0,
"offset": 0,
"length": 23
}
]
}

After that i did the following command :

c:\Dolby-Vision-Tools\dovi_tool.exe editor -i c:\temp\RPU.bin -j c:\temp\edited.json --rpu-out c:\temp\RPU-edited.bin

Followed by :

c:\Dolby-Vision-Tools\dovi_tool.exe inject-rpu -i c:\temp\HDR10.hevc --rpu-in c:\temp\RPU-edited.bin

I keep getting the following :

Parsing RPU file...
Processing input video for frame order info...

Warning: mismatched lengths. video 201492, RPU 201451
Metadata will be duplicated at the end to match video length

Any ideas what i am doing wrong ?

Thanks in advance
RESET_9999
Posts: 2082
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

stevenugent83 wrote:
Sun Dec 26, 2021 10:15 pm
I wonder if anyone can help,
I have an LG CX,
Convert to profile 8 for playback on LG (CX +) oled TVs and then use TSmuxer or the MP4muxer. And If the first audio is TrueHD or DTSHD or DTS, DV won't work, so keep the first audio in AC3 or EC3 (or select it in plex before playback). PGS subtitles will fail to play DV TS as well but external SRT works (internal srt in mp4 works too).
viewtopic.php?f=12&t=18602&start=2970#p96282
Buzzie wrote:
Wed Dec 29, 2021 3:12 pm
Ok Guys,
Please help me out here coz this is driving me nuts.
As long as the video and the rpu start at the same frame, you can ignore the mismatch at the end(will be the case for almost all the movies).
Buzzie
Posts: 18
Joined: Tue Oct 20, 2020 8:01 am

Re: Dolby Vision now possible through MP4 Mux.

Post by Buzzie »

RESET_9999 wrote:
Wed Dec 29, 2021 3:22 pm
Buzzie wrote:
Wed Dec 29, 2021 3:12 pm
Ok Guys,
Please help me out here coz this is driving me nuts.
As long as the video and the rpu start at the same frame, you can ignore the mismatch at the end(will be the case for almost all the movies).
Thanks....but the particular scene is not at the same frame:
The DV had the particular frame at 3865 and the UHD at 3889
RESET_9999
Posts: 2082
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

Buzzie wrote:
Wed Dec 29, 2021 3:31 pm
Thanks....but the particular scene is not at the same frame:
The DV had the particular frame at 3865 and the UHD at 3889
yea, that's what your json fixed, so what remains is a mismatch at the end which you can ignore

Code: Select all

{
	"duplicate": [
		{
			"source": 0,
			"offset": 0,
			"length": 24
		}
	]
}
Last edited by RESET_9999 on Wed Dec 29, 2021 10:20 pm, edited 1 time in total.
Post Reply