Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
RESET_9999
Posts: 2094
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

Iam2smart wrote:
Wed Sep 20, 2023 5:07 am
What’s the best way to convert BL + FEL expanded movies now. Is it using Resolve/CM Analyze or Baking FEL into the base layer. What I used to do was Bake FEL into base layer is that wrong now? Or is it better to just use the script and use CM Analyze to generate whole new DV
If you have a decent CPU and know your way around x265.exe, baking FEL into BL is probably better.
Iam2smart
Posts: 20
Joined: Sun Feb 13, 2022 6:56 am

Re: Dolby Vision now possible through MP4 Mux.

Post by Iam2smart »

RESET_9999 wrote:
Wed Sep 20, 2023 2:12 pm
Iam2smart wrote:
Wed Sep 20, 2023 5:07 am
What’s the best way to convert BL + FEL expanded movies now. Is it using Resolve/CM Analyze or Baking FEL into the base layer. What I used to do was Bake FEL into base layer is that wrong now? Or is it better to just use the script and use CM Analyze to generate whole new DV
If you have a decent CPU and know your way around x265.exe, baking FEL into BL is probably better.
Ok thanks I’ll do that I have a i7-13700k so it takes about a day but it works.
Iam2smart
Posts: 20
Joined: Sun Feb 13, 2022 6:56 am

Re: Dolby Vision now possible through MP4 Mux.

Post by Iam2smart »

RESET_9999 wrote:
Wed Sep 20, 2023 2:12 pm
Iam2smart wrote:
Wed Sep 20, 2023 5:07 am
What’s the best way to convert BL + FEL expanded movies now. Is it using Resolve/CM Analyze or Baking FEL into the base layer. What I used to do was Bake FEL into base layer is that wrong now? Or is it better to just use the script and use CM Analyze to generate whole new DV
If you have a decent CPU and know your way around x265.exe, baking FEL into BL is probably better.
I forgot to ask does the DV script work best for baking FEL in BL
Trees
Posts: 41
Joined: Sat Sep 03, 2022 8:04 am

Re: Dolby Vision now possible through MP4 Mux.

Post by Trees »

I'm trying to inject HDR10+ metadata into an HR10 remux. However, the HDR10+ metadata is delayed by 24 frames.

How do I sync them? I'm familiar with syncing with dovi_tool, but I'm afraid it won't work with HDR10+.
speeddemon
Posts: 77
Joined: Wed Oct 16, 2019 3:44 am

Re: Dolby Vision now possible through MP4 Mux.

Post by speeddemon »

Iam2smart wrote:
Wed Sep 20, 2023 5:21 pm
RESET_9999 wrote:
Wed Sep 20, 2023 2:12 pm
Iam2smart wrote:
Wed Sep 20, 2023 5:07 am
What’s the best way to convert BL + FEL expanded movies now. Is it using Resolve/CM Analyze or Baking FEL into the base layer. What I used to do was Bake FEL into base layer is that wrong now? Or is it better to just use the script and use CM Analyze to generate whole new DV
If you have a decent CPU and know your way around x265.exe, baking FEL into BL is probably better.
Ok thanks I’ll do that I have a i7-13700k so it takes about a day but it works.
The part RESET mentioned about knowing your way around x265.exe is critical. I've found the following would be a good starting place:

Non-grainy live action sources:

Code: Select all

--crf 12 --preset slower --output-depth 10 --rskip 2 --rskip-edge-threshold 3 --ctu 32 --aq-mode 2 --hdr10-opt --repeat-headers --deblock -1:-1 --selective-sao 2
Grainy live action sources:

Code: Select all

--crf 12 --preset slower --output-depth 10 --rd 4 --psy-rd 4 --psy-rdoq 8 --rskip 2 --rskip-edge-threshold 2 --ctu 32 --aq-mode 4 --aq-strength 0.8 --ipratio 1.1 --pbratio 1 --hdr10-opt --repeat-headers --deblock -1:-1 --selective-sao 2
Don't forget to add-in/tweak the following for Anime:

Code: Select all

--bframes 16 --tskip --tskip-fast
Iam2smart
Posts: 20
Joined: Sun Feb 13, 2022 6:56 am

Re: Dolby Vision now possible through MP4 Mux.

Post by Iam2smart »

speeddemon wrote:
Wed Sep 20, 2023 11:09 pm
Iam2smart wrote:
Wed Sep 20, 2023 5:21 pm
RESET_9999 wrote:
Wed Sep 20, 2023 2:12 pm


If you have a decent CPU and know your way around x265.exe, baking FEL into BL is probably better.
Ok thanks I’ll do that I have a i7-13700k so it takes about a day but it works.
The part RESET mentioned about knowing your way around x265.exe is critical. I've found the following would be a good starting place:

Non-grainy live action sources:

Code: Select all

