View Full Version : Nvenc h265 HDR
kolak
1st March 2019, 00:40
Does current Nvidia GPU encoder allow to properly set all need HDR metadata?
Is there any working tools which has it implemented?
Does anyone know if it works in ffmpeg?
nevcairiel
1st March 2019, 02:41
NVENC lets you specify the VUI parameters (ie. colorspace, transfer function, etc), but it cannot currently generate the HDR SEI. One could add that afterwards though, I reckon.
Without being HDR-aware, I would assume the compression/quality also suffers a bit from the "unusual" luma/chroma distribution in a PQ video, rather then a gamma-encoded one.
kolak
1st March 2019, 11:11
Thank you.
Yes, there are tools to patch nvenc h265, so this is probably why they do exist :)
hydra3333
27th August 2019, 06:45
Is one able to suggest the tools here, for completeness ?
Thanks
benwaggoner
27th August 2019, 20:47
...Without being HDR-aware, I would assume the compression/quality also suffers a bit from the "unusual" luma/chroma distribution in a PQ video, rather then a gamma-encoded one.
That is an interesting topic. Simpler encoders tune for PSNR or SSIM assume that the SDR gamma EOTF is perceptually uniform when it isn't. This can result in quality issues in the near-blacks.
Since PQ is much more perceptually uniform, a luma-ignoring encoder might do better with PQ than gamma. And a luma-aware encoder would need to modify or turn off that tuning when encoding PQ.
kolak
30th August 2019, 12:20
Is one able to suggest the tools here, for completeness ?
Thanks
https://github.com/SK-Hardwired/nv_hevc_hdr_patcher
sneaker_ger
30th August 2019, 12:50
NOTE: This may not work well with HEVC streams made by x265 (x265 lib) with REPEATING NAL and SEI units! Output stream most probably could be corrupted!
So with this patcher the SEIs are only at the start? There is a reason repeating was added by the x265 devs: the SEIs are only valid for exactly one GOP so you have to repeat them to be (semantically) spec compliant.
NikosD
30th August 2019, 21:01
Does current Nvidia GPU encoder allow to properly set all need HDR metadata?
Is there any working tools which has it implemented?
Does anyone know if it works in ffmpeg? Have you tried this ?
https://rigaya34589.blog.fc2.com/?cat=17
hydra3333
31st August 2019, 15:09
Have you tried this ?
https://rigaya34589.blog.fc2.com/?cat=17
nvencc, is good.
I gather you need to extract the SEI stuff first to a json file and then supply the file back which I think is used by the tool to patch the result. I forget the name of the extractor, but seem to recall it's discussed somewhere here on doom9 and that you can use ffmpeg to extract the h.265 stream and pipe it to the extraction tool to do it's saving-json job. I read the extracted SEI stuff is no good if the video is processed, eg resized or whatnot.
RanmaCanada
31st August 2019, 16:52
There was a modified staxrip that was released last year that had profiles created for doing just this. In reality, don't as GPU encoding is potato quality. Maybe another generation or 2 and it might catch up to CPU like it did with H264.
Selur
31st August 2019, 18:29
as aside note: 'nv_hevc_hdr_patcher' was only needed and developed when NVEncC didn't support adding HDR meta data, it's not really needed anymore.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.