/**
 * @module _shared/video-utils
 * @description Shared helpers for the script-to-video pipeline:
 * StoryboardSegment type, retry constants, ImgBB upload, FFmpeg/Kling
 * video extension, error logging, and the generic wait-for-completion
 * loop. Split out of `ai-script-pipeline.ts` in v0.69 (Plan G Phase 4).
 */
import type { KlingProvider, RunwayProvider } from "@vibeframe/ai-providers";
/** A single scene segment from the Claude-generated storyboard. */
export interface StoryboardSegment {
    /** 1-based scene index (assigned during generation) */
    index?: number;
    /** Narrative description of the scene */
    description: string;
    /** Visual prompt for image/video generation */
    visuals: string;
    /** Art style directive (e.g. "cinematic", "anime") */
    visualStyle?: string;
    /** Character appearance description for consistency */
    characterDescription?: string;
    /** Reference to previous scene for continuity */
    previousSceneLink?: string;
    /** Voiceover narration text */
    narration?: string;
    /** Audio direction (e.g. "upbeat music") */
    audio?: string;
    /** Text lines to overlay on the video */
    textOverlays?: string[];
    /** Scene duration in seconds (updated to match narration) */
    duration: number;
    /** Cumulative start time in seconds */
    startTime: number;
}
/** Default retry count for video generation API calls. */
export declare const DEFAULT_VIDEO_RETRIES = 2;
/** Delay between retries in milliseconds. */
export declare const RETRY_DELAY_MS = 5000;
/** Sleep helper. */
export declare function sleep(ms: number): Promise<void>;
/**
 * Upload image to ImgBB and return the URL.
 * Used for Kling v2.5/v2.6 image-to-video which requires URL (not base64).
 */
export declare function uploadToImgbb(imageBuffer: Buffer, apiKey: string): Promise<{
    success: boolean;
    url?: string;
    error?: string;
}>;
/**
 * Extend a video to target duration using Kling extend API when possible,
 * with fallback to FFmpeg-based extendVideoNaturally.
 *
 * When the extension ratio > 1.4 and a Kling provider + videoId are available,
 * uses the Kling video-extend API for natural continuation instead of freeze frames.
 */
export declare function extendVideoToTarget(videoPath: string, targetDuration: number, outputDir: string, sceneLabel: string, options?: {
    kling?: KlingProvider;
    videoId?: string;
    onProgress?: (message: string) => void;
}): Promise<void>;
/**
 * Log a provider failure to stderr. Centralizes the "what went wrong" output
 * so call sites stop silently dropping provider errors into failedScenes.
 */
export declare function logSceneFailure(provider: string, sceneLabel: string, err: unknown): void;
/**
 * Wait for video completion with retry logic.
 */
export declare function waitForVideoWithRetry(provider: KlingProvider | RunwayProvider, taskId: string, providerType: "kling" | "runway", maxRetries: number, onProgress?: (message: string) => void, timeout?: number): Promise<{
    videoUrl: string;
} | null>;