--crf 12 --preset slower --output-depth 10 --rskip 2 --rskip-edge-threshold 3 --ctu 32 --aq-mode 2 --hdr10-opt --repeat-headers --deblock -1:-1 --selective-sao 2
Grainy live action sources:

Code: Select all

--crf 12 --preset slower --output-depth 10 --rd 4 --psy-rd 4 --psy-rdoq 8 --rskip 2 --rskip-edge-threshold 2 --ctu 32 --aq-mode 4 --aq-strength 0.8 --ipratio 1.1 --pbratio 1 --hdr10-opt --repeat-headers --deblock -1:-1 --selective-sao 2
Don't forget to add-in/tweak the following for Anime:

Code: Select all

--bframes 16 --tskip --tskip-fast
I’ve just used the script before can I still use the DV Script or is it better now to use h265.exe
speeddemon
Posts: 77
Joined: Wed Oct 16, 2019 3:44 am

Re: Dolby Vision now possible through MP4 Mux.

Post by speeddemon »

Iam2smart wrote:
Wed Sep 20, 2023 11:53 pm
speeddemon wrote:
Wed Sep 20, 2023 11:09 pm
Iam2smart wrote:
Wed Sep 20, 2023 5:21 pm


Ok thanks I’ll do that I have a i7-13700k so it takes about a day but it works.
The part RESET mentioned about knowing your way around x265.exe is critical. I've found the following would be a good starting place:

Non-grainy live action sources:

Code: Select all

--crf 12 --preset slower --output-depth 10 --rskip 2 --rskip-edge-threshold 3 --ctu 32 --aq-mode 2 --hdr10-opt --repeat-headers --deblock -1:-1 --selective-sao 2
Grainy live action sources:

Code: Select all

--crf 12 --preset slower --output-depth 10 --rd 4 --psy-rd 4 --psy-rdoq 8 --rskip 2 --rskip-edge-threshold 2 --ctu 32 --aq-mode 4 --aq-strength 0.8 --ipratio 1.1 --pbratio 1 --hdr10-opt --repeat-headers --deblock -1:-1 --selective-sao 2
Don't forget to add-in/tweak the following for Anime:

Code: Select all

--bframes 16 --tskip --tskip-fast
I’ve just used the script before can I still use the DV Script or is it better now to use h265.exe
It's best to use 7-1 worflow, edit the AVS FEL file to remove the text overlay so it looks something like this once edited:

Code: Select all

LoadPlugin("C:\DoVi_Scripts\tools\DoViBaker_x64.dll") 
LoadPlugin("C:\DoVi_Scripts\tools\dgdecnv_242\DGDecodeNV.dll") 
bl = DGSource("D:\DoVi_Scripts\Movie\Movie_BL.dgi") 
el = DGSource("D:\DoVi_Scripts\Movie\Movie_EL.dgi") 
DoViBaker(bl, el, rpu= "D:\DoVi_Scripts\Movie\Movie_RPU_FEL.bin") 
ConvertToYUV420(matrix="2020")
Then import the AVS file into Staxrip and use the settings I shared above (tweaking as you see fit based on your level of expertise). I'd always recommend checking VUI details and its critical to set the MaxCLL, MaxFALL, and Mastering Display values in Staxrip to match the FEL's RPU's values. Then don't forget to inject the original FEL RPU (coverted to Profile 8.1) back into the HEVC file output from Staxrip/x265.exe after that compression process is complete.
Last edited by speeddemon on Thu Sep 21, 2023 2:44 am, edited 2 times in total.
RESET_9999
Posts: 2094
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

Iam2smart wrote:
Wed Sep 20, 2023 11:53 pm
I’ve just used the script before can I still use the DV Script or is it better now to use h265.exe
The script uses ffmpeg/x265 but the parameters are hardcoded. If you use at least the slow preset + CRF17 or lower, it should give decent quality but you should do as @speeddemon said.
quietvoid
Posts: 373
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

speeddemon wrote:
Thu Sep 21, 2023 12:05 am
Then don't forget to inject the original FEL RPU back into the HEVC file output from Staxrip/x265.exe after that compression process is complete.
Huh? No, you're supposed to be using a profile 8.1 RPU in the final video.
RESET_9999
Posts: 2094
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

right and no need to inject it after the encoding. Just import the P8 rpu in the cmd.

--dolby-vision-profile 8.1 --dolby-vision-rpu "E:\RPU backup\dovi.bin"
widezu69
Posts: 1
Joined: Thu Sep 21, 2023 12:03 am

Re: Dolby Vision now possible through MP4 Mux.

Post by widezu69 »

Hi all,

Apologies if I'm posting in the wrong place.

I've been having some trouble with converting all my MKV remuxes to DV MP4s playable via the internal player on my LG GX TV.

