Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > High Efficiency Video Coding (HEVC)

Reply
 
Thread Tools Search this Thread Display Modes
Old 15th October 2021, 00:35   #61  |  Link
Nico8583
Registered User
 
Join Date: Jan 2010
Location: France
Posts: 851
Thanks ! I did some tests, for someone who is searching to try it :
With an UHD BD (replace playlist number and paths, video track index if needed) :
Quote:
ffmpeg.exe -playlist 123 -i bluray:"D:\PathToTheUHDBDFolder" -map 0:v:1 -c:v copy -vbsf hevc_mp4toannexb -f hevc - | dovi_tool -m 2 extract-rpu - -o RPU.bin
With a MKV from MakeMKV (single track dual layer) :
Quote:
ffmpeg.exe -i "D:\Movie.mkv" -c:v copy -vbsf hevc_mp4toannexb -f hevc - | dovi_tool -m 2 extract-rpu - -o RPU.bin
With a MKV from mkvtoolnix (double track) (replace video track index if needed) :
Quote:
ffmpeg.exe -i "D:\Movie.mkv" -map 0:v:1 -c:v copy -vbsf hevc_mp4toannexb -f hevc - | dovi_tool -m 2 extract-rpu - -o RPU.bin
RPU is bit to bit identical for all outputs
Nico8583 is offline   Reply With Quote
Old 16th October 2021, 23:26   #62  |  Link
Nico8583
Registered User
 
Join Date: Jan 2010
Location: France
Posts: 851
Another question : is it possible to convert profile 7 dual track (BL + EL) to profile 8.1 with one command ? Or I need to extract BL track + extract RPU from EL track then inject to BL track and remux BL track to MKV ?
And if I do that, does the BL track will keep HDR10+ metadata if include ? Thanks.
Nico8583 is offline   Reply With Quote
Old 16th October 2021, 23:43   #63  |  Link
quietvoid
Registered User
 
Join Date: Jan 2019
Location: Canada
Posts: 574
Quote:
Originally Posted by Nico8583 View Post
Another question : is it possible to convert profile 7 dual track (BL + EL) to profile 8.1 with one command ?
Use the convert command: https://github.com/quietvoid/dovi_tool#convert
The examples do exactly what you're looking for.
You need a single video file first, though.

Otherwise, just extract the RPU and inject it back in the BL, yes.

Quote:
Originally Posted by Nico8583 View Post
And if I do that, does the BL track will keep HDR10+ metadata if include ? Thanks.
Yes.
__________________
LG C2 OLED | GitHub Projects
quietvoid is offline   Reply With Quote
Old 16th October 2021, 23:55   #64  |  Link
Nico8583
Registered User
 
Join Date: Jan 2010
Location: France
Posts: 851
Ok so the convert command can do that from a MakeMKV file. Or do you know another software than MakeMKV or yusesope just to combine BL+EL+RPU into a single track ? Thanks.
Nico8583 is offline   Reply With Quote
Old 17th October 2021, 00:14   #65  |  Link
quietvoid
Registered User
 
Join Date: Jan 2019
Location: Canada
Posts: 574
Quote:
Originally Posted by Nico8583 View Post
Or do you know another software than MakeMKV or yusesope just to combine BL+EL+RPU into a single track ? Thanks.
Not that I'm aware of.
__________________
LG C2 OLED | GitHub Projects
quietvoid is offline   Reply With Quote
Old 17th October 2021, 02:43   #66  |  Link
Yomiko
Registered User
 
Join Date: Aug 2021
Posts: 73
I can think of two approaches but I don't know which one should be preferred.

1) Encode as HDR10, then inject-rpu with dovi_tool
2) Encode with x265 Dolby Vision options
Yomiko is offline   Reply With Quote
Old 19th October 2021, 09:54   #67  |  Link
Nico8583
Registered User
 
Join Date: Jan 2010
Location: France
Posts: 851
Thanks quietvoid and inject RPU can work only with raw stream ? Is it possible to inject RPU to a stream inside a MKV ? Thanks
Nico8583 is offline   Reply With Quote
Old 19th October 2021, 13:29   #68  |  Link
quietvoid
Registered User
 
