ffmpegwasm / ffmpeg.wasm

FFmpeg for browser, powered by WebAssembly
https://ffmpegwasm.netlify.app
MIT License
13.47k stars 776 forks source link

RuntimeError: memory access out of bounds compress error #679

Open CRIMSON-CORP opened 5 months ago

CRIMSON-CORP commented 5 months ago

Describe the bug When trying to use ffmpeg to convert mp4 to webm specifically, using the vp9 codec, i get this error "RuntimeError: memory access out of bounds" just after it starts the operation

To Reproduce Github Repository

Expected behavior i expect the compression to go on without issue, and if there is an issue, it should show how to resolve it

Screenshots image

Desktop (please complete the following information):

Additional context Im using a 16GB RAM Dell Precision 5520, i dont understand how im getting memory access out of bounds, seems to me like Chrome assigns a certain amount of memory to each tab, and the ffmpeg execution is exceeding it

spiceee commented 4 months ago

I can repro on a macintel. vp9 codec. mp4 to webm.

spiceee commented 4 months ago

Memory out-of-bounds error with vp9 is also reproducible via the playground:

https://ffmpegwasm.netlify.app/playground

Allespro commented 3 months ago

try to use this to convert mp4 to webm

await this.ffmpeg.exec([
    "-i", "input.mp4",
    "-fflags", "+genpts",
    "-preset", "ultrafast",
    "-c:v", "libvpx",
    "-c:a", "libvorbis",
    "-crf", "23",
    "-threads", "0",
    "output.webm",
]);

fixed memory out error using vorbis audio codec