videosphere
    Preparing search index...
    • Builds ffmpeg arguments for a whole-selection encode, written directly to MP4. Used only when the requested range sits inside a single GOP (no keyframe in between), so this always covers a short span — never the full clip — even for long selections.

      Uses a fast input-level seek (-ss before -i) so ffmpeg doesn't have to decode from the start of a long source file just to reach a cut that starts deep into it, combined with -copyts so the source's original absolute timestamps survive that seek — the trim filter graph below then cuts on those same absolute timestamps regardless of exactly which keyframe the fast seek actually landed on.

      Parameters

      • inputPath: string

        Source media path.

      • outputPath: string

        Output media path.

      • startSeconds: number

        Trim start in seconds within the source file.

      • endSeconds: number

        Trim end in seconds within the source file.

      • frameRateRational: string

        Target fps as an ffprobe-style rational.

      • audioSampleRate: number

        Target audio sample rate in Hz.

      Returns string[]

      ffmpeg argument vector.