Join Date: Jan 2019
Location: Canada
Posts: 574
Quote:
Originally Posted by Nico8583 View Post
Thanks quietvoid and inject RPU can work only with raw stream ? Is it possible to inject RPU to a stream inside a MKV ? Thanks
Only raw stream currently.
In the future I hope it might be possible to make it possible to pipe from any container.

The output is always going to be the raw HEVC, though.
__________________
LG C2 OLED | GitHub Projects
quietvoid is offline   Reply With Quote
Old 28th October 2021, 03:44   #69  |  Link
mattl0
Registered User
 
Join Date: Dec 2020
Posts: 8
Quote:
Originally Posted by quietvoid View Post
Only raw stream currently.
In the future I hope it might be possible to make it possible to pipe from any container.

The output is always going to be the raw HEVC, though.
That is enough That would save a lot of time .

Question 1 with profile 8.1 example : Since injecting rpu into a BL HEVC is longer than simply use the convert command , are they both the same? I did some test and the rpu after each case have the same weight. But are they Injected the same way in the final hevc output?

Question 2 for profile 7 (can be applied to mel too): i saw that it is possible to have a BL and an EL file without rpu. Just need to mux both BL and EL.

With this approch, do you think it would be beneficial to mux the BL with the el, and then inject rpu generated from a json.

So we would have a p7 fel with an new rpu rpu.

A command to completly extract the rpu (so remove rpu to get one hevc file BL+el without rpu /. or two hevc BL + ( El minus the rpu)), would be noce if you ever feel like it, have the time and find it useful. The idea can be wrong too.
mattl0 is offline   Reply With Quote
Old 28th October 2021, 03:54   #70  |  Link
mattl0
Registered User
 
Join Date: Dec 2020
Posts: 8
Last one sorry,

I have a lg c1. It can read profile 8.1 Dolby vision for int player or plex. But how can I know that the rpu is really processed by the tv? Maybe you have a hint for this . Thank you @quietvoid .

A little of topic …maybe someone have an answer here…
I also have an android ugoos am6b+. But I have not convinced that it is decoding dolby p7 fel ok for the rgb tunneling. Resolution is always set to 1080p like if there are a certification limit or wtv else. Not sure if forcing it back to 2160p is ok. I have the feeling that the it is rendered in 1080p and then converted to 2160p for some reason . The process seems shady; from command line, I also can force the box to swtich to 10 bit when in tunneling mode , and the tv accept it…i do not know if this is normal, and what it does mean
mattl0 is offline   Reply With Quote
Old 28th October 2021, 12:40   #71  |  Link
quietvoid
Registered User
 
Join Date: Jan 2019
Location: Canada
Posts: 574
Quote:
Originally Posted by mattl0 View Post
Question 1 with profile 8.1 example : Since injecting rpu into a BL HEVC is longer than simply use the convert command , are they both the same? I did some test and the rpu after each case have the same weight. But are they Injected the same way in the final hevc output?
If you only have a video that is already Dolby Vision, then just use convert.
Injecting is only useful for videos that were already encoded in HDR10, but don't contain Dolby Vision metadata.


Quote:
Originally Posted by mattl0 View Post
Question 2 for profile 7 (can be applied to mel too): i saw that it is possible to have a BL and an EL file without rpu. Just need to mux both BL and EL.
That makes no sense, the EL always contains the RPUs.

There isn't really a use case where editing an existing profile 7 is any useful.


Quote:
Originally Posted by mattl0 View Post
Last one sorry,

I have a lg c1. It can read profile 8.1 Dolby vision for int player or plex. But how can I know that the rpu is really processed by the tv? Maybe you have a hint for this . Thank you @quietvoid .
You can try this file: https://forum.makemkv.com/forum/view...113537#p113537
You might have to convert it to mp4 for the TV player.
__________________
LG C2 OLED | GitHub Projects
quietvoid is offline   Reply With Quote
Old 29th October 2021, 18:24   #72  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
Quote:
Originally Posted by mattl0 View Post
Last one sorry,

