-
Notifications
You must be signed in to change notification settings - Fork 143
WebCodec as pass through to application metadata #189
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
Comments
The metadata would want to be preserved unchanged through transforms. we would need some mechanism to ensure multiple users of the mechanism don't step on each other, but I think that's solvable. |
I closed #182 as duplicate of this one, but pasting a bit of @aboba's opening comment here to unify the discussion:
|
Similar to above, closed #95 as duplicate of this one. Pasting some comments from that bug here to unify discussion: @sandersdan wrote:
|
For my part, I hear the use case. I think there are a number of ways to do this that aren't breaking changes. For instance, we could add a frozen Map to chunks/frames that is passed through the codec. Note Dan's points above on using Symbol and the implications for 1:1 mapping of inputs/outputs (intentionally not currently guaranteed by the spec). My vote is to wait for specific metadata to be demanded and then we can decide where/how to add it on a case by case basis. |
A frozen map of Symbol -> Object sounds ideal for the purposes I've been hearing about. I think people can adapt to frames being dropped relatively easily (just send info relevant to that frame; state-changing data needs to be kept on a separate object and just referenced by the per-frame map). I also think that having the map be transported from "frame that triggered this frame emission" to "first (or last) frame that resulted from the same trigger" is fine. It gets complex if you have a codec where you can't really tell which frames are triggered by which input frame, but I would think that those would be scarce. |
Triage note: marking 'extension' as proposed direction simply adds attributes to existing interfaces. |
Ping - this is relevant to, among others, Intel's "face detection" proposal. Do we have thoughts on bringing it forward? |
It's quite appealing for applications to be able to add metadata to VideoFrames and encodedChunks. Of course, the encodedChunk metadata needs to be serialized on the wire or it would not be available to the decoder on the receiver side. |
Some thoughts:
|
For my erudition: Are you referring to https://developer.apple.com/documentation/corevideo/cvbuffer/3242646-attachments when you talk about the CVPixelBuffer metadata? It's not obvious to me (I don't read that language easily) what type of attachment can be carried, but it seems to behave like a dictionary of objects (indexed by string). Having a generic "nonpropagated/propagated" property of the attachments seems like an interesting idea. |
This issues stems from w3c/mediacapture-transform#3.
It might be good to have some application specific metadata be passed through without any change through encoder or decoder.
As an example, WebRTC encoded transforms could be used to retrieve some metadata, set them in encoded frame, (like head position or some other info). On the decoded frame, having the same metadata could be useful for JS-based post processing.
The text was updated successfully, but these errors were encountered: