Closed kodawah closed 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.
OK. is it possible to add a small unit test for each type? There should be some free-to-use samples, I think?
thanks for the reviews and code @dwbuiten!
Read AVMasteringDisplayMetadata and AVContentLightMetadata from stream side data when present, and use it to populate VideoProperties when frame side data is absent.