h...@chromium.org, top...@chromium.org, gui...@chromium.org
https://github.com/w3c/mediacapture-transform/blob/main/explainer.md
https://w3c.github.io/mediacapture-transform/
Yes
https://w3c.github.io/mediacapture-transform/
https://github.com/w3c/mediacapture-transform/blob/main/explainer.md
This feature defines an API surface for manipulating raw media carried by MediaStreamTracks such as the output of a camera, microphone, screen capture, and to programmatically produce MediaStreamTracks from raw media frames. It uses WebCodecs interfaces to represent raw media frames and exposes them using streams. We aim to ship this API at the same time as WebCodecs.
https://github.com/w3ctag/design-reviews/issues/603
Complete.
Resolution: satisfied.
The main interoperability risk is that other browsers do not implement it, which is likely, at least in the short run. There is no compatibility risk since existing behavior is unaffected if the feature is not used.
WebKit: Negative. See https://github.com/w3c/mediacapture-transform/issues/created_by/youennf
They object to:
Using the Streams API (https://github.com/w3c/mediacapture-transform/issues/4 and https://github.com/w3c/mediacapture-extensions/issues/23).
Audio support (https://github.com/w3c/mediacapture-transform/issues/29)
Allowing use of the API on the Window scope (https://github.com/w3c/mediacapture-transform/issues/23).
They have been working on a callback-based alternative over the last few months. A draft of their ideas is available at https://github.com/youennf/mediacapture-extensions/blob/main/video-raw-transform.md.
Gecko: Negative. Their main objections are audio support and allowing processing on the Window scope. See:
https://github.com/w3c/mediacapture-transform/issues/38
All the issues raised in that review have been addressed, except for the points of disagreement:
https://github.com/w3c/mediacapture-transform/issues/23
https://github.com/w3c/mediacapture-transform/issues/29
They do not object to the stream-based shape of MediaStreamTrackProcessor and MediaStreamTrackGenerator, but part of their objection to the Window scope is that they oppose relying on transferable streams for Worker support and would instead prefer to wait for transferable MediaStreamTracks to be specified and implemented.
The objection of WebKit and Gecko to allowing this API on the Window scope is similar to their objection to allowing the WebCodecs API on the Window scope. In this regard, we intend to align with the resolution of the WebCodecs issue.
Web developers: Positive.
From Origin Trial participants:
Zoom:
They use the API together with WebCodecs. They find the stream-based API easy to use as well as the WebCodecs VideoFrame API. They currently use video, but plan to experiment with audio as well. They use the worker scope.
bash.video:
They use the API in both the Worker and Window scope, depending on the application type. They find the stream-based API easy to use as well as the WebCodecs VideoFrame API. They use only the video part of the API.
More feedback from OT participants, including participants who did not authorize public sharing of their replies (accessible only to Googlers): https://docs.google.com/document/d/1LQMrD1rIv1tJG5Z_x6VXaC5vAa3N9bbiAjXaoxDzJek/edit?usp=sharing
Public version of the above document, containing only feedback authorized to be made public, already summarized above: https://docs.google.com/document/d/1DBmr-VpThkr6uqTn39npXzxGVq1YHFmx3PW51Bv09ws/edit?usp=sharing
The general feedback from all OT participants is that they think the Streams API and the VideoFrame API (from WebCodecs) are easy to use in the context of the Breakout Box API, although some participants have not evaluated it yet for all their intended use cases. Video is used far more than audio, but audio is used or planned to be used by some participants. Having the same API for both is mentioned as an advantage. Those who use Breakout Box together with WebCodecs think the integration is good.
From Twitter:
* Are there any other platform APIs this feature will frequently be used in tandem with?
This API will be used together with:
Other MediaStream and WebRTC related APIs, such as getUserMedia, getDisplayMedia, and RTCPeerConnection.
Transferable streams, in order to move processing to a worker.
It is expected that in many cases it will be used together with WebCodecs. It uses the WebCodecs interfaces to represent raw media, which makes integration with WebCodecs encoders and decoders straightforward.
* Could the default usage of this API make it hard for Chrome to maintain good performance (i.e. synchronous return, must run on a certain thread, guaranteed return timing)?
No.
* Will it be challenging for developers to take advantage of this feature immediately, as-is?
No.
* Would this feature benefit from having polyfills, significant documentation and outreach, and/or libraries built on top of it to make it easier to use?
No.
This API defines a MediaStreamTrack source and a MediaStreamTrack sink. The security and privacy of the source (MediaStreamTrackGenerator) relies on the same-origin policy. That is, the data MediaStreamTrackGenerator can make available in the form of a MediaStreamTrack must be visible to the document before a VideoFrame or AudioData object can be constructed and pushed into the MediaStreamTrackGenerator. Any attempt to create VideoFrame or AudioData objects using cross-origin data will fail.
The MediaStreamTrack sink introduced by this API (MediaStreamTrackProcessor) exposes the same data that is exposed by other MediaStreamTrack sinks such as WebRTC peer connections, Web Audio MediaStreamAudioSourceNode and media elements. The security and privacy of MediaStreamTrackProcessor relies on the security and privacy of the sources of the tracks to which MediaStreamTrackProcessor is connected. For example, camera, microphone and screen-capture tracks rely on explicit use authorization via permission dialogs, while element capture and MediaStreamTrackGenerator rely on the same-origin policy.
A potential issue with MediaStreamTrackProcessor is resource exhaustion. For example, a site might hold on to too many open VideoFrame objects and deplete a system-wide pool of GPU-memory-backed frames. The Chromium implementation mitigates this risk by limiting the number of pool-backed frames a renderer process can hold. Accidental exhaustion is also mitigated by automatic closing of VideoFrame and AudioData objects once they are written to a MediaStreamTrackGenerator.
All the code for this feature runs in the sandboxed renderer process and therefore respects the Rule of Two.
Yes
MediaStreamInsertableStreams
https://webrtc.github.io/samples/src/content/insertable-streams/video-processing/
https://webrtc.github.io/samples/src/content/insertable-streams/audio-processing/https://chromestatus.com/feature/5499415634640896
Intent to Prototype: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/gkBkLvGKuzc
Intent to Experiment: https://groups.google.com/a/chromium.org/g/blink-dev/c/fyJfqEwP1FY
Intent to Extend Experiment: https://groups.google.com/a/chromium.org/g/blink-dev/c/OCDJghwLUFw/m/s48RrlwlAAAJ
This intent message was generated by Chrome Platform Status.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/afc5ac3f-8129-4b67-90bf-3b3ea9baaf9bn%40chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAL5BFfWen4MwObd1yN-b7MpnSwWcX_wPNOLvsBQ393wqdtL_vg%40mail.gmail.com.
Thanks for the thorough description of the tradeoffs in this intent, and also the very detailed and useful origin trial feedback. It was very useful and informative!I have two comments/questions:1. Regarding exposure on Window: you mention that you intend to align with the decision on WebCodecs. That makes sense to me. Has this point been raised with the working group also, and is it being included in the WebCodecs decision process? Given the intended alignment, I would also prefer to give final approval to this intent only when that decision has been made. (I don't think that would cause any extra delays, but let me know if you have a concern with that.)
jean-ivar: Google announced an intent to ship of a new API, the question of whether to expose that API to window was tied to this issue
jean-ivar: i would question whether it is correct to tie those decisions together
chcunningham: the googlers here are not the same people who worked on that intent-to-ship
chcunningham: lets not stall or increase the scope of this conversation by pulling in that intent-to-ship into this WG
jan-ivar: that makes sense, and that's why i wanted to bring this up; others in the WG might not have been aware of it
chcunningham: the two APIs are tied together in origin trials, but they're separate Apis and implementations in our process
cpn: in terms of the WG, Insertable Streams is not a deliverable of this WG; it doesn't have a home or an official status
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw_QED9J1JB7KPwbrBZ2F7qxncj1GiNScF7JyVxaaX9Wfw%40mail.gmail.com.
I'd like to share feedback from partner teams at Microsoft that have experimented with this feature. They prototyped part of their code with this proposed API to replace existing code that inevitably used canvas and timer APIs or requestAnimationFrame to create custom effects to the media streams.
They used this API in window context and confirmed it significantly improved the performance and predictability in runtime. Also, it allowed them to count on media stream parameters directly without having to hypothetically adjust the output video quality. They also provided feedback that the proposed API has concrete advantages over the callback approach including enabling support for buffering of VideoFrames and additional potential for performance optimization.
The partner teams at Microsoft are keen to use this proposed API asap to deliver improved experience they experimented for their users.
Thanks,
Jungkee
Thanks for the thorough description of the tradeoffs in this intent, and also the very detailed and useful origin trial feedback. It was very useful and informative!I have two comments/questions:1. Regarding exposure on Window: you mention that you intend to align with the decision on WebCodecs. That makes sense to me. Has this point been raised with the working group also,
and is it being included in the WebCodecs decision process?
Given the intended alignment, I would also prefer to give final approval to this intent only when that decision has been made. (I don't think that would cause any extra delays, but let me know if you have a concern with that.)
2. Regarding audio: my understanding of the OT feedback is that multiple participants thought audio in the same system makes sense, but that they didn't actually use the audio part of the API as yet. Is that correct?
f so, how about just shipping the video part for now since it has more consensus and experience, and coming back to audio once partners have an opportunity to try it and see if it has definite advantages vs AudioWorklet (which AIUI is the alternative suggestion raised by Mozilla)? Perhaps that new feedback and experience in practice would help to inform and drive consensus in the working group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CA%2BBuZxYHgnNLapr9GHnHMPMC11rM1oAJzX%3DnX2iERz-69UsR%3DA%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/afc5ac3f-8129-4b67-90bf-3b3ea9baaf9bn%40chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/afc5ac3f-8129-4b67-90bf-3b3ea9baaf9bn%40chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAL5BFfWen4MwObd1yN-b7MpnSwWcX_wPNOLvsBQ393wqdtL_vg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/c5ac7e6d-6f5d-4456-9cab-9a3a94941f9an%40chromium.org.