{"record":{"id":"a23ceff28ea0534e","repo":"mudler/LocalAI","slug":"ffmpeg-mux-failed-to-stage-audio-producing-silen","errorCode":null,"errorMessage":"ffmpeg_mux: failed to stage audio; producing silent video\\n","messagePattern":"ffmpeg_mux: failed to stage audio; producing silent video\\\\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/go/stablediffusion-ggml/cpp/gosd.cpp","lineNumber":1232,"sourceCode":"    int height = (int)frames[0].height;\n    int channels = (int)frames[0].channel;\n    const char* pix_fmt_in = (channels == 4) ? \"rgba\" : \"rgb24\";\n\n    char size_str[32];\n    char fps_str[32];\n    snprintf(size_str, sizeof(size_str), \"%dx%d\", width, height);\n    snprintf(fps_str, sizeof(fps_str), \"%d\", fps);\n\n    // Optional audio: write a temp WAV file if the model produced audio.\n    char wav_path[64] = {0};\n    bool have_audio = false;\n    if (audio && audio->data && audio->sample_count > 0 && audio->channels > 0 && audio->sample_rate > 0) {\n        if (write_planar_float_wav(audio, wav_path, sizeof(wav_path)) == 0) {\n            have_audio = true;\n            fprintf(stderr, \"ffmpeg_mux: audio %u Hz × %u ch × %\" PRIu64 \" frames → %s\\n\",\n                    audio->sample_rate, audio->channels, audio->sample_count, wav_path);\n        } else {\n            fprintf(stderr, \"ffmpeg_mux: failed to stage audio; producing silent video\\n\");\n        }\n    }\n\n    int pipefd[2];\n    if (pipe(pipefd) != 0) {\n        perror(\"pipe\");\n        if (have_audio) unlink(wav_path);\n        return 1;\n    }\n\n    pid_t pid = fork();\n    if (pid < 0) {\n        perror(\"fork\");\n        close(pipefd[0]); close(pipefd[1]);\n        if (have_audio) unlink(wav_path);\n        return 1;\n    }\n","sourceCodeStart":1214,"sourceCodeEnd":1250,"githubUrl":"https://github.com/mudler/LocalAI/blob/44413a9d06bf5bc52ce088ba8ca74e5a2e8bee26/backend/go/stablediffusion-ggml/cpp/gosd.cpp#L1214-L1250","documentation":"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.","triggerScenarios":"Thrown at backend/go/stablediffusion-ggml/cpp/gosd.cpp:1232 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the audio file exists, is readable, and in a supported format.","Check disk space and permissions in the staging directory.","If audio is optional, proceed with the silent video or fix the audio input."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"44413a9d06bf5bc52ce088ba8ca74e5a2e8bee26","analyzedAt":"2026-08-15T10:13:50.291Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}