Skip to content
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

Matroska Image Format #818

Open
shmuelie opened this issue Feb 16, 2024 · 10 comments
Open

Matroska Image Format #818

shmuelie opened this issue Feb 16, 2024 · 10 comments
Labels

Comments

@shmuelie
Copy link

I would like to propose that an extension to the codecs be made to include image/graphic formats, allowing the main content to be images. The extendibility of Matroska container would be extremely helpful for images, not just video and audio.

@robUx4 robUx4 added codec mapping format addition spec_codecs Codec Matroska spec document target labels Oct 12, 2024
@robUx4
Copy link
Contributor

robUx4 commented Oct 12, 2024

You mean to hold a single image or add more common image codecs ?

@shmuelie
Copy link
Author

The main request would be for a single image. Technically you can put them in as attachments right now but that's not the "main" content like video and audio are.

@JeromeMartinez
Copy link
Contributor

What would be he advantage compared to the source format? i.e. a JPEG file in a Matroska file is not useful compared to a JPEG file directly?
I see image formats in Matroska more as a possibility for a video stream, e.g. like what already has MP4 (it can embed e.g. 1 JPEG image per video frame) or MXF (it can embed e.g. 1 JPEG 2000 image per video frame).
If we want a single image, well, it may be a video frame with a duration of infinite :).

@shmuelie
Copy link
Author

Tha advantage of an image file in Matroska over just the image file would be getting the advantages of the Matroska container: arbitrary metadata and attachments. And while yes, I could "hack it" using something like an infinite video frame or a file with only an attachment I would like something more "official" than that 😅

@JeromeMartinez
Copy link
Contributor

I personally see no problem to make explicit that max of the Segment\Info\Duration and \Segment\Tracks\TrackEntry\DefaultDuration value if (uint)-1 means still image, it would be compatible with previous specs and definition of \Segment\Tracks\TrackEntry\CodecID would be common to still images and video.

@shmuelie
Copy link
Author

Hmmm, but the CodecID would still need to be updated to include the image's codec, no?

@JeromeMartinez
Copy link
Contributor

Hmmm, but the CodecID would still need to be updated to include the image's codec, no?

But in a generic manner (same codec spec for video or image).

@shmuelie
Copy link
Author

But in a generic manner (same codec spec for video or image).

Not sure I follow?

@robUx4
Copy link
Contributor

robUx4 commented Oct 21, 2024

I personally see no problem to make explicit that max of the Segment\Info\Duration and \Segment\Tracks\TrackEntry\DefaultDuration value if (uint)-1 means still image, it would be compatible with previous specs and definition of \Segment\Tracks\TrackEntry\CodecID would be common to still images and video.

None are mandatory so it's probably better to not use them at all. Given Duration is a float a NaN value could be used.

Every video codec (I know) would start with a RAP (Random Access Picture) so can be decoded on its own. It should not be a problem to use any video codec we support. The problem with this approach is that image viewers or even web browsers won't be expected to support all codecs we support. Unlike regular image formats that only have a single codec to support.

There's nothing wrong/impossible in defining a Matroska based picture format. But I'm not sure it fits the use case of regular image formats. This is the same reason there is no .mks to hold subtitles of any kind. Even though it's more likely for players that support subtitles to support Matroska too.

@shmuelie
Copy link
Author

I totally agree there's no real technical issue here, and it's purely a "business" decision. I think it's be nice as it would mean getting all the advantages of Matroska (attachments and easy to define "random" metadata but for images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants