FFMS / ffms2

An FFmpeg based source library and Avisynth/VapourSynth plugin for easy frame accurate access
Other
582 stars 105 forks source link

videosource: Support reading HDR metadata from container #340

Closed kodawah closed 5 years ago

kodawah commented 5 years ago

Read AVMasteringDisplayMetadata and AVContentLightMetadata from stream side data when present, and use it to populate VideoProperties when frame side data is absent.

kodawah commented 5 years ago

Are there ever cases where a file may have both frame level and container/stream level mastering metadata?

A user could have frame-level metadata and then they could use mkvmerge/youtube-hdr-tool to fiddle the with the container metadata. Philosophically I prefer to give priority to parameters that are coming from the frames, as they are harder to modify and less likely to be interpreted wrong.

dwbuiten commented 5 years ago

OK. is it possible to add a small unit test for each type? There should be some free-to-use samples, I think?

kodawah commented 5 years ago

thanks for the reviews and code @dwbuiten!