import type { TimelineSegment } from './types.js'; /** * Convert a duration in seconds to FCPXML's rational form, snapped to the * nearest frame boundary. * * Example: `toRationalTime(181.04, 24)` → `"4345/24s"`. */ export declare function toRationalTime(seconds: number, fps: number): string; /** * Convert a duration in seconds to an integer frame count. * * Premiere's xmeml v5 uses integer frames for `start` / `end` / `in` / `out` * fields — NOT the rational FCPXML form. */ export declare function toFrames(seconds: number, fps: number): number; /** * Convert a filesystem path to a `file://` URI. URI-encodes spaces and most * special characters but leaves `/` and `:` alone. * * Used by FCPXML 1.10 (``) and Premiere xmeml v5 (``). * The DaVinci exporter has its own variant that avoids URI encoding for * non-ASCII paths on Linux Resolve versions. */ export declare function pathToFileUri(p: string): string; /** * Build the `src` value for a media reference, either an absolute `file://` * URI or a path RELATIVE to the XML document's directory. * * Relative form (e.g. `./scene-001/shot-001.mp4`) is what makes an exported * timeline portable: Apple's FCPXML `media-rep` spec explicitly allows a URL * "relative to the location of the FCPXML document", and DaVinci Resolve / * Premiere honor it too. As long as the `.fcpxml` travels with its media in * the same relative layout (the harness always writes it beside `scene-001/` * and `audio/`), the media resolves on any machine. Absolute paths never * survive a move without a manual relink. * * @param relativeTo When set, emit a relative path from this directory. * When omitted, emit an absolute `file://` URI. * @param encode URI-encode the result (true for FCPXML/Premiere; false * for the DaVinci variant, which takes raw paths). */ export declare function pathToMediaSrc(p: string, opts?: { relativeTo?: string; encode?: boolean; }): string; /** * Escape a string for inclusion in XML text or attribute values. * * Handles the five XML entity characters. Suitable for both element content * and attribute values; the result is safe to drop into either context. */ export declare function xmlEscape(s: string): string; /** * ffprobe wrapper returning normalized audio info for a single file. * * Returns sane defaults (48 kHz / stereo) if the probe fails or the file * has no audio stream. The FCPXML 1.10 exporter requires both * `audioRate` and `audioChannels` on every `` declaration; lying * about either is fine as long as the values exist. */ export declare function probeAudioInfo(path: string): Promise<{ durSec: number; sampleRate: number; channels: number; }>; /** * Locate the spine segment index that contains a given timeline timestamp. * * Past-end timestamps clamp to the last segment so off-by-frame audio * placement at the very end of the episode still emits a clip rather than * being dropped. */ export declare function segmentContaining(segments: TimelineSegment[], timeSec: number): number; //# sourceMappingURL=probe.d.ts.map