-
Notifications
You must be signed in to change notification settings - Fork 19
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
Exposing decode errors / SW fallback as an event #146
Comments
My reading of the conclusion is that for no-preference there will be no surfacing. |
Hmh we don't have a preference API (yet), there is an assumption that HW is preferred but we may want a prefer-software/prefer-hardware option as well |
See: w3c/webcodecs#669
As noted in the MEDIA WG minutes, the suggestion is for |
Related: #127 |
It was noted during the call that there may be value in looking up at how WebGPU reports device errors. The WebGPU explainer has a section on errors that describes the different types of errors that WebGPU may report, including fatal ones and fallible ones, the latter being captured in a stack. For fatal errors, GPU devices come with a |
@xingri FYI other work in this area |
Can we include the following errors?
As long as we don't fire any events due to "HW is already in use"? In that case you may still get SW but you can't correlate "HW availability" with cross-site usage? |
@xingri You are very welcome to provide a PR. I suggest a custom event exposing what type of error happened as an enum (RTCTrackEvent is an example of an event interface adding custom attributes to the Event). I suggest adding the event handler to RTCRtpReceiver (and if we want to expose encode errors we would add a similar event to RTCRtpSender in a follow up). The question is how to expose the necessary information for the app to take action. |
I would prefer |
Latest discussion in WebCodecs has been about the distinction between types of decoder errors. Hardware decoders are more strict, so they can error due to inputs that software decoders would accept. It is useful to be able to distinguish data errors from situations in which hardware resources become available (e.g. because another application is using them or because the GPU crashed). |
This issue had an associated resolution in WebRTC WG 2023-04-18 – (Issue 146: Exposing decode errors / SW fallback as an Event (Bernard)):
MEDIA WG meeting minutes: https://www.w3.org/2023/04/11-mediawg-minutes.html#t01 |
@aboba Could you please share working group discussion if there is an update? |
Related: w3c/webcodecs#669 Eugene Zemstov is currently looking at how to expose encode/decode errors in WebCodecs. This will include differentiating between types of errors (e.g. data errors versus hardware resource availability). |
@aboba thank you for the update. Seems like the link is about the meeting before WebRTC montly WG meeting. I thought there might be additional discussion after WebRTC WG meeting(04-18) |
Thank you for the update once again. Will Eugene's work be applicable for the general WebRTC cases beyond WebCodec? |
We are hoping that the approach can be used for both WebRTC and WebCodecs. The big question is whether we can differentiate errors to provide applications with the information to figure out what to do next. |
@aboba Thank you again for the prompt response. Will keep watching on it. Please let me know if there are any thing to contribute from my end. |
This issue was mentioned in WEBRTCWG-2023-07-18 (Page 17) |
An additional consideration: sometimes the UA may switch from hardware encoders to software encoders intentionally, e.g. because the software encoder provides better quality for small resolutions (see e.g. here) |
Would be useful to cover this in the joint meeting slides. In WebRTC, it might make sense to indicate that software failover occurred, but not as the result of an error (not a decode error or a resource exhaustion problem). In WebCodecs it is not clear if this should be exposed. If hwAcceleration = "no-preference", is set, software failover occurs without an error or other notification. If hwAcceleration = "prefer-hardware" then there is no automatic software failover, just an error to tell you why (e.g. resource unavailability vs. decode error). Not sure if an error should be surfaced just because software quality is better. |
This issue was mentioned in WEBRTC-MEDIA-2023-09-15 (Page 25) |
From my recollection the path forward here is I can take a stab for October 17th |
Adding previous discussion security concern regarding on SW Fallback. I got the positive feedback on event style approach. |
This issue was discussed in WebRTC November 2023 meeting – 21 November 2023 (Issue 146 Exposing decode errors/SW fallback as an event 🎞︎) |
In WebCodecs it appears an event may be added, which may be considered less privacy harmful than powerEfficient[Encoder/Decoder] in stats.
Can we add similar events to RTCRtpSender/RTCRtpReceiver? @aboba
The text was updated successfully, but these errors were encountered: