ffmpeg.wasm
ffmpeg.wasm copied to clipboard
WebAssembly.Memory(): could not allocate memory
I have made a browser plug-in for "video download and encoding", which is used in Edge and Chrome browsers. The same product. Most users can use it smoothly. However, a small number of users will report an error 【RangeError: WebAssembly.Memory(): could not allocate memory】 What causes the error? For example, "System, Notebook, PC" ? Can we handle it?
I can't locate the cause of this error.
Only a small number of plug-in users will encounter this problem
use: ffmpeg.wasm v0.10.1
no problem on pc, on mobile chrome will got same error
@kkxlkkxllb same here do you know any hack or any solution for it
@EABangalore only way is Use single thread version
const ffmpeg = createFFmpeg({
mainName: 'main',
corePath: 'https://unpkg.com/@ffmpeg/[email protected]/dist/ffmpeg-core.js',
});
can run on chrome mobile
@kkxlkkxllb I try to use Use single thread version!
but,it error!
RuntimeError: abort(LinkError: WebAssembly.instantiate(): mismatch in shared state of memory, declared = 0, imported = 1). Build with -s ASSERTIONS=1 for more info.
how to fix it? please help. /(ㄒoㄒ)/~~
@kkxlkkxllb thank you very much for replying, what version of ffmpeg is compatible with corePath: 'https://unpkg.com/@ffmpeg/[email protected]/dist/ffmpeg-core.js',
as you answered above.
@TheSecondAkari what version of ffmpeg are you using .
@EABangalore ffmpeg.wasm v0.11.4
How to make it indexed to the right version。
I use it as this .
const ffmpeg = createFFmpeg({ mainName: 'main', corePath: 'https://unpkg.com/@ffmpeg/[email protected]/dist/ffmpeg-core.js', });
What else need to pay attention to?
@TheSecondAkari 你是在chrome mobile浏览器里测试的吗?如果是其他手机浏览器是会报错的,我在 chrome mobile里测试是成功的,单线程模式
@kkxlkkxllb 我使用的是台式电脑的chrome浏览器测试的
@kkxlkkxllb please don't mind still i'm in learning how can i install this https://unpkg.com/@ffmpeg/[email protected]/dist/ffmpeg-core.js
with npm
@kkxlkkxllb @EABangalore single thread version is right. It can fix. But it has another bug. #436
@TheSecondAkari have you found any solution for https://github.com/ffmpegwasm/ffmpeg.wasm/issues/436
@TheSecondAkari have you found any solution for #436
Turn it off, restart it, and run the second command. Although this is stupid, I only know this method now。