rigaya / NVEnc

NVENCによる高速エンコードの性能実験
https://rigaya34589.blog.fc2.com/blog-category-17.html
Other
1.03k stars 108 forks source link

Dolby Vision metadata support? #371

Open TomMettam opened 2 years ago

TomMettam commented 2 years ago

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 commented 2 years ago

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

quamt commented 2 years ago

@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.

TomMettam commented 2 years ago

@quamt

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

quamt commented 2 years ago

@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.

TomMettam commented 2 years ago

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.

quamt commented 2 years ago

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

TomMettam commented 2 years ago

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

rigaya commented 2 years ago

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.

quamt commented 2 years ago

@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.

Genine-Collin commented 1 year ago

@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