ffmpeg.wasm icon indicating copy to clipboard operation
ffmpeg.wasm copied to clipboard

Can we load the compressed file of ffmpeg-core.wasm?

Open EbanShen opened this issue 2 years ago • 3 comments

Is your feature request related to a problem? Please describe. Every time I use it, I need to download a full file of more than 20MB, which makes the page load less efficient.

Describe the solution you'd like ffmpeg.load() can support the loading of ffmpeg-core.wasm compression package(such as: zip), so that the network is not good can quickly open and use the web page.

Describe alternatives you've considered Download the zip package into browser memory via JS and extract it, then load the local ffmpeg-core.wasm file. But at present, the scheme has not been debugged.

Additional context

EbanShen avatar Nov 17 '23 06:11 EbanShen

Probably, you are looking for this issue: https://github.com/ffmpegwasm/ffmpeg.wasm/issues/126 . This would give you more control of downloading the file.

Bessonov avatar Nov 17 '23 15:11 Bessonov

Probably, you are looking for this issue: #126 . This would give you more control of downloading the file.

Thank you very much for your reply. But the issue: #126 seems to have a certain gap with what I want to know. issue: #126 uses the official ffmpeg-core.wasm, with its own ffmpeg-core.js.

My ffmpeg-core.wasm and js files are generated by me. I expect ffmpeg-core.wasm to load on a web server as follows:

ffmpeg.load({
    coreURL: "xxxxxx/ffmpeg-core.js",
    wasmURL:  "xxxxxx/ffmpeg-core.wasm.zip"
})

This reduces the amount of time it takes for ffmpeg-core.wasm to load. Especially when the network is poor, the user experience can be guaranteed.

EbanShen avatar Nov 20 '23 01:11 EbanShen