I have a lg c1. It can read profile 8.1 Dolby vision for int player or plex. But how can I know that the rpu is really processed by the tv? Maybe you have a hint for this . Thank you @quietvoid .
The LG will go into a "Dolby Vision" picture mode playing DoVi content. So just hit your settings button and see what picture mode it is in.

Quote:
A little of topic …maybe someone have an answer here…
I also have an android ugoos am6b+. But I have not convinced that it is decoding dolby p7 fel ok for the rgb tunneling. Resolution is always set to 1080p like if there are a certification limit or wtv else. Not sure if forcing it back to 2160p is ok. I have the feeling that the it is rendered in 1080p and then converted to 2160p for some reason . The process seems shady; from command line, I also can force the box to swtich to 10 bit when in tunneling mode , and the tv accept it…i do not know if this is normal, and what it does mean
RGB 444 takes 1.5x the bandwidth of YUV 422. Depending on HDMI ports and cable, it's not uncommon for there to be enough bandwidth for YUV 422 but not RGB 444, so switching to RGB forces down resolution or frame rate.

You'll want both output and input to be HDMI 2.0, with at least an 18 Gbps rated HDMI cable.

You can make it work with older HDMI versions, but not at RGB 444 4Kp60.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 30th October 2021, 04:35   #73  |  Link
PoeBear
Registered User
 
Join Date: Jan 2017
Posts: 48
Does the VUI base layer stuff on our custom MEL Profile 8.1 hatchetjobs matter? Per the specs (Dolby Vision Profiles and Levels, V1.3.3), Dolby requires a center-left chromaloc on the video track. But with a UHD Blu-ray/Profile 7 video track, Dolby requires top left chromaloc

Does that mean when playing the DV layer, it's gonna shift all my reds? Or is that something that would only affect if it were an FEL profile 8.1, as it would be expecting a different chroma layout to apply its 12-bit coloring?
PoeBear is offline   Reply With Quote
Old 30th October 2021, 05:11   #74  |  Link
mattl0
Registered User
 
Join Date: Dec 2020
Posts: 8
Quote:
Originally Posted by quietvoid View Post
If you only have a video that is already Dolby Vision, then just use convert.
Injecting is only useful for videos that were already encoded in HDR10, but don't contain Dolby Vision metadata.


That makes no sense, the EL always contains the RPUs.

There isn't really a use case where editing an existing profile 7 is any useful.


You can try this file: https://forum.makemkv.com/forum/view...113537#p113537
You might have to convert it to mp4 for the TV player.
Thanks ! This works perfectly i can see all the changes on the video playback on my c1 with internal app.

Last edited by mattl0; 30th October 2021 at 05:22.
mattl0 is offline   Reply With Quote
Old 30th October 2021, 05:13   #75  |  Link
mattl0
Registered User
 
Join Date: Dec 2020
Posts: 8
Quote:
Originally Posted by benwaggoner View Post
The LG will go into a "Dolby Vision" picture mode playing DoVi content. So just hit your settings button and see what picture mode it is in.


RGB 444 takes 1.5x the bandwidth of YUV 422. Depending on HDMI ports and cable, it's not uncommon for there to be enough bandwidth for YUV 422 but not RGB 444, so switching to RGB forces down resolution or frame rate.

You'll want both output and input to be HDMI 2.0, with at least an 18 Gbps rated HDMI cable.

You can make it work with older HDMI versions, but not at RGB 444 4Kp60.
mattl0 is offline   Reply With Quote
Old 30th October 2021, 06:21   #76  |  Link
quietvoid
Registered User
 
Join Date: Jan 2019
Location: Canada
Posts: 574
Quote:
Originally Posted by PoeBear View Post
Does the VUI base layer stuff on our custom MEL Profile 8.1 hatchetjobs matter? Per the specs (Dolby Vision Profiles and Levels, V1.3.3), Dolby requires a center-left chromaloc on the video track. But with a UHD Blu-ray/Profile 7 video track, Dolby requires top left chromaloc

