Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffmpeg.ffprobe returns -1 although there is no error #817

Open
nei1ee opened this issue Jan 13, 2025 · 0 comments
Open

ffmpeg.ffprobe returns -1 although there is no error #817

nei1ee opened this issue Jan 13, 2025 · 0 comments

Comments

@nei1ee
Copy link

nei1ee commented Jan 13, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant