Skip to content

Conversation

@brechtvl
Copy link
Contributor

Description

The actual CICP reading code is trivial.

Also recognize mkv (Matroska) extension for the test.

Tests

Add test using Matroska + VP9, to maximize the chance of an ffmpeg build supporting them. They are royalty free, built into ffmpeg and relatively old.

Checklist:

  • I have read the contribution guidelines.
  • I have updated the documentation, if applicable. (Check if there is no
    need to update the documentation, for example if this is a bug fix that
    doesn't change the API.)
  • I have ensured that the change is tested somewhere in the testsuite
    (adding new test cases if necessary).
  • If I added or modified a C++ API call, I have also amended the
    corresponding Python bindings (and if altering ImageBufAlgo functions, also
    exposed the new functionality as oiiotool options).
  • My code follows the prevailing code style of this project. If I haven't
    already run clang-format before submitting, I definitely will look at the CI
    test that runs clang-format and fix anything that it highlights as being
    nonconforming.

Add test using Matroska + VP9, to maximize the chance of an ffmpeg build
supporting them. They are royalty free, built into ffmpeg and relatively old.

Also recognize mkv (Matroska) extension.

Signed-off-by: Brecht Van Lommel <[email protected]>
Comment on lines +8 to +11
DATE: "2025/09/13 21:58:33"
ENCODER: "Lavf61.7.100"
FramesPerSecond: 24/1 (24)
SCENE: "Scene"
Copy link
Collaborator

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!

Copy link
Contributor Author

@brechtvl brechtvl Sep 13, 2025

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.

Copy link
Collaborator

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.

Copy link
Collaborator

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.

Copy link
Contributor Author

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. DateTime in OIIO, and then caries over better when converting to other file formats. But that's not OIIO's problem of course.

Copy link
Collaborator

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.

Copy link
Collaborator

@lgritz lgritz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lgritz lgritz merged commit 4945b57 into AcademySoftwareFoundation:main Sep 13, 2025
58 of 63 checks passed
lgritz pushed a commit to lgritz/OpenImageIO that referenced this pull request Sep 14, 2025
…tion#4882)

The actual CICP reading code is trivial.

Also recognize mkv (Matroska) extension for the test.

Add test using Matroska + VP9, to maximize the chance of an ffmpeg build
supporting them. They are royalty free, built into ffmpeg and relatively
old.

Signed-off-by: Brecht Van Lommel <[email protected]>
zachlewis pushed a commit to zachlewis/OpenImageIO that referenced this pull request Sep 16, 2025
…tion#4882)

The actual CICP reading code is trivial.

Also recognize mkv (Matroska) extension for the test.

Add test using Matroska + VP9, to maximize the chance of an ffmpeg build
supporting them. They are royalty free, built into ffmpeg and relatively
old.

Signed-off-by: Brecht Van Lommel <[email protected]>
Signed-off-by: Zach Lewis <[email protected]>
@lgritz lgritz added the file formats Image file formats, ImageInput, ImageOutput label Oct 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

file formats Image file formats, ImageInput, ImageOutput

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants