w3c / webcodecs

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

Failed to import texture from video frame that doesn't have back resource #708

Closed yangfangfang1204 closed 5 months ago

yangfangfang1204 commented 11 months ago

WebGPUDisplay.js:123 Uncaught (in promise) DOMException: Failed to execute 'importExternalTexture' on 'GPUDevice': Failed to import texture from video frame that doesn't have back resource

i test the web codecs demo renderer_webgpu.js

there is a error . Failed to import texture from video frame that doesn't have back resource

dalecurtis commented 11 months ago

Possibly this requires importVideoFrame which didn't ship with the base WebGPU release, but should be coming soon. I think you still need the flag that page says.

@sandersdan

sandersdan commented 11 months ago

With stable Chrome I see:

TypeError: Failed to execute 'importExternalTexture' on 'GPUDevice': VideoFrame isn't supported for importExternalTexture. This feature requires the WebGPUWebCodecs origin trial or --enable-webgpu-developer-features

With Canary, the video plays back as expected.

The specific error message given indicates that the VideoFrame was closed. It's possible that there is a timing issue with the sample or Chrome's WebGPU implementation, but more information is required to reproduce it.

If you believe there is a Chrome issue with importing VideoFrames, please file a bug at https://bugs.chromium.org/p/chromium/issues/entry.

padenot commented 5 months ago

Closing, as this appears to be an implementation bug. Please reopen or comment if that's not the case.