rigaya / NVEnc

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

Feature request: HDR10+ metadata adding #119

Closed hyllm closed 2 months ago

hyllm commented 5 years ago

Is it possible to use and add HDR10+ dynamic metadata from JSON file (same like for x265)? Thanks.

Selur commented 5 years ago
rigaya commented 5 years ago

I've added new feature to add HDR10+ dynamic metadata from JSON file (--dhdr10-info), and will add bitstream generated by libhdr10plus.

I'm not yet sure if the implementation is fine, as I don't have HDR10+ json file for actual videos, and just have tested with a small sample here. The output could be parsed by hdr10plus_parser, but when we use B frames, the sequence of the metadata gets changed, as hdr10plus_parser seems to output in decoded order, and not presented order.

Selur commented 5 years ago

does it mean that you can magically decode and show it with nvdec?

No nvdec doesn't read the dynamic data

do you understand that ffmpeg as for now could not do such thing?

code for adding hdr10+ data can be found in the x265 source code, see: https://bitbucket.org/multicoreware/x265/commits/all?search=hdr10%2B since ffmpeg supports libx265 it should be able

also there is a patch for HDR10+ decoding: https://patchwork.ffmpeg.org/patch/11556/

Selur commented 5 years ago

Does that patch will be hw accelerated at all?

don't see any code there at refers to nvdec, so I doubt there will be hardware decoding

Selur commented 5 years ago

not totally sure, whether libnvdec requires the raw stream with the meta data in it or not. -> we will see

Selur commented 5 years ago

No clue, I doubt that Dolby Vision related stuff will come to ffmpeg anytime soon since all the stuff about it is closed source and afaik anyone who had a look at some of the code had to sign NDAs,...

hydra3333 commented 5 years ago

I'm not sure how to use this option, could someone please post an example sequence of preliminary commands/options as well as nvencc usage ? thanks

hydra3333 commented 5 years ago

Also, just wondering, if I have a HDR source, is HDR metadata supposed to be auto-passthrough ? It doesn't seem as if it is eg colourspace etc.

hyllm commented 4 years ago

when trying to use hdr10+ metadata i get:

---------------- Error Video encoding using NVEnc 4.55 ----------------

Video encoding using NVEnc 4.55 failed with exit code: -1073741819 (0xC0000005)

The exit code might be a system error code: The instruction at 0xp referenced memory at 0xp. The memory could not be s.

hyllm commented 4 years ago

sorry for that.. forgot to attach. :) i have samples ready at home.. wil post later? what hosting you prefer for it?

rigaya commented 2 months ago

Now that --dhdr10-info copy can copy hdr10plus metadata, I’ll have this issue closed.