Full argument list
OptionalparseIf true, emit progress= events by parsing stderr key=value blocks
OptionaltotalKnown total duration in microseconds (for percent calculation)
OptionalcwdWorking directory for the spawned process
OptionaltimeoutTimeout in milliseconds. If exceeded, the process is killed and an error is emitted.
OptionalsignalAbort the encode from the outside.
When the signal fires the child is killed with the same escalating sequence a timeout uses, and the process emits an FFmpegAbortError. A signal that is already aborted causes spawnFFmpeg to throw before any process is created, so a cancelled request never leaves a stray ffmpeg behind.
OptionalkillMilliseconds to wait after SIGTERM before escalating to SIGKILL.
Defaults to 2000. Set to 0 to kill immediately.
Escalation is not optional in practice: a child that installs a SIGTERM
handler (or ignores the signal) otherwise survives a cancel or a timeout
indefinitely.
OptionalkillKill the child's entire process group rather than just the process. Defaults to true on POSIX, where it is what makes grandchildren die too. Ignored on Windows.
OptionalautoRegister this child with the library's exit/SIGINT/SIGTERM cleanup so it cannot outlive the host process. Defaults to true.
Turn it off only when the caller owns the child's lifetime.
OptionalonReceives structured lifecycle events for this child.
OptionalloggerEmit a debug log line when the child starts.
OptionalstdioHow to wire the child's standard streams.
Defaults to all pipes, which is what the event API needs. Override it when
the caller manages the streams directly — notably a CLI piping ffmpeg's
output to its own stdout, which must use inherit: a piped stdout nobody
drains fills the 64 KiB OS buffer and deadlocks ffmpeg mid-encode.
Path to the ffmpeg binary