3 ms·
Surely you mean WebCodecs rather than WebGL/WebGPU? AFAIK no encoding primitives are exposed by WebGL/WebGPU. The advantage of shipping an encoder in WebAssemb
by paulgb 3y ago
Surely you mean WebCodecs rather than WebGL/WebGPU? AFAIK no encoding primitives are exposed by WebGL/WebGPU.
The advantage of shipping an encoder in WebAssembly for is that you don’t have to rely on the browser supporting the specific codec you want. e.g. Safari and Firefox don’t yet support WebCodecs at all, but do support WebAssembly.
- pjmlp 3y agoI really mean WebGL/WebGPU and using shaders instead of C and C++, while being GPU accelerated. For a small taste, "Meet Leon - superfast GPU-accelerated (WebGL) mpeg1-like video decoder in JavaScript" https://www.easy-bits.com/mpeg1video-decoder-webgl-gpu https://www.easy-bits.com/mpeg1video-decoder-webgl-gpu See mpeg1video-decoder-webgl.js on developer tools.
- paulgb 3y agoOh interesting! I found this as well: https://jsmpeg.com/ https://jsmpeg.com/ I didn’t realize enough of the work in decoding mpeg was paralellizable enough to do on the GPU, let alone in the constrained world of WebGL, but apparently it is.