Expand description
FFmpeg/FFprobe wrapper for the viser video-encoding-optimizer workspace.
Provides typed primitives (codecs, resolutions, rate-control modes) plus
functions to encode (encode), probe media (probe), and resolve the
ffmpeg/ffprobe binary paths. A ProbeCache deduplicates probe calls.
Structs§
- Encode
Job - Parameters for a single encode.
- Encode
Result - Output of a completed encode.
- Ffmpeg
Version - Parsed FFmpeg version.
- Format
Info - Container-level metadata reported by ffprobe.
- Probe
Cache - Thread-safe probe result cache to avoid redundant ffprobe calls.
- Probe
Result - Parsed result of an
ffproberun: container format plus all streams. - Progress
- Real-time encoding progress info parsed from FFmpeg.
- Resolution
- Video resolution.
- Stream
Info - Per-stream metadata reported by ffprobe.
Enums§
- Codec
- Supported video codec.
- Probe
Engine - Backend used to probe media files.
- Rate
Control Mode - Rate control mode for encoding.
Constants§
- RES_
240P - 426x240, 16:9.
- RES_
360P - 640x360, 16:9.
- RES_
480P - 854x480 (SD), 16:9.
- RES_
720P - 1280x720 (HD), 16:9.
- RES_
1080P - 1920x1080 (Full HD), 16:9.
- RES_
1440P - 2560x1440 (QHD), 16:9.
- RES_
2160P - 3840x2160 (4K UHD), 16:9.
Functions§
- check_
ffmpeg - Run
ffmpeg -versionand parse the version line. Returns an error if the binary is not found or the version is too old. - check_
ffprobe - Run
ffprobe -versionand parse the version line. Returns an error if ffprobe is not found. - concat
- Concatenates multiple encoded chunks into a single output without re-encoding.
- encode
- Runs an FFmpeg encode job. Progress updates are sent on the channel if provided.
- extract
- Copies a segment of a video file without re-encoding.
- ffmpeg_
path - Returns the path to the ffmpeg binary.
- ffprobe_
path - Returns the path to the ffprobe binary.
- probe
- Runs ffprobe on the given file and returns parsed results.
- validate_
vmaf_ model - Validate that the given VMAF model name is recognized by libvmaf.