ffmpegwasm / ffmpegwasm/ffmpeg.wasm
Support for the browsers native encoder/decoder api
- 主要语言
- C
- 星标
- 17.8k
- 派生
- 1.1k
- PR 合并指标
- 30 天内没有已合并 PR
描述
I just heared that chrome added an API to support raw native h264 encode and decode.
https://caniuse.com/mdn-api_videoencoder
https://caniuse.com/mdn-api_videodecoder
https://caniuse.com/mdn-api_audioencoder
https://caniuse.com/mdn-api_audiodecoder
https://github.com/vjeux/mp4-h264-re-encode
I'm not too familiar with emscripten, but it looks like it is possible to [share memory between javascript and c](https://emscripten.org/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html#access-memory-from-javascript).
So my idea is to implement those decoder/encoder apis into ffmpeg as sort of an hardware acceleration.
This could resolve some of the "slow" tickets like: https://github.com/ffmpegwasm/ffmpeg.wasm/issues/326 https://github.com/ffmpegwasm/ffmpeg.wasm/issues/206
It could also make it viable to run ffmpeg single core and avoid the isolation requirements: https://github.com/ffmpegwasm/ffmpeg.wasm/issues/285
We'd still have the c implementation of said codecs as a fallback, the demuxers and muxers and we'd still have all the filters of ffmpeg. So I think it is still worth it to use ffmpeg.
贡献指南
评估
这个 Issue 还没有评估数据。