ffmpegwasm / ffmpegwasm/ffmpeg.wasm
RuntimeError: memory access out of bounds fixed after running invalid command
- Dominant language
- C
- Stars
- 17.8k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
For certain video files, when converting from video to images, ffmpeg will fail with `RuntimeError: memory access out of bounds`. However if `ffmpeg.exec` is run before, with an invalid command, the operation will succeed.
**To Reproduce**
```js
// for certain videos, fails with RuntimeError: memory access out of bounds
ffmpeg.exec(["-i", "movie.mp4", "-vf", `fps=1`, `/tmp/%02d.jpg`]);
// however the following will succeed
ffmpeg
.exec(["-i", "not-found"])
.then(() =>
ffmpeg.exec(["-i", "movie.mp4", "-vf", `fps=1`, `/tmp/%02d.jpg`])
);
```
**Expected behavior**
`ffmpeg.exec` should work the first time without having to execute an invalid command.
**Desktop (please complete the following information):**
- OS: Ubuntu 24.04
- Browser Chrome
- Version 132.0.6834.83
Contributor guide
Assessment
This issue has not been assessed yet.