Optionalinput: string | string[]Override the ffmpeg binary path (default: FFMPEG_PATH env or 'ffmpeg')
Get (and cache) the version info for the current binary.
Get (and cache) the capability registry for the current binary.
Check if a codec is available in the current binary. Does not throw — returns a GuardResult.
Check if a feature is available by version gate + capability.
Select the best available video codec from a priority list. Returns null if none are available.
Select the best available hardware accelerator from a priority list.
Overwrite output files without asking (default: true)
Enable progress reporting on stderr
Add an input. Chainable input options follow.
Seek within the last-added input (fast seek, before -i)
Limit duration of the last-added input
Force format of the last-added input
Add (or switch to) an output path. Call before codec/filter options.
Set video codec, e.g. 'libx264', 'libx265', 'copy'
Set video bitrate, e.g. '2M', '4000k'
Set video frame rate
Set output video size, e.g. '1280x720' or '1280:720'
Set video filter chain (-vf)
Set pixel format
Set CRF value (codec-dependent)
Disable video stream
Set audio codec, e.g. 'aac', 'libopus', 'copy'
Set audio bitrate, e.g. '128k', '192k'
Set audio sample rate, e.g. 44100, 48000
Set number of audio channels
Set audio filter chain (-af)
Disable audio stream
Set subtitle codec
Disable subtitle stream
Force output format
Add stream mapping, e.g. '0:v:0', '0:a:1'
Limit output duration
Seek in output (re-encode seek, accurate)
Pass arbitrary extra args for the current output
Pass arbitrary extra args at the global level
Enable hardware acceleration (-hwaccel). Probes version if cached.
Optionalopts: { device?: string }Set -filter_complex string directly (typed DSL coming in Phase 3)
Build and return the full argument array.
Spawn the process with full event-emitter control. Useful for streaming progress or piping stdout.
Optionalopts: { parseProgress?: boolean; totalDurationUs?: number }Run ffmpeg and return a Promise that resolves on success. Rejects with FFmpegSpawnError on non-zero exit.
Optionalopts: { parseProgress?: boolean; totalDurationUs?: number }Probe the binary version and return a human-readable string. Also caches the version for subsequent requireVersion() checks.
Fluent FFmpeg builder. All methods return
thisfor chaining. Call.run()to execute or.spawn()for event-based control.Example