{"record":{"id":"a1ed32dad01a7256","repo":"mudler/LocalAI","slug":"generate-video-produced-no-frames","errorCode":null,"errorMessage":"generate_video produced no frames\n","messagePattern":"generate_video produced no frames\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/go/stablediffusion-ggml/cpp/gosd.cpp","lineNumber":1411,"sourceCode":"        init_buf = load_and_resize_image(init_image, p->width, p->height, &init_img);\n        if (!init_buf) { std::free(p); return 1; }\n    }\n    if (end_image && strlen(end_image) > 0) {\n        end_buf = load_and_resize_image(end_image, p->width, p->height, &end_img);\n        if (!end_buf) { if (init_buf) free(init_buf); std::free(p); return 1; }\n    }\n    p->init_image = init_img;\n    p->end_image  = end_img;\n\n    // Generate\n    int num_frames_out = 0;\n    sd_image_t* frames = nullptr;\n    sd_audio_t* audio = nullptr;\n    bool ok = generate_video(sd_c, p, &frames, &num_frames_out, &audio);\n    std::free(p);\n\n    if (!ok || !frames || num_frames_out == 0) {\n        fprintf(stderr, \"generate_video produced no frames\\n\");\n        if (audio) free_sd_audio(audio);\n        if (init_buf) free(init_buf);\n        if (end_buf) free(end_buf);\n        return 1;\n    }\n\n    fprintf(stderr, \"Generated %d frames, muxing to %s via ffmpeg\\n\", num_frames_out, dst);\n\n    int rc = ffmpeg_mux_raw_to_mp4(frames, num_frames_out, fps, audio, dst);\n\n    for (int i = 0; i < num_frames_out; i++) {\n        if (frames[i].data) free(frames[i].data);\n    }\n    free(frames);\n    if (audio) free_sd_audio(audio);\n    if (init_buf) free(init_buf);\n    if (end_buf) free(end_buf);\n","sourceCodeStart":1393,"sourceCodeEnd":1429,"githubUrl":"https://github.com/mudler/LocalAI/blob/44413a9d06bf5bc52ce088ba8ca74e5a2e8bee26/backend/go/stablediffusion-ggml/cpp/gosd.cpp#L1393-L1429","documentation":"Video generation completed but produced zero frames. Guard: check frame count after generation and report an internal error instead of muxing an empty video.","triggerScenarios":"Thrown at backend/go/stablediffusion-ggml/cpp/gosd.cpp:1411 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check earlier log lines for frame-generation errors.","Verify the video model loaded correctly and parameters (num frames, resolution) are valid.","Ensure sufficient memory/VRAM to generate frames."],"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-15T22:17:37.221Z"}