Does that mean when playing the DV layer, it's gonna shift all my reds? Or is that something that would only affect if it were an FEL profile 8.1, as it would be expecting a different chroma layout to apply its 12-bit coloring?
The specification only mentions that VUI parameters are required for profile 8.1
Quote:
Dolby Vision bitstreams for all profiles other than profile 7 may use center-left or top-left luma-chroma siting.
A chroma sample location type VUI is mandatory unless center-left siting is used.
If a chroma sample location type VUI is present, it must be accurate
To me this means that if the base layer was not processed further, and uses top-left, then it is fine.
Usually people reencode profile 7 as profile 8.1 with top-left, and it seems to be OK.

For profile 7 with an EL, it is probably to make sure both video streams are aligned, yes.

Supposedly the new default is top-left for anything HDR10.
__________________
LG C2 OLED | GitHub Projects

Last edited by quietvoid; 30th October 2021 at 06:24.
quietvoid is offline   Reply With Quote
Old 30th October 2021, 19:17   #77  |  Link
PoeBear
Registered User
 
Join Date: Jan 2017
Posts: 48
Quote:
Originally Posted by quietvoid View Post
The specification only mentions that VUI parameters are required for profile 8.1
Yes, this is why I'm asking. The current trick to getting MEL playback in a container is to repackage it as Profile 8.1, but the HDR10 base layer will be out of spec (unless you change it at encoding)

I'm asking will there be playback issues due to the out-of-spec file? If so, will they be with MEL/FEL playback, or just FEL?

FEL testing really seems impossible for that anyway anyway, with nothing being able to play FEL back in container format, so it was more of a technical question to those that know the DV specs

Quote:
Originally Posted by quietvoid View Post
Usually people reencode profile 7 as profile 8.1 with top-left, and it seems to be OK.
"Seems to be" is what I want to avoid. One can easily miss a small chroma shift and think everything is fine, especially if there's not a known correct image to compare against. If there's a spec, I'd like to adhere to it to avoid future problems. Especially since the Profile 8.1 thing is already a workaround due to a lot of TVs/devices not able to playback DV Profile 7.1

Quote:
Originally Posted by quietvoid View Post
Supposedly the new default is top-left for anything HDR10
Yes when encoding for HDR10 you would set chromaloc to 2 (top-left), but that would go against Dolby's specs for Profile 8.1, which require for center-left (chromaloc 0), hence my inquiry

Last edited by PoeBear; 30th October 2021 at 19:23.
PoeBear is offline   Reply With Quote
Old 30th October 2021, 19:46   #78  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,227
Quote:
Originally Posted by quietvoid View Post
That's a most impressive sample quietvoid
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 30th October 2021, 20:14   #79  |  Link
quietvoid
Registered User
 
Join Date: Jan 2019
Location: Canada
Posts: 574
Quote:
Originally Posted by PoeBear View Post
Yes when encoding for HDR10 you would set chromaloc to 2 (top-left), but that would go against Dolby's specs for Profile 8.1, which require for center-left (chromaloc 0), hence my inquiry
I'm confused, my quote says that profile 8.1 can use top-left, and is not required to be center-left.

The conflicting information seems to be coming from the table, where it says that BL signal cross-compatibility ID 1 should be using center-left.
But not far down it says both can be used, for profiles other than 7.
__________________
LG C2 OLED | GitHub Projects

Last edited by quietvoid; 30th October 2021 at 20:18.
quietvoid is offline   Reply With Quote
Old 30th October 2021, 22:37   #80  |  Link
PoeBear
Registered User
 
Join Date: Jan 2017
Posts: 48
Quote:
Originally Posted by quietvoid View Post
But not far down it says both can be used, for profiles other than 7.
I guess that's where I'm getting confused. Then it says "As of the effective date of this specification, top-left chroma siting is not tested during Dolby Vision SoC or device certification"

Does that mean its device dependent on if it would work or not? Why would they put only center-left in the table, but then say that top-left is okay, but that they say they won't even test for it it? I guess I'm just confused by Dolby's documentation itself...
PoeBear is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 19:32.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.