import type { ModelArkModelLimits, ModelArkReferencePlan } from './modelark.js'; /** A local image at or below this size is inlined as base64 instead of hosted. */ export declare const MODELARK_INLINE_IMAGE_MAX_BYTES: number; /** Raw bytes one scene may inline in total (well under the vendor's 64 MB request cap after base64 growth). */ export declare const MODELARK_INLINE_BUDGET_BYTES: number; /** Vendor input caps (create-task reference, 2026-09-21). */ export declare const MODELARK_INPUT_LIMITS: { readonly imageMaxBytes: number; readonly videoMaxBytes: number; readonly audioMaxBytes: number; }; export interface ModelArkReferenceDeps { /** Upload a local file to a public URL. Default: `hostPublicUrl`. */ hostFile: (path: string) => Promise; statSize: (path: string) => Promise; readBytes: (path: string) => Promise; /** * Length of a video/audio source in seconds — a local file or a remote * `http(s)://` URL (ffprobe by default, which reads both). May throw; the * caller words the refusal. A remote probe is bounded by * `MODELARK_REMOTE_PROBE_TIMEOUT_MS`. */ probeDurationSeconds: (path: string) => Promise; /** * A video source's stored width, height and frame rate (ffprobe by default, * sharing one probe with the length). May throw; the caller words the * refusal. Only called for video references. */ probeVideoShape: (path: string) => Promise; } export interface ModelArkVideoShape { width?: number; height?: number; /** Nominal frame rate (`r_frame_rate`). */ fps?: number; /** Average frame rate (`avg_frame_rate`); differs from `fps` on variable-frame-rate footage. */ avgFps?: number; /** Normalised container: mp4, mov, mkv, webm, avi, … */ container?: string; videoCodec?: string; audioCodec?: string; } /** The slowest rate measured accepted (24000/1001); the floor sits just under it. */ export declare const MODELARK_MEASURED_MIN_FPS = 23.976; /** * The reference-video limits from the vendor's two pages (the API reference's * "Video requirements" with its container/encoding table, and the Seedance 2.5 * tutorial, read 2026-09-22). Both state the dimensions, pixel count, aspect, * frame rate, and .mp4/.mov with H.264/H.265 video and AAC/MP3 audio. PCM audio * in .mov comes from the tutorial alone (it is also what ModelArk's own .mov * output carries); the API reference lists AAC/MP3 only, so PCM is accepted in * .mov on the tutorial's word. The pages also disagree on the resolution TIER * (API reference: 480p, 720p, 1080p, 4k; tutorial: 480p, 720p), so the tier is * left to the vendor. */ export declare const MODELARK_VIDEO_SHAPE_LIMITS: { readonly minSide: 300; readonly maxSide: 6000; readonly minPixels: 407696; readonly maxPixels: 8295044; readonly minAspect: 0.4; readonly maxAspect: 2.5; /** * The vendor's pages say 24–60. 23.976 (24000/1001, the standard film * cadence, and what every 24p camera and NLE actually writes) was MEASURED * accepted on 2026-09-23: task `cgt-20260923053323-d63gs`, Seedance 2.5 in * omni mode with a 720p reference, rendered — see * `docs/audits/2026-09-23-live-acceptance.md`. This table gates the 2.0 * models too, which share the floor untested; the asymmetry is what makes * that acceptable, since this check runs BEFORE submit and a shape the * vendor refuses comes back as a free 400, while the old floor bounced valid * 24p footage with a lossy re-encode instruction. Nothing below 23.9 opens up. */ readonly minFps: 23.9; readonly maxFps: 60; readonly containers: readonly ["mp4", "mov"]; readonly videoCodecs: readonly ["h264", "hevc"]; /** Per container: .mp4 takes AAC or MP3; .mov also takes PCM (the tutorial's table; the API reference lists AAC/MP3 only). */ readonly audioCodecs: { readonly mp4: readonly ["aac", "mp3"]; readonly mov: readonly ["aac", "mp3", "pcm"]; }; }; /** ffprobe's `r_frame_rate` ("24/1", "30000/1001") as a number; undefined when unreadable. */ export declare function parseFrameRate(value: string | undefined): number | undefined; /** Every way a reference video's shape breaks the vendor's limits, worded for the operator; empty when it fits. */ export declare function modelArkVideoShapeProblems(shape: ModelArkVideoShape): string[]; /** How long a remote reference may take to answer ffprobe before the submit refuses it. */ export declare const MODELARK_REMOTE_PROBE_TIMEOUT_MS = 20000; /** * Words a failed probe. Node's execFile timeout rejects with `killed: true` * and a message that never says "timeout" (and an empty stderr on a hang), so * without this a dropped host reads exactly like a refused connection. */ export declare function describeProbeFailure(error: unknown, timeoutMs: number): string; export declare function defaultModelArkReferenceDeps(env?: NodeJS.ProcessEnv, options?: { remoteProbeTimeoutMs?: number; }): ModelArkReferenceDeps; export interface MaterializedModelArkReference { source: string; url: string; delivery: 'passthrough' | 'inline' | 'hosted'; } export declare function isRemoteModelArkReference(source: string): boolean; /** * Resolve every planned reference of one scene, in order. Throws before any * upload when a local file is missing, over the vendor's size cap, a video is * shorter than the model allows, or the combined video+audio length exceeds * the model's reference budget. A remote `http(s)://` video or audio source * is MEASURED too (ffprobe reads a URL), since the vendor's reference-seconds * budget counts it the same as a local clip: before #604 item 8 it contributed * 0 here and the vendor refused at create instead of this preflight. Its byte * size stays the vendor's to check. Every video reference (local or remote) is * also held to the vendor's dimension, pixel-count, aspect and frame-rate * limits (`MODELARK_VIDEO_SHAPE_LIMITS`). A ModelArk `asset://` source cannot * be probed and is trusted as given. */ export declare function materializeModelArkReferences(sceneIndex: number, refs: readonly ModelArkReferencePlan[], limits: Pick, deps: ModelArkReferenceDeps): Promise; //# sourceMappingURL=modelark-references.d.ts.map