ffmpeg.wasm
ffmpeg.wasm copied to clipboard
RuntimeError: memory access out of bounds compress error
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
Desktop (please complete the following information):
- OS: [Windows 11 Pro]
- Browser [Chrome]
- Version [Version 121.0.6167.140 (Official Build) (64-bit)]
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
I can repro on a macintel. vp9 codec. mp4 to webm.
Memory out-of-bounds error with vp9 is also reproducible via the playground:
https://ffmpegwasm.netlify.app/playground
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
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
thanks, your solution works, but why?
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
thanks, your solution works, but why?
ugh, I don't remember, I tried different combinations of codecs, these seem to be perfect