Closed yangfangfang1204 closed 2 years ago
when use HTMLCanvasElement.toBlob or toDataURL to save the image , the image will be fuzzy .After a while the screen returned to normal, so I guess it was performance consuming.
<canvas>
is the only way to have the browser encode an image currently, as WebCodecs does not have an ImageEncoder
. It's possible that that might happen some day, but it's also possible to copy the VideoFrame
using copyTo()
, then encode it using any JS or WASM image encoder.
decode the video raw data by webcodecs ,and i got the videoframe , use drawimage api to display the videoframe . There is a need that save the image . it also could render the videoframe in canvas ,and use HTMLCanvasElement.toBlob or toDataURL to save the image ,but it is high performance overhead. so there is solution to save the image by VideoFrame ?