362 points · by pier25 · 6y ago · 125 comments
So yes, with or without wasm, people will roll their own ways of trying to get your attention.
Curious about the performance though. Would love to see benchmarks vs a standard ffmpeg install.
Basically I'd like to see something like Handbrake on the web, maybe even simpler interface.
Emsriptens proxy_to_thread option doesn't transfer the document context correctly, so calls from SDL to change canvas size, mouse scroll events, etc, all error. I just had to comment those lines out.
But then the program would infinitely lock because a mutex would not return when a pthread was created. It would just spin on mutex.wait, and there were no errors in the thread creation as I tracked it line by line.
Then debugging randomly wouldn't compile anymore.
There's a whole blog I'll write on it but the summary is that emscripten is cool, but the quality of it's features isn't ready to simply cross compile without the underlying code supporting it.
I would be interested to sponsor development of a project that could reliably play large video files with different formats in the browser. I'd use it adapt our Chrome extension ('Language Learning with Netflix') into a website/SPA that could load in local video files, so you could study with movies from your hard drive. Contact email is in my profile. :-)
https://github.com/ffmpegwasm/ffmpeg.wasm-core/tree/n4.3.1-w...
If you wanted to run a YouTube competitor you would likely require better compression, which would take even longer. Now think about it running in the browser, which likely slows it down even more.
You upload a 10 minute clip and then your browser eats 100% of the CPU for the next hour.
And all of that is just for one quality setting.
It may be trivial for Youtube or Netflix, certainly not from a consumer's perspective.
As for SEGA, AOL, and IE, they never had any real stronghold (like a lock-in), they just had the users - those are easier to switch to something new. Games for example go stale, and you don't care that much for your older played games - you want the new shiny. A browser, you switch over, and you have everything you did before, including your bookmarks. AOL, had it's stronghold when the internet was 1/100 of what it is now.
I can see the internet going 100x larger now (except if it goes to 80 billion people out of the 8 billion on Earth).
> Your browser doesn't support SharedArrayBuffer, thus ffmpeg.wasm cannot execute. Please use latest version of Chromium or any other browser supports SharedArrayBuffer.
Really great work though, and I'm sure it will help a lot of people!
I'd love to see a FFmpeg compilation to WASI, so it can be run also standalone in server-side runtimes (such as Wasmer or WAVM). I wonder if threads would made a WASI compilation more challenging?
It's true that the speed will be a bit slower (I expect to be 5-10% slower than native), but in some cases the gains could outweight the relative slowdown.
It was still asm.js but working just fine.
- a webassembly blob
- a javascript wrapper to call the webassembly's functions from js in a practical way.
The repo in this thread depends on another package which is the actual bulk of work: https://github.com/ffmpegwasm/ffmpeg.wasm-core (fork of ffmpeg with emmake in a build script).
There definitely does seem to be some other work in there in terms of getting it to actually work though. And tests.