denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
97.93k stars 5.39k forks source link

Suggestion: Support WebCodecs API #16803

Open sinclairzx81 opened 1 year ago

sinclairzx81 commented 1 year ago

Hi!

Just wanted to put a suggestion out there for the possible inclusion of the relatively new WebCodecs API within Deno (currently supported in Chromium).

This API offers Video, Audio and Image codecs and primarily works on Frames of UInt8Array (decoupled from anything DOM related). The image codecs in particular are quite appealing and may allow Deno to perform common image operations when used in tandem with WebGPU (without the requirement of native imaging dependencies), as well as allowing Deno to carry out video transcoding tasks (often requiring one to integrate with ffmpeg)

For consideration

randallb commented 10 months ago

I'm more likely to do an FFI shim to ffmpeg... it probably doesn't make sense for Deno to maintain its own video encoding / decoding lib when ffmpeg exists and is so widely supported.

remorses commented 2 months ago

You could use this repo as a starting point https://github.com/ennuicastr/libavjs-webcodecs-polyfill

swap libav.js with ffi calls to ffmpeg shared libraries