Skip to main content

Module args

Module args 

Source
Expand description

FFmpeg-compatible argument parsing.

FFmpeg’s CLI is not a flat flag list — it’s a small grammar:

  ffmpeg [global opts] {[input opts] -i INPUT}... {[output opts] OUTPUT}...

Options can carry a stream specifier after a colon — -c:v libx264 means “codec, video stream”. This module parses that grammar into a neutral Cli and, for transcode invocations, builds an rff::transcode::TranscodeSpec.

This is a deliberately pragmatic subset: the common options people actually type. Unknown options are skipped with a warning rather than aborting, and the recognised set is easy to extend — add an arm to the match in parse.

Structs§

Cli
A fully parsed command line.

Enums§

Action
What the user actually asked ffmpeg to do. Informational sub-commands (-version, -codecs, …) short-circuit a transcode.

Functions§

parse
Parse args (everything after the program name) into a Cli.