Skip to content

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

Open
@nei1ee

Description

@nei1ee

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions