Wasm is rarely a solution and still has yet to be of much use. FFmpegs codecs are mostly hand written optimized assembly using advanced instruction sets not known to wasm. I crafted my own years ago but you're fighting a runtime that can never specifically leverage critical things like CPU cache.