-
Notifications
You must be signed in to change notification settings - Fork 653
feat(ffmpeg): Read CICP metadata, and add test #4882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| Reading ref/vp9_display_p3.mkv | ||
| ref/vp9_display_p3.mkv : 192 x 108, 3 channel, uint8 FFmpeg movie | ||
| 7 subimages: 192x108 [u8,u8,u8] | ||
| subimage 0: 192 x 108, 3 channel, uint8 FFmpeg movie | ||
| SHA-1: E65FAFBDA14543571188F8A84F75E1567E13148C | ||
| channel list: R, G, B | ||
| CICP: 12, 1, 1, 1 | ||
| DATE: "2025/09/13 21:58:33" | ||
| ENCODER: "Lavf61.7.100" | ||
| FramesPerSecond: 24/1 (24) | ||
| SCENE: "Scene" | ||
| ffmpeg:codec_name: "Google VP9" | ||
| oiio:BitsPerSample: 0 | ||
| oiio:Movie: 1 | ||
| oiio:subimages: 7 | ||
| subimage 1: 192 x 108, 3 channel, uint8 FFmpeg movie | ||
| SHA-1: 8D54A542C4E6A47A4F8829993001786BA62288DF | ||
| channel list: R, G, B | ||
| CICP: 12, 1, 1, 1 | ||
| DATE: "2025/09/13 21:58:33" | ||
| ENCODER: "Lavf61.7.100" | ||
| FramesPerSecond: 24/1 (24) | ||
| SCENE: "Scene" | ||
| ffmpeg:codec_name: "Google VP9" | ||
| oiio:BitsPerSample: 0 | ||
| oiio:Movie: 1 | ||
| oiio:subimages: 7 | ||
| subimage 2: 192 x 108, 3 channel, uint8 FFmpeg movie | ||
| SHA-1: 8D54A542C4E6A47A4F8829993001786BA62288DF | ||
| channel list: R, G, B | ||
| CICP: 12, 1, 1, 1 | ||
| DATE: "2025/09/13 21:58:33" | ||
| ENCODER: "Lavf61.7.100" | ||
| FramesPerSecond: 24/1 (24) | ||
| SCENE: "Scene" | ||
| ffmpeg:codec_name: "Google VP9" | ||
| oiio:BitsPerSample: 0 | ||
| oiio:Movie: 1 | ||
| oiio:subimages: 7 | ||
| subimage 3: 192 x 108, 3 channel, uint8 FFmpeg movie | ||
| SHA-1: 8D54A542C4E6A47A4F8829993001786BA62288DF | ||
| channel list: R, G, B | ||
| CICP: 12, 1, 1, 1 | ||
| DATE: "2025/09/13 21:58:33" | ||
| ENCODER: "Lavf61.7.100" | ||
| FramesPerSecond: 24/1 (24) | ||
| SCENE: "Scene" | ||
| ffmpeg:codec_name: "Google VP9" | ||
| oiio:BitsPerSample: 0 | ||
| oiio:Movie: 1 | ||
| oiio:subimages: 7 | ||
| subimage 4: 192 x 108, 3 channel, uint8 FFmpeg movie | ||
| SHA-1: D9B0B8782048AEE24C4DF767E2B0969EBAB9D36B | ||
| channel list: R, G, B | ||
| CICP: 12, 1, 1, 1 | ||
| DATE: "2025/09/13 21:58:33" | ||
| ENCODER: "Lavf61.7.100" | ||
| FramesPerSecond: 24/1 (24) | ||
| SCENE: "Scene" | ||
| ffmpeg:codec_name: "Google VP9" | ||
| oiio:BitsPerSample: 0 | ||
| oiio:Movie: 1 | ||
| oiio:subimages: 7 | ||
| subimage 5: 192 x 108, 3 channel, uint8 FFmpeg movie | ||
| SHA-1: C6B5666BB0A937A59762B8FE846BF50FED40889E | ||
| channel list: R, G, B | ||
| CICP: 12, 1, 1, 1 | ||
| DATE: "2025/09/13 21:58:33" | ||
| ENCODER: "Lavf61.7.100" | ||
| FramesPerSecond: 24/1 (24) | ||
| SCENE: "Scene" | ||
| ffmpeg:codec_name: "Google VP9" | ||
| oiio:BitsPerSample: 0 | ||
| oiio:Movie: 1 | ||
| oiio:subimages: 7 | ||
| subimage 6: 192 x 108, 3 channel, uint8 FFmpeg movie | ||
| SHA-1: 63516D95A1BB56E9E9483F9BCFC4305851A8BC54 | ||
| channel list: R, G, B | ||
| CICP: 12, 1, 1, 1 | ||
| DATE: "2025/09/13 21:58:33" | ||
| ENCODER: "Lavf61.7.100" | ||
| FramesPerSecond: 24/1 (24) | ||
| SCENE: "Scene" | ||
| ffmpeg:codec_name: "Google VP9" | ||
| oiio:BitsPerSample: 0 | ||
| oiio:Movie: 1 | ||
| oiio:subimages: 7 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| Reading ref/vp9_display_p3.mkv | ||
| ref/vp9_display_p3.mkv : 192 x 108, 3 channel, uint8 FFmpeg movie | ||
| 7 subimages: 192x108 [u8,u8,u8] | ||
| subimage 0: 192 x 108, 3 channel, uint8 FFmpeg movie | ||
| SHA-1: C882152FF48CB068931C2710175659A9D0493C08 | ||
| channel list: R, G, B | ||
| CICP: 12, 1, 1, 1 | ||
| DATE: "2025/09/13 21:58:33" | ||
| ENCODER: "Lavf61.7.100" | ||
| FramesPerSecond: 24/1 (24) | ||
| SCENE: "Scene" | ||
| ffmpeg:codec_name: "Google VP9" | ||
| oiio:BitsPerSample: 0 | ||
| oiio:Movie: 1 | ||
| oiio:subimages: 7 | ||
| subimage 1: 192 x 108, 3 channel, uint8 FFmpeg movie | ||
| SHA-1: 1E2EB62F7BDD2DAC5C6FBDE582EE19978DC7C290 | ||
| channel list: R, G, B | ||
| CICP: 12, 1, 1, 1 | ||
| DATE: "2025/09/13 21:58:33" | ||
| ENCODER: "Lavf61.7.100" | ||
| FramesPerSecond: 24/1 (24) | ||
| SCENE: "Scene" | ||
| ffmpeg:codec_name: "Google VP9" | ||
| oiio:BitsPerSample: 0 | ||
| oiio:Movie: 1 | ||
| oiio:subimages: 7 | ||
| subimage 2: 192 x 108, 3 channel, uint8 FFmpeg movie | ||
| SHA-1: 1E2EB62F7BDD2DAC5C6FBDE582EE19978DC7C290 | ||
| channel list: R, G, B | ||
| CICP: 12, 1, 1, 1 | ||
| DATE: "2025/09/13 21:58:33" | ||
| ENCODER: "Lavf61.7.100" | ||
| FramesPerSecond: 24/1 (24) | ||
| SCENE: "Scene" | ||
| ffmpeg:codec_name: "Google VP9" | ||
| oiio:BitsPerSample: 0 | ||
| oiio:Movie: 1 | ||
| oiio:subimages: 7 | ||
| subimage 3: 192 x 108, 3 channel, uint8 FFmpeg movie | ||
| SHA-1: 1E2EB62F7BDD2DAC5C6FBDE582EE19978DC7C290 | ||
| channel list: R, G, B | ||
| CICP: 12, 1, 1, 1 | ||
| DATE: "2025/09/13 21:58:33" | ||
| ENCODER: "Lavf61.7.100" | ||
| FramesPerSecond: 24/1 (24) | ||
| SCENE: "Scene" | ||
| ffmpeg:codec_name: "Google VP9" | ||
| oiio:BitsPerSample: 0 | ||
| oiio:Movie: 1 | ||
| oiio:subimages: 7 | ||
| subimage 4: 192 x 108, 3 channel, uint8 FFmpeg movie | ||
| SHA-1: 35565DB895AB1CA413192B7F25A1890718CFC0F5 | ||
| channel list: R, G, B | ||
| CICP: 12, 1, 1, 1 | ||
| DATE: "2025/09/13 21:58:33" | ||
| ENCODER: "Lavf61.7.100" | ||
| FramesPerSecond: 24/1 (24) | ||
| SCENE: "Scene" | ||
| ffmpeg:codec_name: "Google VP9" | ||
| oiio:BitsPerSample: 0 | ||
| oiio:Movie: 1 | ||
| oiio:subimages: 7 | ||
| subimage 5: 192 x 108, 3 channel, uint8 FFmpeg movie | ||
| SHA-1: 338C9A82B74CE3B291DAD6564AE7C060AE6D9267 | ||
| channel list: R, G, B | ||
| CICP: 12, 1, 1, 1 | ||
| DATE: "2025/09/13 21:58:33" | ||
| ENCODER: "Lavf61.7.100" | ||
| FramesPerSecond: 24/1 (24) | ||
| SCENE: "Scene" | ||
| ffmpeg:codec_name: "Google VP9" | ||
| oiio:BitsPerSample: 0 | ||
| oiio:Movie: 1 | ||
| oiio:subimages: 7 | ||
| subimage 6: 192 x 108, 3 channel, uint8 FFmpeg movie | ||
| SHA-1: 90BC91EAA745A9C897EEDEC0D34BAAF1D40B1C7C | ||
| channel list: R, G, B | ||
| CICP: 12, 1, 1, 1 | ||
| DATE: "2025/09/13 21:58:33" | ||
| ENCODER: "Lavf61.7.100" | ||
| FramesPerSecond: 24/1 (24) | ||
| SCENE: "Scene" | ||
| ffmpeg:codec_name: "Google VP9" | ||
| oiio:BitsPerSample: 0 | ||
| oiio:Movie: 1 | ||
| oiio:subimages: 7 |
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #!/usr/bin/env python | ||
|
|
||
| # Copyright Contributors to the OpenImageIO project. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # https://github.com/AcademySoftwareFoundation/OpenImageIO | ||
|
|
||
| imagedir = "ref/" | ||
| files = [ "vp9_display_p3.mkv" ] | ||
| for f in files: | ||
| command = command + info_command (os.path.join(imagedir, f)) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. Lack of an ffmpeg test has masked (until now) that we aren't translating some of the common items into the canonical OIIO names. "DATE" should be "DateTime". "SCENE" probably should be "ImageDescription"?
This is a longstanding issue, you don't need to fix it as part of this PR. But we should come back to it. In fact, I will add it as an issue that feels like an appropriate Dev Days sized task!
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This movie file was written by Blender. I would rather expect something should be fixed on the Blender side to follow metadata naming conventions. The code for this is very old, and probably at the time was mainly intended to be consumed by Blender.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, maybe I misunderstood. If those are simply the names Blender chose, then we are reporting it accurately. I think I assumed that these were some kind of standard naming that ffmpeg imposes. Carry on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to explain:
Lots of times, different image file formats use different metadata names for what are conceptually the same thing. Like, what the TIFF spec calls "ImageDescription" is obviously meant to be the same thing that the JPEG spec calls "Caption".
Since a design goal of OIIO is to allow format-agnostic reading, an application should be able to use the same API calls to read from many formats without needing to special case them (as much as possible), so the last thing an app wants to do is somehow know under what metadata name it will find the image description or the capture date, for each and every format it may encounter.
So for the intersection of the most useful and most common metadata items, we have a canonical name that OIIO uses and presents to the user, with each file format handler doing the name translation on the way in and out. Hence, they all translate the date and time data into the same string layout and call it "DateTime", etc.
But that only matters if it's something determined by the format itself. If this is just arbitrary name/value stuff that was put in by the app that wrote the file, we don't try to guess what it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that makes sense. It's indeed just arbitrary metadata.
I was just thinking it would be nice if Blender wrote metadata in such a way that it ends up as e.g.
DateTimein OIIO, and then caries over better when converting to other file formats. But that's not OIIO's problem of course.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to add to the confusion, it's called "capTime" in OpenEXR. But OIIO knows how to translate metadata called "DateTime" into "capTime" when it's writing an exr file.
Yes, if you happen to name it DateTime, then if it's read by OIIO and written to other files, it will know that it's the canonical date/time field and will rename it appropriately for each format that has a different specified name for the obviously same meaning of the data.