import type { Composition } from "../shared/composition.js";
/**
 * Build the comma-chained `atempo=` filter expression for any speed in
 * [0.1, 4.0]. ffmpeg's per-instance atempo is constrained to [0.5, 2.0],
 * so we decompose:
 *   - speed >= 1: repeated 2.0 stages until remainder ∈ [1.0, 2.0]
 *   - speed <  1: repeated 0.5 stages until remainder ∈ [0.5, 1.0]
 * For speed exactly 1.0, returns the no-op "atempo=1.0".
 *
 * Examples:
 *   chainAtempo(2.0)  → "atempo=2.0000"
 *   chainAtempo(4.0)  → "atempo=2.0000,atempo=2.0000"      (2.0 × 2.0 = 4.0)
 *   chainAtempo(0.5)  → "atempo=0.5000"
 *   chainAtempo(0.1)  → "atempo=0.5000,atempo=0.5000,atempo=0.4000"  (3-stage)
 *   chainAtempo(3.0)  → "atempo=2.0000,atempo=1.5000"
 */
export declare function chainAtempo(speed: number): string;
/**
 * Build the ffmpeg argv for a single clip's speed pre-pass.
 *
 *   ffmpeg -y -loglevel error -i {input} \
 *     -filter_complex "[0:v]setpts=PTS/{speed}[v];[0:a]<chainAtempo>[a]" \
 *     -map "[v]" -map "[a]" {output}
 */
export declare function buildSpeedRampFilterArgs(input: string, output: string, speed: number): string[];
/**
 * Spawn ffmpeg, collect stderr, reject on non-zero or abort.
 * Mirrors the pattern from runEncodeStage (Phase 7.A).
 */
export declare function runSpeedRampPass(input: string, output: string, speed: number, signal?: AbortSignal): Promise<void>;
/**
 * Pre-Remotion stage. For each VideoClip with a STATIC non-1 speed, runs
 * the setpts/atempo pass and rewrites clip.src to point at the resampled
 * cache file. For VARIABLE speed (D6), logs a warning and leaves the
 * clip unchanged. For speed=1 / no speed keyframes, the clip is also
 * left untouched.
 *
 * Caching: output goes to `{workDir}/clip-{id}-speed-{round(k*100)}.mp4`.
 * If the file already exists we skip the ffmpeg invocation — this keeps
 * re-runs cheap (D-pitfall in plan).
 *
 * Never mutates the input composition; returns a deep-cloned comp with
 * affected `clip.src` rewritten. Mirrors the `applyProxy` idiom from
 * Phase 7.C.
 */
export declare function applySpeedRampPrePass(comp: Composition, workDir: string, signal?: AbortSignal): Promise<Composition>;
//# sourceMappingURL=speed-ramp-ffmpeg.d.ts.map