w3c / webcodecs

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

Is there a way to keep and process chunks in WASM only #148

Closed st1992 closed 3 years ago

st1992 commented 3 years ago

If we pass a WASM function as the callback to the encoder, will it be good for my performance or will it not make any difference.

chcunningham commented 3 years ago

I expect it wouldn't make any difference. @ecmziegler to confirm

padenot commented 3 years ago

How would that work? https://github.com/WebAssembly/design/issues/1162 isn't solved, so there is a copy, so it's slower. Of course then you can use WASM to process the encoded packet, but this really is orthogonal to Web Codecs.

aboba commented 3 years ago

@sumeet-tiwari-samespace Applications which formerly used WASM for video encode/decode are moving to WebCodecs, because of the improved performance. So while WASM is viable for audio encode/decode, it will not improve performance in video encode/decde, even with WASM SIMD and a Dedicated Worker.

padenot commented 3 years ago

I think this is about post-processing the packets/frames in WASM, right ? Not really encoding/decoding in WASM.

st1992 commented 3 years ago

yes @padenot

padenot commented 3 years ago

Then I'd just say that it works today, but it might work better at some point if/when https://github.com/WebAssembly/design/issues/1162 is designed and implemented and shipped.

Because this is not a Web Codecs issues, I'm closing this, but please feel free to open more issues if needed. Thanks!