mudler/LocalAI · error

ffmpeg_mux: failed to stage audio; producing silent video\n

Error message

ffmpeg_mux: failed to stage audio; producing silent video\n

What it means

Staging the audio track for muxing failed, so a silent video is produced. Guard: log the underlying cause and surface a warning to the caller so silent output is not mistaken for success.

Source

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

    int height = (int)frames[0].height;
    int channels = (int)frames[0].channel;
    const char* pix_fmt_in = (channels == 4) ? "rgba" : "rgb24";

    char size_str[32];
    char fps_str[32];
    snprintf(size_str, sizeof(size_str), "%dx%d", width, height);
    snprintf(fps_str, sizeof(fps_str), "%d", fps);

    // Optional audio: write a temp WAV file if the model produced audio.
    char wav_path[64] = {0};
    bool have_audio = false;
    if (audio && audio->data && audio->sample_count > 0 && audio->channels > 0 && audio->sample_rate > 0) {
        if (write_planar_float_wav(audio, wav_path, sizeof(wav_path)) == 0) {
            have_audio = true;
            fprintf(stderr, "ffmpeg_mux: audio %u Hz × %u ch × %" PRIu64 " frames → %s\n",
                    audio->sample_rate, audio->channels, audio->sample_count, wav_path);
        } else {
            fprintf(stderr, "ffmpeg_mux: failed to stage audio; producing silent video\n");
        }
    }

    int pipefd[2];
    if (pipe(pipefd) != 0) {
        perror("pipe");
        if (have_audio) unlink(wav_path);
        return 1;
    }

    pid_t pid = fork();
    if (pid < 0) {
        perror("fork");
        close(pipefd[0]); close(pipefd[1]);
        if (have_audio) unlink(wav_path);
        return 1;
    }

View on GitHub (pinned to 44413a9d06)

Solutions

  1. Verify the audio file exists, is readable, and in a supported format.
  2. Check disk space and permissions in the staging directory.
  3. If audio is optional, proceed with the silent video or fix the audio input.

When it happens

Trigger: Thrown at backend/go/stablediffusion-ggml/cpp/gosd.cpp:1232 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/a23ceff28ea0534e. Report an issue: GitHub.