Great work on this - I made a terminal command similar to this (llmpeg), and was actively trying to get exactly this working - a webasm compiled version of ffmpeg that could encode in the browser. I for the life of me couldn't get the provided examples on https://github.com/ffmpegwasm/ffmpeg.wasm to run.
Just for my own development curiosity, was there anything specific you had to do to get ffmpegwasm to work?
The creator of that repo has a blog with some posts on building a wasm version of FFmpeg, I mostly followed those: https://jeromewus.medium.com/
I also used some of their scripts for building the 3rd-party libraries.
It took a bit of trial and error to see which versions of the different libraries and build tools work together.
Just for my own development curiosity, was there anything specific you had to do to get ffmpegwasm to work?