NVEnc icon indicating copy to clipboard operation
NVEnc copied to clipboard

Dolby Vision metadata support?

Open TomMettam opened this issue 3 years ago • 10 comments

Is it possible to add support for adding Dolby Vision metadata into an x265 bitstream? (I'm mostly interested in profile 8.1)

Here's a sample RPU dump

RPU.zip

TomMettam avatar Nov 01 '21 18:11 TomMettam

Just realised I can inject it after encoding with NVenc using dovi_tool. Would still be nice to have in this tool though.

TomMettam avatar Nov 07 '21 15:11 TomMettam

@TomMettam Would be nice to know how you managed to do that. I am sure that other users would be interested as well. In a step-by-step tutorial or so, would be great.

quamt avatar Dec 21 '21 11:12 quamt

@quamt

dovi_tool inject-rpu -i video.hevc --rpu-in RPU.bin -o injected_output.hevc

TomMettam avatar Dec 21 '21 17:12 TomMettam

@TomMettam Thank you for the info. I was curious on how you got the RPU from the original file, the settings you used for nvenc to be compliant to standard. As well on how you put the files together after you injected the RPU into the hevc. Putting files together meaning audio and video into a container.

quamt avatar Dec 22 '21 02:12 quamt

dovi_tool can extract the rpu from your source video, and convert it to profile 8.1 (the best choice, single layer, HDR10 compatible).

You don't do anything special with NVenc, but once you have the encoded video you can extract the h265 annex B bitstream with ffmpeg, inject the RPU with dovi_tool and then merge it back in with mkvtoolnix.

TomMettam avatar Dec 22 '21 02:12 TomMettam

@TomMettam I tried that but doesnt work for me. Unable to extract the RPU.

quamt avatar Dec 22 '21 05:12 quamt

See the example on the dovi tool page, you have to work on the raw annex b HEVC bitstream

TomMettam avatar Dec 22 '21 07:12 TomMettam

I have added new option --dolby-vision-rpu in NVEnc 5.43 which can insert RPU file like x265, but it seems like it requires to be remuxed by tsMuxer to be detected as Dolby Vision by MediaInfo.

rigaya avatar Feb 14 '22 12:02 rigaya

@rigaya How did you achieve that? I tried and the dolbyvision is not regocnised. Somewhere along the way, there must be a mistake I do.

quamt avatar Apr 22 '22 22:04 quamt

@quamt if you look @t the mediainfo that it's notice dolbyvision than it should work and diplaying DV Second if you add the command you also need to set path where it is for example --dolby-vision-rpu c:\xxxxx\xxx.rpu or .bin depents what extention you have exported to but fist you need the rpu or bin file

Genine-Collin avatar Apr 30 '23 00:04 Genine-Collin