w3c / webcodecs

WebCodecs is a flexible web API for encoding and decoding audio and video.
https://w3c.github.io/webcodecs/
Other
937 stars 131 forks source link

VideoFrame copyTo() behavior with non-RGBA/RGBX/BGRA/BGRX formats #785

Closed domenic closed 1 month ago

domenic commented 1 month ago

From what I can tell from https://w3c.github.io/webcodecs/#dom-videoframe-copyto , formats that are not one of the four allowed formats are... ignored?

This seems like surprising behavior. I would expect the returned promise to get rejected with an exception. Otherwise, web developers might think that they can convert a VideoFrame to one of the many other possible formats.

domenic commented 1 month ago

Nevermind, I found it in a sub-algorithm. https://w3c.github.io/webcodecs/#videoframe-parse-videoframecopytooptions