3 ms·
I'm using this in a current project and it really is great to be able to do things in the browser that would otherwise require a nontrivial native client. One l
by kentlyons 4y ago
I'm using this in a current project and it really is great to be able to do things in the browser that would otherwise require a nontrivial native client. One limitation I'd like to figure out how to get around is the 2GB file size limit. According to the docs, this is a WebAssembly limitation? It's not hard to find videos that cross that size.
- terpimost 4y agoYou would need to stitch blocks on a server
- kentlyons 4y agoI'm not sending the video server side - it is all done in the browser.
- nickdnickd 4y agohe might be referring to files over 2GB?
- kentlyons 4y agoApologies - let me try and be more clear. The user loads a local movie into the browser, and the browser then processes locally with ffmpeg. The movie started on the client and stays there. If it is less than 2GB then no problems. If it is larger then it hits this limitation. (I am taking the results from ffmpeg and sending those server side, but those results are always << 2GB and therefore no issues). Maybe the suggestion is to only load < 2GB into ffmpeg in the browser? I could see how that would work for the 1st chunk. But the 2nd one and beyond would not be valid.
- amythical666 4y agoI found this https://github.com/ffmpegwasm/ffmpeg.wasm#what-is-the-maximum-size-of-input-file https://github.com/ffmpegwasm/ffmpeg.wasm#what-is-the-maximu... the inputfile needs a uint8 array, which i tried converting file to uint8 but that gives a file format error and doesnt process the ffmpeg command
- amythical666 4y agohttps://github.com/ffmpegwasm/ffmpeg.wasm#what-is-the-maximum-size-of-input-file https://github.com/ffmpegwasm/ffmpeg.wasm#what-is-the-maximu... I looked at the ffmpeg inputfile and its a uint8, converted a file object to uint8 did not work too - gives a file format error! any updates on this?
- azakai 4y agoThere used to be 2GB limitations both on JS typed arrays and on the size of wasm memory, so this might refer to either or both of those. But browsers have been fixing that, here is Chrome doing so back in 2020: https://v8.dev/blog/4gb-wasm-memory https://v8.dev/blog/4gb-wasm-memory (Note that as mentioned there you need to build the wasm with that support, like -sMAXIMUM_MEMORY=4GB in Emscripten, so ffmpeg.wasm would need that, if it hasn't added it already.)
- rasz 4y agoHow slow is it? And why bother when you could run ffmpeg natively and just send it commands from the browser (even suing something as primitive as custom URI)
- Tepix 4y agoIt varies, some things are about 30% of native speed on my system (converting an vp8 mp4 to webm), some things are slower.