mediaforge - v2.2.0
    Preparing search index...

    Interface RunOptions

    Options accepted by FFmpegBuilder.run and FFmpegBuilder.spawn.

    interface RunOptions {
        parseProgress?: boolean;
        totalDurationUs?: number;
        timeout?: number;
        signal?: AbortSignal;
        killGracePeriodMs?: number;
        killProcessGroup?: boolean;
        retry?: RetryOptions;
        logger?: MediaForgeLogger;
        onDiagnostic?: DiagnosticHook;
        validate?: boolean;
    }
    Index

    Properties

    parseProgress?: boolean

    Parse -progress blocks into progress events.

    totalDurationUs?: number

    Known total duration in microseconds, used to compute info.percent.

    timeout?: number

    Kill the encode after this many milliseconds.

    signal?: AbortSignal

    Cancel the encode from the outside.

    killGracePeriodMs?: number

    Milliseconds between SIGTERM and the SIGKILL escalation. Defaults to 2000.

    killProcessGroup?: boolean

    Kill the child's whole process group. Defaults to true on POSIX.

    retry?: RetryOptions

    Retry the run on failure. Off by default: an ffmpeg failure is nearly always deterministic, so retrying usually just burns the same CPU twice.

    Only safe when the output is written atomically — otherwise a retry operates on the truncated file the failed attempt left behind.

    withAtomicOutput

    Log lifecycle events. Defaults to the library-wide logger.

    onDiagnostic?: DiagnosticHook

    Receives structured lifecycle events. Defaults to the library-wide hook.

    validate?: boolean

    Reject before spawning when an input path does not exist, is unreadable, or is a directory. Defaults to false.

    Off by default because this library accepts ffmpeg input syntax — URLs, pipe:0, lavfi: graphs, concat: lists — that is not a filesystem path, and guessing wrong would break working calls. Turn it on for a service that only ever accepts local paths.