My process is as follows:
- Extract RPU from MKV and converting to profile 8.1 discarding the EL using HDR Multi Tool.
- Extract the HEVC from MKV using mkvextract.
- Inject new 8.1 RPU.bin into HEVC using dovi_tool.
- Remux into new MKV using mkvtoolnix and verify audio sync chapters & subs.
- Convert new MKV to MP4 using ffmpeg with -strict unofficial.

Every file I've created in this way has been verified to contain only BL+RPU and all play fine on my PC triggering HDR10 fallback.

However, when played on my TV shared via DNLA using LG SmartShare, a handful of files won't play at all giving the error "This file cannot be recognised."

All other behaviour is normal including:
- Any DV in MKV only triggers HDR10
- DV BL+RPU+EL in MP4 only triggers HDR10
- DV BL+RPU in MP4 triggers Dolby Vision (but only in some files)

When the EL is stripped out, the TV will play some files triggering Dolby Vision mode while refusing to even open others, even in HDR mode. However the files that don't play, will play if the video stream has the EL but it will only trigger HDR10.

I'm genuinely at a loss here.

I'm going to try loading the file on a USB stick and to see if it's a Smart Share issue.

Anyone have any thoughts?
speeddemon
Posts: 77
Joined: Wed Oct 16, 2019 3:44 am

Re: Dolby Vision now possible through MP4 Mux.

Post by speeddemon »

quietvoid wrote:
Thu Sep 21, 2023 12:21 am
speeddemon wrote:
Thu Sep 21, 2023 12:05 am
Then don't forget to inject the original FEL RPU back into the HEVC file output from Staxrip/x265.exe after that compression process is complete.
Huh? No, you're supposed to be using a profile 8.1 RPU in the final video.
Correct, small mistake in my instructions above. I've edited. I meant to say inject the original Profile 7 FEL's RPU converted Profile 8.1...
RESET_9999 wrote:
Thu Sep 21, 2023 12:23 am
right and no need to inject it after the encoding. Just import the P8 rpu in the cmd.

