W3C home > Mailing lists > Public > public-webrtc@w3.org > April 2022

[mediacapture-transform] How to handle varying pixel formats (#83)

From: youennf via GitHub <sysbot+gh@w3.org>
Date: Thu, 21 Apr 2022 09:22:29 +0000
To: public-webrtc@w3.org
Message-ID: <issues.opened-1210755025-1650532948-sysbot+gh@w3.org>
youennf has just created a new issue for https://github.com/w3c/mediacapture-transform:

== How to handle varying pixel formats ==
A transform exposes video frames that can be of various pixel formats (https://w3c.github.io/webcodecs/#enumdef-videopixelformat).
Depending on the OS and/or camera, this might be I420 or NV12 right now for cameras.
This might probably be the same for video element exported tracks, RGBA might be used for canvas capture tracks maybe.

It seems this can lead us to interop issue, especially for camera tracks, where applications will expect a given format and will break whenever their assumption is wrong.
I see a few options:
- Let the web app deal with it: they can implement their own conversion in JS (computationally expensive though)
- Let the web app easily convert video frames to another format.
- Let the web app prescribe the pixel format it wants as API when creating the transform.
- Let the UAs consistently select pixel formats (specs recommend or require to use a particular pixel formats, on a source type maybe)

Please view or discuss this issue at https://github.com/w3c/mediacapture-transform/issues/83 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 21 April 2022 09:22:31 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 21 April 2022 09:22:33 UTC