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

Add block additional mapping for generic type/value #353

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

dericed
Copy link
Contributor

@dericed dericed commented Oct 27, 2019

This is based upon the timecode branch, but this offers a generic key/value structure for side data. For discussion.

@robUx4 robUx4 added format addition spec_codecs Codec Matroska spec document target labels Nov 3, 2019
@dericed dericed force-pushed the add-block-additional-mapping-for-generic-type/value branch from fa0db41 to 2c716ac Compare November 21, 2019 15:13
@robUx4 robUx4 force-pushed the add-block-additional-mapping-for-generic-type/value branch from 2c716ac to 3184d65 Compare March 1, 2020 14:48
@robUx4 robUx4 force-pushed the add-block-additional-mapping-for-generic-type/value branch from 3184d65 to e247a99 Compare June 7, 2020 11:33
@robUx4 robUx4 mentioned this pull request Apr 4, 2021
@robUx4 robUx4 linked an issue Apr 4, 2021 that may be closed by this pull request
@mbunkus
Copy link
Contributor

mbunkus commented May 30, 2021

If I understand this PR correctly, there would not be a way to associate more than a single key/value pair with each frame. That I definitely don't like.

Additionally we don't have a way of associating a BlockMore with a certain frame inside the BlockGroup. Either we add one (via a new frame-number-in-block element inside BlockMore), or we mention explicitly that a BlockMore applies to all frames in the BlockGroup's Block, and that writers that want to associate the BlockMore with a specific frame only would need to limit the number of frames in the Block to 1. Or we could spec that the BlockMore is always associated with the first frame only.

@mkver
Copy link
Contributor

mkver commented Aug 23, 2021

In FFmpeg packets can have AV_PKT_DATA_STRINGS_METADATA side data, a list of zero terminated key/value strings. The whole side data is externally framed. Putting such a thing (or something similar; i.e. the strings could be length-prefixed (probably with EBML numbers)) in a BlockAdditional would overcome the restriction to a single key-value pair; but it would have the downside that key would have to repeated every time.

Another way to overcome this restriction would be to allow several BlockAdditionalMappings with the same BlockAddIDType, but different BlockAddIDValue. Each of these would have its own key.

@robUx4
Copy link
Contributor

robUx4 commented Aug 24, 2021

IMO the FFmpeg usage sounds like the "key/value" type is too broad. It's a way to store the data, but it doesn't say what the data correspond to. There might be different systems using the same key.

It should be a BlockAddIDType per usage (one would be for FFmpeg) and then saying it's using key/value storage.

@robUx4 robUx4 force-pushed the add-block-additional-mapping-for-generic-type/value branch from 76565ff to 9fa9cb2 Compare December 22, 2024 13:37
@robUx4
Copy link
Contributor

robUx4 commented Dec 22, 2024

Rebased so it can be used. (SMPTE ST 12-1 has been merged)

@robUx4 robUx4 force-pushed the add-block-additional-mapping-for-generic-type/value branch from 9fa9cb2 to 221c7ab Compare December 22, 2024 13:56
@robUx4
Copy link
Contributor

robUx4 commented Dec 22, 2024

Rebased on top of #936 to simplify.

There is nothing is the spec that says the same BlockAddType can't be used multiple times in the same BlockGroup so this seems OK to me.

There's still the caveat that it's loosely defined and not very useful to interpret.

@robUx4
Copy link
Contributor

robUx4 commented Dec 22, 2024

Moving this to Matroska v5 as this is not used yet (or in Rawcooked ?). (if it's merged before we finalize the codec document, it's fine).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
format addition matroska-v5 spec_codecs Codec Matroska spec document target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support frame side data
4 participants