--dolby-vision-profile 8.1 --dolby-vision-rpu "E:\RPU backup\dovi.bin"
The only reason I typically don't do it like this is because I often want to manually edit the L5 to 0 since I'll typically also crop with Staxrip (I'm not encoding for Blu-ray so why not) and I find it just easier to let DoVi_Scripts handle the L5 cropping & P8 conversion while injecting.
Iam2smart
Posts: 20
Joined: Sun Feb 13, 2022 6:56 am

Re: Dolby Vision now possible through MP4 Mux.

Post by Iam2smart »

speeddemon wrote:
Thu Sep 21, 2023 12:05 am
Iam2smart wrote:
Wed Sep 20, 2023 11:53 pm
speeddemon wrote:
Wed Sep 20, 2023 11:09 pm

The part RESET mentioned about knowing your way around x265.exe is critical. I've found the following would be a good starting place:

Non-grainy live action sources:

Code: Select all

--crf 12 --preset slower --output-depth 10 --rskip 2 --rskip-edge-threshold 3 --ctu 32 --aq-mode 2 --hdr10-opt --repeat-headers --deblock -1:-1 --selective-sao 2
Grainy live action sources:

Code: Select all

--crf 12 --preset slower --output-depth 10 --rd 4 --psy-rd 4 --psy-rdoq 8 --rskip 2 --rskip-edge-threshold 2 --ctu 32 --aq-mode 4 --aq-strength 0.8 --ipratio 1.1 --pbratio 1 --hdr10-opt --repeat-headers --deblock -1:-1 --selective-sao 2
Don't forget to add-in/tweak the following for Anime:

Code: Select all

--bframes 16 --tskip --tskip-fast
I’ve just used the script before can I still use the DV Script or is it better now to use h265.exe
It's best to use 7-1 worflow, edit the AVS FEL file to remove the text overlay so it looks something like this once edited:

Code: Select all

LoadPlugin("C:\DoVi_Scripts\tools\DoViBaker_x64.dll") 
LoadPlugin("C:\DoVi_Scripts\tools\dgdecnv_242\DGDecodeNV.dll") 
bl = DGSource("D:\DoVi_Scripts\Movie\Movie_BL.dgi") 
el = DGSource("D:\DoVi_Scripts\Movie\Movie_EL.dgi") 
DoViBaker(bl, el, rpu= "D:\DoVi_Scripts\Movie\Movie_RPU_FEL.bin") 
ConvertToYUV420(matrix="2020")
Then import the AVS file into Staxrip and use the settings I shared above (tweaking as you see fit based on your level of expertise). I'd always recommend checking VUI details and its critical to set the MaxCLL, MaxFALL, and Mastering Display values in Staxrip to match the FEL's RPU's values. Then don't forget to inject the original FEL RPU (coverted to Profile 8.1) back into the HEVC file output from Staxrip/x265.exe after that compression process is complete.
Thanks I’ll try what you said
Gatorman
Posts: 79
Joined: Thu Feb 10, 2022 3:47 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Gatorman »

speeddemon wrote:
Thu Sep 21, 2023 12:05 am

It's best to use 7-1 worflow, edit the AVS FEL file to remove the text overlay so it looks something like this once edited:

Code: Select all

LoadPlugin("C:\DoVi_Scripts\tools\DoViBaker_x64.dll") 
LoadPlugin("C:\DoVi_Scripts\tools\dgdecnv_242\DGDecodeNV.dll") 
bl = DGSource("D:\DoVi_Scripts\Movie\Movie_BL.dgi") 
el = DGSource("D:\DoVi_Scripts\Movie\Movie_EL.dgi") 
DoViBaker(bl, el, rpu= "D:\DoVi_Scripts\Movie\Movie_RPU_FEL.bin") 
ConvertToYUV420(matrix="2020")
Then import the AVS file into Staxrip and use the settings I shared above (tweaking as you see fit based on your level of expertise). I'd always recommend checking VUI details and its critical to set the MaxCLL, MaxFALL, and Mastering Display values in Staxrip to match the FEL's RPU's values. Then don't forget to inject the original FEL RPU (coverted to Profile 8.1) back into the HEVC file output from Staxrip/x265.exe after that compression process is complete.
How would I import the AVS file into StaxRip? Can I add it to an existing preset?
More reasons to collect physical media. 2019 Shield TV Pro.
Iam2smart
Posts: 20
Joined: Sun Feb 13, 2022 6:56 am

Re: Dolby Vision now possible through MP4 Mux.

Post by Iam2smart »

speeddemon wrote:
Thu Sep 21, 2023 12:05 am
Iam2smart wrote:
Wed Sep 20, 2023 11:53 pm
speeddemon wrote:
Wed Sep 20, 2023 11:09 pm

The part RESET mentioned about knowing your way around x265.exe is critical. I've found the following would be a good starting place:

Non-grainy live action sources:

Code: Select all

--crf 12 --preset slower --output-depth 10 --rskip 2 --rskip-edge-threshold 3 --ctu 32 --aq-mode 2 --hdr10-opt --repeat-headers --deblock -1:-1 --selective-sao 2
Grainy live action sources:

Code: Select all

--crf 12 --preset slower --output-depth 10 --rd 4 --psy-rd 4 --psy-rdoq 8 --rskip 2 --rskip-edge-threshold 2 --ctu 32 --aq-mode 4 --aq-strength 0.8 --ipratio 1.1 --pbratio 1 --hdr10-opt --repeat-headers --deblock -1:-1 --selective-sao 2
Don't forget to add-in/tweak the following for Anime:

Code: Select all

--bframes 16 --tskip --tskip-fast
I’ve just used the script before can I still use the DV Script or is it better now to use h265.exe
It's best to use 7-1 worflow, edit the AVS FEL file to remove the text overlay so it looks something like this once edited:

Code: Select all

LoadPlugin("C:\DoVi_Scripts\tools\DoViBaker_x64.dll") 
LoadPlugin("C:\DoVi_Scripts\tools\dgdecnv_242\DGDecodeNV.dll") 
bl = DGSource("D:\DoVi_Scripts\Movie\Movie_BL.dgi") 
el = DGSource("D:\DoVi_Scripts\Movie\Movie_EL.dgi") 
DoViBaker(bl, el, rpu= "D:\DoVi_Scripts\Movie\Movie_RPU_FEL.bin") 
ConvertToYUV420(matrix="2020")
Then import the AVS file into Staxrip and use the settings I shared above (tweaking as you see fit based on your level of expertise). I'd always recommend checking VUI details and its critical to set the MaxCLL, MaxFALL, and Mastering Display values in Staxrip to match the FEL's RPU's values. Then don't forget to inject the original FEL RPU (coverted to Profile 8.1) back into the HEVC file output from Staxrip/x265.exe after that compression process is complete.
I was able to get everything setup I just have one question its about the MaxCLL, MaxFall & Mastering Display Values I didn’t know where to get the stats from so I just used the rpu info file generated from the script, for example the movie I’m tinkering with is Mission Impossible Rogue Nation and it lists the L1 MaxCLL as 10000.00 nits and the MaxFALL as 205.90 would those be the correct values I’m looking for because I know I need the FEL Values and the info file lists it’s for the Profile 7 FEL so I’m assuming that’s correct. Then the mastering display kind of has me stumped the info file lists 0.0050/4000 but that didn’t work in staxrip so I used this I found on the internet

G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,1)

But I Have no idea if that’s correct, so if I could learn how to obtain that info that would be helpful everything else was pretty cut & dry Thanks
Post Reply