ffmpeg.wasm
ffmpeg.wasm copied to clipboard
`ffmpeg.ffprobe` returns -1 although there is no error
Describe the bug
When I tried the command of ffmpeg.ffprobe, I encountered an error return. The correct return should be 0, but actually it returned -1. The version I used is [email protected].
To Reproduce https://ffmpegwasm.netlify.app/docs/api/ffmpeg/classes/FFmpeg#ffprobe
const ffmpeg = new FFmpeg();
await ffmpeg.load();
await ffmpeg.writeFile("video.avi", ...);
// Getting duration of a video in seconds: ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 video.avi -o output.txt
const error = await ffmpeg.ffprobe(["-v", "error", "-show_entries", "format=duration", "-of", "default=noprint_wrappers=1:nokey=1", "video.avi", "-o", "output.txt"]);
// the error is -1
const data = ffmpeg.readFile("output.txt");
Expected behavior
0 if no error, != 0 if timeout (1) or error.
I have the same issue.
any solution out there, facing the same issue