Closed xfq closed 2 years ago
(If it happens in chrome)
I suspect that the VideoFrame
you got from decoder is backed by CPU resources(Which means, the GPU decoder not works, because of profiles). One simple way to check this with chrome is that you could use HTMLVideoElement to play your video and use chrome://media-internals to see the decoder it uses.
I think it can be related to my issue - https://bugs.chromium.org/p/chromium/issues/detail?id=1272288 , which is fixed already and will be released in newer Chrome versions. Try Chrome Canary to compare performance. They already applied fix there.
(If it happens in chrome) I suspect that the
VideoFrame
you got from decoder is backed by CPU resources(Which means, the GPU decoder not works, because of profiles). One simple way to check this with chrome is that you could use HTMLVideoElement to play your video and use chrome://media-internals to see the decoder it uses.
kVideoDecoderName
is D3D11VideoDecoder
.
I think it can be related to my issue - https://bugs.chromium.org/p/chromium/issues/detail?id=1272288 , which is fixed already and will be released in newer Chrome versions. Try Chrome Canary to compare performance. They already applied fix there.
Thanks. drawImage
is faster in Chrome Canary, but texSubImage2D
is the same as before (the frame rate is still very low).
@xfq Would you mind to provide the use case and I can take a look at it. And you could file a chromium bug.
@shaoboyan The use case is volumetric video. See https://github.com/w3c/strategy/issues/286
Since it is possible to convert from Canvas 2D to CanvasTexture
in three.js, and this is really an impl issue, not a spec issue, I'll close it.
If you think we need a Chromium bug to track the texSubImage2D
performance issue, I can file one. Thank you for your help!
@xfq Yes, pls help to file a bug in chromium to track texSubImage2D
, thanks!
@xfq - just checking in on the chrome bug. Was it fixed as suspected by https://github.com/w3c/webcodecs/issues/421#issuecomment-990716303?
@chcunningham drawImage
was fixed, but texSubImage2D
is still slow. I have filed https://bugs.chromium.org/p/chromium/issues/detail?id=1279351
When using
VideoFrame
as the textures of Three.js, we found that it's very slow. When decoding a 3840x3840 video only, the frame rate is about 80fps; addingframe.clone()
it is still about 80fps. But after addingdrawImage
ortexSubImage2D
, the frame rate dropped to about 10fps:Can anyone point me in the right direction?