mudler/LocalAI · error

ffmpeg exited with status %d

Error message

ffmpeg exited with status %d

What it means

The ffmpeg subprocess exited non-zero during video muxing. Guard: capture ffmpeg stderr, include it in the error, and clean up partial output files on failure.

Source

Thrown at backend/go/stablediffusion-ggml/cpp/gosd.cpp:1347

                return 1;
            }
            p += n;
            remaining -= (size_t)n;
        }
    }
    close(pipefd[1]);

    int status = 0;
    while (waitpid(pid, &status, 0) < 0) {
        if (errno != EINTR) {
            perror("waitpid");
            if (have_audio) unlink(wav_path);
            return 1;
        }
    }
    if (have_audio) unlink(wav_path);
    if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
        fprintf(stderr, "ffmpeg exited with status %d\n", status);
        return 1;
    }
    return 0;
}

int gen_video(sd_vid_gen_params_t *p, int steps, char *dst, float cfg_scale, int fps, char *init_image, char *end_image) {
    if (!p) return 1;
    if (!dst || strlen(dst) == 0) {
        fprintf(stderr, "gen_video: dst is empty\n");
        std::free(p);
        return 1;
    }

    std::vector<int> skip_layers = {7, 8, 9};

    fprintf(stderr, "Generating video: %dx%d, frames=%d, fps=%d, steps=%d, cfg=%.2f\n",
            p->width, p->height, p->video_frames, fps, steps, cfg_scale);

View on GitHub (pinned to 44413a9d06)

Solutions

  1. Run the same ffmpeg command manually to see the full error output.
  2. Verify ffmpeg is installed and supports the requested codecs/formats.
  3. Check input files, disk space, and permissions used by the mux step.

When it happens

Trigger: Thrown at backend/go/stablediffusion-ggml/cpp/gosd.cpp:1347 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of mudler/LocalAI@44413a9d06 (2026-08-15). Data as JSON: /api/errors/e693c299e75ea654. Report an issue: GitHub.