VideoFrame.copyTo() can convert pixel data to RGB pixel format Converting YUV video frames to RGB is often required for processing them in libraries like TensorFlow.js and OpenCV.js. Previously the only possible way to achieve this was rendering the frame on a canvas. Specifying VideoFrameCopyToOptions.format and VideoFrameCopyToOptions.colorSpace make it possible to convert frames to RGB pixel format by calling VideoFrame.copyTo() without having to use an extra canvas.
Explainer: https://gist.github.com/Djuffin/9e2f98025ead49998524510cfeed8d33 Original spec issue: https://github.com/w3c/webcodecs/issues/92