You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
robwalch
removed
the
Needs Triage
If there is a suspected stream issue, apply this label to triage if it is something we should fix.
label
Nov 21, 2022
itsjamie
changed the title
use Web AAssembly for decoding work
Use WebAssembly for decoding work
Nov 27, 2022
It's very possible that we could get some performance improvements by using WebAssembly, but I think there are a few things to do before embarking on this;
I think we would want to offer a ESM bundle if we were to include a Go/Rust/C++ WASM module. They all have relatively large allocators for the WASM portion, so we'd probably want to offer the complete transcode workflow via WASM, and remove the ability to toggle enableWorker for this build. Otherwise we'd end up with a lot of duplicate code to handle transmuxing and the WASM module to do the same. That means this build could also drop webpack-webworkify.
Additionally, we have to be very careful of falling into the trap that WASM is the magic bullet to fix performance problems. If we just translate our current code to WASM, we'll lose out on any major improvements, but have a entirely different language package to maintain.
Personally, I think if there was a WASM based transmuxer that could support MPEG-TS / MP4 that already existed, it would make a lot of sense to try it out, but it's a lot of work to get to a demo only to find out we have a lot of optimization work ahead to get something usable.
Is your feature request related to a problem? Please describe.
The only immediate problem is that hls.js Web Worker will consume 100% of the CPU.
Describe the solution you'd like
we can use
Go
orRust
to compile to WASM greatly increase the performance for decodingAdditional context
No response
The text was updated successfully, but these errors were encountered: