Local video editor for coding agents: 42 FFmpeg tools with a machine-readable contract and an MCP server, for Claude Code, Cursor and Codex. Cut, captions, reframe, loudness, platform exports. No cloud, no API keys.
Python agent-skillsai-agentsaudio-processingcaptionsclaude-codecodexcoding-agentcursorffmpegloudness-normalizationmcpmcp-servermodel-context-protocolpythonsubtitlestranscodingvideovideo-editingvideo-processingwhisper
FFmpeg 8 capability detection; audio extraction, audio join, sample-accurate trims, typed dynamics (0.9.1) (#20)
Shogo Kajiyama2abd89ce4cda
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 4e7be77..cb3f025 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -1,11 +1,14 @@-# Manual-only for now: the account's Actions minutes are exhausted for this cycle.-# After the reset (Oct 1), add:-# push: { branches: [main] }-# pull_request:-# under `on:` to run on every change.+# Runs on every pull request and on pushes to main (workflow_dispatch stays for manual runs).+# Three OSes give three FFmpeg majors today: Ubuntu 24.04 apt = 6.1, Homebrew and Chocolatey = 8.x.+# The "ffmpeg listings" artifact holds each runner's `ffmpeg -filters / -encoders / -bsfs` output+# and `doctor --json`, so a parser regression on a new FFmpeg layout is visible in the log and the+# capture can be copied into tests/fixtures/.name: testson:workflow_dispatch:+ pull_request:+ push:+ branches: [main]jobs:test:strategy:@@ -27,7 +30,27 @@ jobs:- name: Install ffmpeg (Windows)if: runner.os == 'Windows'run: choco install ffmpeg -y --no-progress- - run: ffmpeg -version | head -1+ - name: ffmpeg version, listings and doctorshell: bash+ run: |+ mkdir -p listings+ ffmpeg -version | head -1 | tee listings/version.txt+ ffmpeg -hide_banner -filters > listings/ffmpeg_filters.txt+ ffmpeg -hide_banner -encoders > listings/ffmpeg_encoders.txt+ ffmpeg -hide_banner -bsfs > listings/ffmpeg_bsfs.txt+ head -9 listings/ffmpeg_filters.txt+ # doctor exits 1 when a required capability is missing on this build (e.g. Homebrew without libass);+ # that is reported, not hidden, but the listings must still be uploaded+ python scripts/_contract.py doctor --json > listings/doctor.json || echo "doctor exit $?"+ cat listings/doctor.json+ - uses: actions/upload-artifact@v4+ if: always()+ with:+ name: ffmpeg-listings-${{ matrix.os }}+ path: listings/- run: python tests/test_all.py+ # the contract tests drive the tools through POSIX shell shims (fake ffmpeg on PATH); not portable to Windows yet.+ # They run even when test_all is red so the doctor / parser results on this runner's FFmpeg are always in the log.+ - run: python tests/test_contract.py+ if: runner.os != 'Windows' && !cancelled()- run: node bin/install.jsdiff --git a/CHANGELOG.md b/CHANGELOG.mdindex daee0b8..ef5e877 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -1,5 +1,14 @@# Changelog+## 0.9.1 — FFmpeg 8 capability detection; audio extraction, audio join, sample-accurate trims, typed dynamics++- **doctor / contract on FFmpeg 8.** `ffmpeg -filters` prints two flag characters on FFmpeg 8 (`T. acompressor A->A`) where 6 and 7 print three (`..C`); 0.9.0 anchored on three and reported every `filter:*` capability missing on FFmpeg 8 (macOS / Windows CI of consumers). Rows are now recognised by their `A->A` io-spec token, encoders by the `------` separator, so the flag width no longer matters. A listing that cannot be read yields a third state, `unknown`, distinct from `missing` (an installed filter is never reported absent) and from `available` (a failed detection is never a pass); `detection` and `errors` say which listing failed and why; exit 2 for "required but unknown". Existing keys unchanged. Fixtures for the 6.1 capture and the 7 / 8 layouts in `tests/fixtures/`, tests through a fake ffmpeg.+- **audio.py**: an audio output extension on a video input drops the picture (`audio.py talk.mp4 -o talk.wav` extracts; `--voice -o talk.m4a` cleans on the way) instead of failing inside the WAV muxer; `--audio-stream N` picks a track (`probe` lists `audio_streams`). Typed dynamics: `--compress` (`--comp-threshold/-ratio/-attack/-release/-makeup/-knee`), `--limit` (`--limit-ceiling/-attack/-release`), `--gate` (`--gate-threshold/-ratio/-attack/-release/-range/-knee`), each flag one documented option of acompressor / alimiter / agate, range-checked before ffmpeg runs, dB converted to the linear value the filter takes; no filter string is accepted from the caller.+- **join.py**: audio-only inputs (WAV, FLAC, MP3, M4A, ...) are joined as audio at one sample rate (first clip's, `--sample-rate`) and channel layout (widest, `--channels`), with `acrossfade` or a butt join; the output must have an audio extension; audio and video inputs cannot be mixed. Contract: `join` is `audio_only: true`, `video_required: false`.+- **cut.py**: the codec follows the output extension on re-encode (`-o x.wav` is PCM; a `.wav` never receives AAC packets, which 0.9.0 wrote on `--accurate` and on the keyframe fallback for audio inputs); an audio extension on a video input extracts the audio; audio stream copies seek on the output side so `-c copy` lands on the packet, not the previous video keyframe; `--accurate` on audio trims at the sample (`atrim`). The JSON reports `precision` (`packet` / `sample` / `codec_frame` / `frame`), `duration_error_ms` and `reencoded`. Measured: WAV copy within 2 ms, `--accurate` WAV / FLAC / AAC-to-WAV exact to the sample at 44.1 and 48 kHz, AAC output +21 ms (encoder priming, reported as `codec_frame`).+- `probe` adds `audio_streams` (index, codec, channels, layout, sample rate, language, title).+- Tests: 5 doctor detection tests (FFmpeg 6 / 7 / 8 layouts, garbage, failure), 4 audio tests (extraction and stream selection, audio join, measured precision, typed dynamics); evals `evals/agent_prompts_audio2.json`.+## 0.9.0 — machine-readable execution contract`ffmpeg-skill contract --json` (`python3 scripts/_contract.py --json`) describes the skill for agent frameworks: `contract_version` 1.0 separate from the skill version; one ToolSpec per public script (`ffmpeg-skill/<name>`) with an input schema generated from its argparse parser, an output schema, role (analysis / analysis_and_execution / execution / verification), required and conditional ffmpeg capabilities, dry-run support, `mutates_input: false`, the verification tools to run afterwards, and whether a visual check is required. `ffmpeg-skill doctor` reports which capabilities the machine has. `docs/contract.md` explains the fields and how a planner consumes them.diff --git a/SKILL.md b/SKILL.mdindex c53399f..448e270 100644--- a/SKILL.md+++ b/SKILL.md@@ -107,6 +107,8 @@ Do not ask for things `probe.py` can tell you.| "add background music under the talking" | `audio.py input.mp4 --music bed.mp3 --duck --fade-out 3` || "convert the 5.1 to stereo" | `audio.py input.mov --downmix` || "swap in the narration track" | `audio.py input.mp4 --replace narration.wav` |+| "pull the audio out of this video", "give me the sound as WAV" | `audio.py input.mp4 -o input.wav` (any audio extension drops the picture; `--audio-stream 1` picks another track) |+| "compress the voice", "limit the peaks to -1 dB", "gate the room noise" | `audio.py input.mp4 --compress --comp-threshold -20 --comp-ratio 4` / `--limit --limit-ceiling -1` / `--gate --gate-threshold -45` (typed acompressor / alimiter / agate options, range-checked) || "the audio drifts out of sync over the hour" | `sync.py camera.mp4 recorder.wav --fix-drift --replace-audio` || "smooth slow motion", "half speed but fluid" | `fit.py input.mp4 --duration 2x --smooth interpolate` (slow) or `--smooth blend` || "TikTok-style captions with the words popping / highlighted" | `caption.py input.mp4 --text cues.txt --animate pop --karaoke` |@@ -124,12 +126,22 @@ commands work with `talk.wav` in place of `talk.mp4`. What changes:- The output extension picks the format: `-o out.mp3` converts, `-o out.wav`keeps PCM, `-o out.m4a` writes AAC. `audio.py in.wav -o out.mp3` with noother flag is a plain conversion.-- `cut.py` stream-copies audio too, so trims are lossless unless the format- cannot be cut on a packet boundary.+- `cut.py` stream-copies audio too, so trims land on a packet boundary+ (`precision: packet`, a few ms; the JSON reports `duration_error_ms`). Pass+ `--accurate` for a sample-exact trim: `precision: sample` when the output is+ PCM or FLAC, `codec_frame` when a lossy codec (AAC, MP3, Opus) frames it+ again. A `.wav` output is always PCM, never AAC packets inside a WAV.+- `join.py` joins audio-only clips as audio (`acrossfade` or a butt join) at+ one sample rate and channel layout; the output must have an audio extension.+ Video and audio clips cannot be mixed in one join.+- An audio extension on a video input (`audio.py talk.mp4 -o talk.wav`,+ `cut.py talk.mp4 --start 1:00 --end 2:00 -o part.wav`) extracts the audio; the+ output has no video stream. `audio.py --audio-stream N` picks a track when+ `probe` lists several under `audio_streams`.- `Look: not needed` in the report; `Check:` still applies for loudness(`check.py file.wav --platform podcast` measures LUFS and true peak).- Scripts that need a picture (`fit`, `caption`, `overlay`, `graphics`,- `color`, `export`, `join`, `scenes`, `look`) refuse an audio file with+ `color`, `export`, `scenes`, `look`) refuse an audio file with"input has no video stream". Say so instead of forcing a video wrapper.| User says (audio file) | Do |@@ -138,7 +150,10 @@ commands work with `talk.wav` in place of `talk.mp4`. What changes:| "remove the silence from this recording" | `silence.py talk.wav -o talk_tight.wav` || "clean up the noise in this M4A" | `audio.py talk.m4a --voice -o talk_clean.m4a` (speech) or `--denoise` || "convert this WAV to MP3" | `audio.py talk.wav -o talk.mp3` |-| "trim this audio from 00:30 to 02:00" | `cut.py talk.wav --start 0:30 --end 2:00 -o talk_cut.wav` |+| "trim this audio from 00:30 to 02:00" | `cut.py talk.wav --start 0:30 --end 2:00 -o talk_cut.wav` (`--accurate` for sample-exact) |+| "join these recordings", "intro + episode + outro" | `join.py intro.wav episode.m4a outro.wav -o full.flac` (`--transition none` for a butt join) |+| "extract the audio from the video", "mp4 to wav" | `audio.py talk.mp4 -o talk.wav` (`--voice -o talk.m4a` to clean it on the way) |+| "compress / limit / gate the voice" | `audio.py talk.wav --compress --comp-threshold -20 --comp-ratio 4 --limit --limit-ceiling -1 -o talk_dyn.wav` || "is this loud enough for Apple Podcasts?" | `check.py talk.m4a --platform podcast` |## Report formatdiff --git a/docs/contract.md b/docs/contract.mdindex a00bcd2..d54ca1f 100644--- a/docs/contract.md+++ b/docs/contract.md@@ -21,7 +21,7 @@ The contract is derived from the code that runs, not maintained beside it:| Field | Meaning | Changes when ||---|---|---|| `contract_version` | shape of this document (`1.0`) | a key is renamed, removed or changes meaning |-| `skill.version` | the npm / package.json version (`0.9.0`) | any release |+| `skill.version` | the npm / package.json version (`0.9.1`) | any release |A release that adds a tool or a flag keeps `contract_version`; a breaking change to theToolSpec shape bumps it. Consumers pin on `contract_version` and read `skill.version`@@ -32,7 +32,7 @@ for provenance.```json{"contract_version": "1.0",- "skill": {"id": "ffmpeg-skill", "version": "0.9.0", "execution_mode": "local", "kind": "execution",+ "skill": {"id": "ffmpeg-skill", "version": "0.9.1", "execution_mode": "local", "kind": "execution","entrypoints": {"cli": "...", "mcp": "...", "contract": "...", "doctor": "..."},"not_provided": ["AI reasoning", "decisions", "production plans", "project IR", "approvals", "network access", "transcription engine"]},"requirements": {"python": ">=3.9 (standard library only)", "ffmpeg": ">=5.0", "ffprobe": ">=5.0"},@@ -66,6 +66,7 @@ One entry per tool under `tools`, sorted by id. Tool ids are stable:| `requires_visual_verification` | the picture changed; run `ffmpeg-skill/look` and inspect the PNG || `audio_only` | accepts an audio-only input (WAV, MP3, M4A, FLAC, OGG, Opus) || `video_required` | refuses an input without a video stream ("input has no video stream") |+| | `join` has `audio_only: true` and `video_required: false` since 0.9.1: audio-only inputs are joined as audio (no `look` needed then); mixing audio and video inputs is refused || `deterministic_inputs`, `idempotency_hint` | see Repeatability || `mcp` | the MCP tool name and its positional arguments |@@ -128,7 +129,20 @@ Names: `ffmpeg`, `ffprobe`, `encoder:<name>`, `filter:<name>`, `bsf:<name>`,to omit detection. Nothing from the environment other than those lists and theffmpeg/ffprobe/python versions is printed; no environment variables, no paths.-`ffmpeg-skill doctor` exits non-zero when a required capability is missing.+`doctor` has three states per capability. `available` and `missing` come from a listing+that was read; `unknown` means the listing that would prove the capability could not be+read (`ffmpeg -filters` in a layout the parser does not recognise, or ffmpeg exiting+non-zero), and it is never folded into `missing`, so an installed filter is not reported+absent, nor into `available`, so a failed detection is not a pass. `detection` gives the+status (`parsed`, `unparsed`, `failed`, `missing`), row count and detail of each listing;+`errors` lists the unreadable ones. The filter parser recognises the FFmpeg 6/7 layout+(three flag characters, `..C acompressor A->A`) and the FFmpeg 8 layout (two, `T.+acompressor A->A`) by the io-spec token, so the flag width does not matter; fixtures for+both live in `tests/fixtures/`.++`ffmpeg-skill doctor` exits 0 when every required capability is available, 1 when one is+missing, 2 when none is missing but a required one is unknown. `ok` is true only for 0.+The keys of 0.9.0 (`available`, `missing`, `missing_optional`, `ok`) are unchanged.## Invocationdiff --git a/evals/agent_prompts_audio2.json b/evals/agent_prompts_audio2.jsonnew file mode 100644index 0000000..5c8aa2b--- /dev/null+++ b/evals/agent_prompts_audio2.json@@ -0,0 +1,62 @@+[+ {+ "id": "b01-join-audio",+ "lang": "en",+ "prompt": "Join these three recordings into one file in this order with a short crossfade between them: /home/user/ffmpeg-skill/tests/out/c_tone.wav, /home/user/ffmpeg-skill/tests/out/c_mic.wav, /tmp/capx/p1/s44.m4a. Save to OUTDIR as FLAC.",+ "expect": [+ "join"+ ],+ "refuse": false,+ "audio_only": true+ },+ {+ "id": "b02-extract-wav",+ "lang": "en",+ "prompt": "Extract the audio from /home/user/ffmpeg-skill/tests/out/c_source.mp4 as a WAV file. Save to OUTDIR.",+ "expect": [+ "audio|cut"+ ],+ "refuse": false,+ "audio_only": true+ },+ {+ "id": "b03-extract-clean-ja",+ "lang": "ja",+ "prompt": "/home/user/ffmpeg-skill/tests/out/c_source.mp4 の音声だけを取り出して、ノイズを取って M4A で OUTDIR に保存してください。",+ "expect": [+ "audio"+ ],+ "refuse": false,+ "audio_only": true+ },+ {+ "id": "b04-second-track",+ "lang": "en",+ "prompt": "/tmp/capx/p1/two.mkv has two audio tracks. Give me the second one (the 44.1 kHz track) as a WAV in OUTDIR.",+ "expect": [+ "audio"+ ],+ "refuse": false,+ "audio_only": true+ },+ {+ "id": "b05-sample-trim",+ "lang": "en",+ "prompt": "Cut /home/user/ffmpeg-skill/tests/out/c_tone.wav from 1.2345 s to 2.3456 s exactly, sample-accurate, and tell me how accurate the cut actually is. Save to OUTDIR.",+ "expect": [+ "cut"+ ],+ "refuse": false,+ "audio_only": true+ },+ {+ "id": "b06-dynamics-ja",+ "lang": "ja",+ "prompt": "/home/user/ffmpeg-skill/tests/out/c_mic.wav の声にコンプレッサー(スレッショルド -20 dB、レシオ 4:1)をかけて、ピークを -1 dBFS で制限した WAV を OUTDIR に保存してください。",+ "expect": [+ "audio"+ ],+ "refuse": false,+ "audio_only": true+ }+]diff --git a/evals/grade_runs_24.py b/evals/grade_runs_24.pyindex 049ac55..af6021c 100644--- a/evals/grade_runs_24.py+++ b/evals/grade_runs_24.py@@ -13,7 +13,7 @@ W = Path(__file__).resolve().parentPROMPTS = Path(sys.argv[2]) if len(sys.argv) > 2 else W / "agent_prompts_24.json"P = {p["id"]: p for p in json.loads(PROMPTS.read_text())}it = Path(sys.argv[1]) if len(sys.argv) > 1 else W / "iteration-2"-VIDEO_ONLY = {"fit", "caption", "overlay", "graphics", "color", "export", "join", "scenes", "look"}+VIDEO_ONLY = {"fit", "caption", "overlay", "graphics", "color", "export", "scenes", "look"} # join accepts audio-only inputs since 0.9.1JA = re.compile(r"[-ヿ一-鿿]")PICTURE = {"e01-reel","e03-logo","e07-hdr","e09-join","e12-vfr","j01-reel","j03-lower","j08-project"}rows = []diff --git a/evals/results/audio-2.json b/evals/results/audio-2.jsonnew file mode 100644index 0000000..9ee6704--- /dev/null+++ b/evals/results/audio-2.json@@ -0,0 +1,21 @@+{+ "iteration": "audio-2",+ "date": "2026-09-05",+ "runs": 6,+ "prompts_file": "evals/agent_prompts_audio2.json",+ "grader": "evals/grade_runs_24.py ITER evals/agent_prompts_audio2.json",+ "skill_version": "0.9.1 (feat/ffmpeg8-audio, before merge)",+ "routing": "6/6",+ "japanese_report": "2/2",+ "report_format": "6/6",+ "audio_only_handled_as_audio": "6/6 (no picture-only script run, Look marked not needed)",+ "mean_commands": 4.2,+ "per_prompt": {+ "b01-join-audio": "join.py wav+wav+m4a -> flac with 0.5 s acrossfade; resampled to 48 kHz stereo, expected/measured duration reported (12.53/12.55 s), check podcast",+ "b02-extract-wav": "audio.py mp4 -o wav; no video stream, PCM 48 kHz mono",+ "b03-extract-clean-ja": "audio.py mp4 --denoise -o m4a; Japanese report, offered --voice",+ "b04-second-track": "probe listed audio_streams; audio.py --audio-stream 1 -> 44.1 kHz wav",+ "b05-sample-trim": "cut.py --accurate; agent verified by byte comparison: start error 0 samples, end 0.2 sample rounding (53,333 samples)",+ "b06-dynamics-ja": "audio.py --compress -20 dB 4:1 --limit -1 dBFS -> wav; noted the limiter did not engage on a low-peak source"+ }+}diff --git a/package.json b/package.jsonindex 88296fc..b2fbc3c 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "ffmpeg-skill",- "version": "0.9.0",+ "version": "0.9.1","description": "Agent Skill that lets coding agents (Claude Code, Cursor, Codex) do professional video editing with local FFmpeg: MCP server, batch processing, declarative project rendering, brand kits, motion-graphics templates, HTML delivery reports, scene detection, delivery checks, cut, silence removal, transitions, multicam, captions, sync with drift correction, HDR to SDR, LUTs, audio clean-up and ducking, loudness, platform exports. No API keys, no cloud, no dependencies.","keywords": ["ffmpeg", "video", "agent-skill", "claude-code", "cursor", "codex", "skill", "video-editing"],"license": "MIT",diff --git a/scripts/_common.py b/scripts/_common.pyindex bbffde1..2f03c18 100755--- a/scripts/_common.py+++ b/scripts/_common.py@@ -322,6 +322,16 @@ def probe(path: str) -> Dict[str, Any]:"sample_rate": _to_int(audio.get("sample_rate")),"bitrate": _to_int(audio.get("bit_rate")),}+ # every audio stream in file order: index n here is `-map 0:a:n` (audio.py --audio-stream n)+ out["audio_streams"] = [{+ "index": n,+ "codec": a.get("codec_name"),+ "channels": _to_int(a.get("channels")),+ "channel_layout": a.get("channel_layout"),+ "sample_rate": _to_int(a.get("sample_rate")),+ "language": (a.get("tags") or {}).get("language"),+ "title": (a.get("tags") or {}).get("title"),+ } for n, a in enumerate(s for s in streams if s.get("codec_type") == "audio")]return out@@ -436,6 +446,19 @@ def audio_codec_for(output_path: str, default_bitrate: str = "192k") -> List[strreturn list(AUDIO_CODECS.get(ext, ["-c:a", "aac", "-b:a", default_bitrate]))+def is_audio_output(output_path: str) -> bool:+ """True when the output extension is an audio-only container (.wav, .flac, .mp3, .m4a, .aac, .ogg, .opus).++ Such a file cannot hold a video stream and, for .wav, cannot hold compressed audio: scripts use+ this to drop the picture (-vn) and to pick the codec from the extension instead of AAC.+ """+ return os.path.splitext(output_path)[1].lower() in AUDIO_CODECS+++def db_to_linear(db: float) -> float:+ return 10 ** (db / 20.0)++def analyze_levels(path: str, seconds: float = 20.0) -> Dict[str, Any]:"""Sample luma/saturation statistics (signalstats) and guess whether the picture is Log-encoded.diff --git a/scripts/_contract.py b/scripts/_contract.pyindex bcffa0f..e7f0b33 100644--- a/scripts/_contract.py+++ b/scripts/_contract.py@@ -63,8 +63,8 @@ TOOL_META: Dict[str, Dict[str, Any]] = {"probe": dict(role="analysis", inputs=["media (video or audio, any container ffprobe reads)"], outputs=["measurement JSON on stdout (no file)"],required=["ffprobe"], optional=[{"capability": "ffmpeg", "when": "--analyze"}, {"capability": "filter:signalstats", "when": "--analyze"}],video_required=False, audio_only=True, visual=False, verify=[], produces_artifact=False, idempotency="bit_exact", deterministic=True),- "cut": dict(role="execution", inputs=["video or audio asset"], outputs=["cut video/audio artifact (same container family)"],- required=FF, optional=[{"capability": X264, "when": "re-encode: --accurate, VFR source, or a keyframe farther than --tolerance"}, HDR_X265, {"capability": AAC, "when": "re-encode of a video container"}],+ "cut": dict(role="execution", inputs=["video or audio asset"], outputs=["cut video/audio artifact (same container family, or audio extracted when -o has an audio extension)"],+ required=FF, optional=[{"capability": X264, "when": "re-encode: --accurate, VFR source, or a keyframe farther than --tolerance"}, HDR_X265, {"capability": AAC, "when": "re-encode of a video container"}] + AUDIO_OUT,video_required=False, audio_only=True, visual=False, verify=["probe"], produces_artifact=True, idempotency="content_equivalent", deterministic=True),"fit": dict(role="execution", inputs=["video asset"], outputs=["video artifact at the requested duration / aspect / fps"],required=FF + [X264, AAC], optional=[HDR_X265, {"capability": "filter:minterpolate", "when": "--smooth interpolate"}],@@ -84,8 +84,9 @@ TOOL_META: Dict[str, Dict[str, Any]] = {"multicam": dict(role="execution", inputs=["reference camera", "other cameras / recorders"], outputs=["switched multicam video artifact"],required=FF + [X264, AAC], optional=[HDR_X265],video_required=True, audio_only=False, visual=True, verify=["probe", "look"], produces_artifact=True, idempotency="content_equivalent", deterministic=True),- "audio": dict(role="execution", inputs=["video or audio asset", "music bed (--music) or replacement track (--replace)"], outputs=["artifact with the processed audio (video stream-copied)"],- required=FF + [AAC], optional=[{"capability": "filter:afftdn", "when": "--denoise / --voice"}, {"capability": "filter:sidechaincompress", "when": "--duck"}] + AUDIO_OUT,+ "audio": dict(role="execution", inputs=["video or audio asset", "music bed (--music) or replacement track (--replace)"], outputs=["artifact with the processed audio (video stream-copied, or dropped when -o has an audio extension)"],+ required=FF + [AAC], optional=[{"capability": "filter:afftdn", "when": "--denoise / --voice"}, {"capability": "filter:sidechaincompress", "when": "--duck"},+ {"capability": "filter:acompressor", "when": "--compress / --voice"}, {"capability": "filter:alimiter", "when": "--limit"}, {"capability": "filter:agate", "when": "--gate"}] + AUDIO_OUT,video_required=False, audio_only=True, visual=False, verify=["probe"], produces_artifact=True, idempotency="content_equivalent", deterministic=True),"loudness": dict(role="analysis_and_execution", inputs=["video or audio asset"], outputs=["loudness measurement JSON (--measure-only)", "normalised artifact (video stream-copied)"],required=FF + ["filter:loudnorm", AAC], optional=AUDIO_OUT,@@ -93,9 +94,9 @@ TOOL_META: Dict[str, Dict[str, Any]] = {"silence": dict(role="analysis_and_execution", inputs=["video or audio asset"], outputs=["silence list JSON (--list)", "artifact with silences removed", "EDL text (--edl)"],required=FF + ["filter:silencedetect"], optional=[{"capability": X264, "when": "removing silences from a video"}, HDR_X265, {"capability": AAC, "when": "removing silences from a video"}] + AUDIO_OUT,video_required=False, audio_only=True, visual=False, verify=["probe"], produces_artifact=True, idempotency="content_equivalent", deterministic=True),- "join": dict(role="execution", inputs=["two or more video assets"], outputs=["concatenated video artifact"],- required=FF + [X264, AAC, "filter:xfade", "filter:acrossfade"], optional=[HDR_X265],- video_required=True, audio_only=False, visual=True, verify=["probe", "look"], produces_artifact=True, idempotency="content_equivalent", deterministic=True),+ "join": dict(role="execution", inputs=["two or more video assets, or two or more audio-only assets"], outputs=["concatenated video artifact", "concatenated audio artifact (audio-only inputs, audio output extension)"],+ required=FF + [X264, AAC, "filter:xfade", "filter:acrossfade"], optional=[HDR_X265] + AUDIO_OUT,+ video_required=False, audio_only=True, visual=True, verify=["probe", "look"], produces_artifact=True, idempotency="content_equivalent", deterministic=True),"color": dict(role="execution", inputs=["video asset", ".cube LUT (--lut)"], outputs=["video artifact with converted colour"],required=FF, optional=[{"capability": X264, "when": "--to-sdr / --lut"}, {"capability": "filter:zscale", "when": "--to-sdr"}, {"capability": "filter:tonemap", "when": "--to-sdr"},{"capability": "filter:lut3d", "when": "--lut"}, {"capability": "bsf:filter_units", "when": "--strip-dovi"}, {"capability": X265, "when": "--lut on an HDR source"}, {"capability": AAC, "when": "re-encode"}],@@ -259,6 +260,20 @@ def output_schema(name: str, meta: Dict[str, Any]) -> Dict[str, Any]:extra = {"report": {"type": "string"}, "check": {"type": ["object", "null"]}}elif name == "loudness":extra = {"measured": {"type": "object", "description": "--measure-only prints the loudnorm measurement instead (input_i, input_tp, input_lra, input_thresh, target_offset)"}}+ elif name == "cut":+ extra = {"expected_duration": {"type": "number", "description": "seconds requested"},+ "duration_error_ms": {"type": ["number", "null"], "description": "written minus requested, measured by ffprobe (null under --dry-run)"},+ "precision": {"enum": ["packet", "sample", "codec_frame", "frame"],+ "description": "packet: stream copy on a packet/keyframe boundary; sample: decoded audio trimmed to the sample, lossless output; codec_frame: sample-trimmed then framed by a lossy encoder (priming delay adds to the length); frame: re-encoded video"},+ "reencoded": {"type": "boolean"}}+ elif name == "join":+ extra = {"mode": {"enum": ["video", "audio"]}, "clips": {"type": "integer"}, "transition": {"type": "string"}, "expected_duration": {"type": "number"},+ "sample_rate": {"type": "integer", "description": "audio mode only"}, "channels": {"type": "integer", "description": "audio mode only"},+ "video": {"type": "boolean", "description": "false in audio mode: the output has no video stream"}}+ elif name == "audio":+ extra = {"video": {"type": "boolean", "description": "true when the input's video stream was copied; false for an audio output extension (extraction)"},+ "audio_stream": {"type": "integer", "description": "which input audio stream was processed (--audio-stream)"},+ "dynamics": {"type": "array", "items": {"enum": ["agate", "acompressor", "alimiter"]}, "description": "typed dynamics filters applied, in graph order"}}props = dict(base)props.update(extra)required = ["status", "output", "dry_run", "commands"]@@ -288,26 +303,67 @@ def public_tools() -> List[str]:return sorted(p.stem for p in HERE.glob("*.py") if not p.name.startswith("_"))-def _ff_list(binary: str, flag: str) -> List[str]:- """Names from `ffmpeg -encoders` / `-filters` / `-bsfs` (empty list when ffmpeg is missing)."""- exe = shutil.which(binary)- if not exe:- return []- proc = subprocess.run([exe, "-hide_banner", flag], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)+# `ffmpeg -filters` rows: FFmpeg <= 7 prints three flag characters (`..C acompressor A->A ...`),+# FFmpeg 8 prints two (`T. acompressor A->A ...`). The row is recognised by its io-spec token+# (`A->A`, `|->V`, `N->N`, ...) so the flag width does not matter; a legend line never carries `->`.+_FILTER_ROW = re.compile(r"^\s*(?:[A-Z.]{1,6}\s+)?([A-Za-z0-9_]+)\s+(\S*->\S*)(?:\s|$)")+# `ffmpeg -encoders` rows follow a ` ------` separator: flags (six characters today; any width of+# letters and dots is accepted) then the encoder name. A legend line has `=` where the name would be.+_ENCODER_ROW = re.compile(r"^\s*[A-Z.]{2,10}\s+([A-Za-z0-9_-]+)(?:\s|$)")+_LIST_SEPARATOR = re.compile(r"^\s*-{3,}\s*$")+++def _parse_ff_list(flag: str, text: str) -> List[str]:+ """Names in the stdout of `ffmpeg <flag>`; empty when no row was recognised."""names: List[str] = []- flags = {"-encoders": r"[VASFXBD.]{6}", "-filters": r"[TSC.]{3}"}.get(flag)- for line in proc.stdout.splitlines():- parts = line.split()- if not parts:- continue- if flag == "-bsfs":+ if flag == "-filters":+ for line in text.splitlines():+ m = _FILTER_ROW.match(line)+ if m:+ names.append(m.group(1))+ elif flag == "-encoders":+ lines = text.splitlines()+ sep = next((i for i, l in enumerate(lines) if _LIST_SEPARATOR.match(l)), None)+ rows = lines[sep + 1:] if sep is not None else lines+ for line in rows:+ m = _ENCODER_ROW.match(line)+ if m and m.group(1) != "=":+ names.append(m.group(1))+ elif flag == "-bsfs":+ for line in text.splitlines():+ parts = line.split()if len(parts) == 1 and not parts[0].endswith(":"):names.append(parts[0])- elif flags and len(parts) >= 2 and re.fullmatch(flags, parts[0]):- names.append(parts[1])return names+def _ff_listing(binary: str, flag: str) -> Dict[str, Any]:+ """`{"names": [...], "status": parsed | unparsed | failed | missing, "detail": str}` for `ffmpeg <flag>`.++ `parsed`: rows recognised. `unparsed`: ffmpeg ran but no row matched, so the capabilities it+ covers are unknown, not absent. `failed`: ffmpeg exited non-zero. `missing`: no binary on PATH.+ """+ exe = shutil.which(binary)+ if not exe:+ return {"names": [], "status": "missing", "detail": f"{binary} not on PATH"}+ try:+ proc = subprocess.run([exe, "-hide_banner", flag], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)+ except OSError as e:+ return {"names": [], "status": "failed", "detail": f"{binary} {flag}: {e}"}+ if proc.returncode != 0:+ tail = " ".join(proc.stderr.strip().splitlines()[-2:])+ return {"names": [], "status": "failed", "detail": f"{binary} {flag} exited {proc.returncode}: {tail}"}+ names = _parse_ff_list(flag, proc.stdout)+ if not names:+ return {"names": [], "status": "unparsed", "detail": f"no row recognised in `{binary} {flag}` output ({len(proc.stdout.splitlines())} lines)"}+ return {"names": names, "status": "parsed", "detail": f"{len(names)} entries"}+++def _ff_list(binary: str, flag: str) -> List[str]:+ """Names from `ffmpeg -encoders` / `-filters` / `-bsfs` (empty list when ffmpeg is missing or unparsed)."""+ return _ff_listing(binary, flag)["names"]++def _version_line(binary: str) -> Optional[str]:exe = shutil.which(binary)if not exe:@@ -335,30 +391,51 @@ def required_capabilities() -> Dict[str, List[str]]:def doctor() -> Dict[str, Any]:- """Detect which declared capabilities this machine has. No secrets, no environment variables."""- encoders = set(_ff_list("ffmpeg", "-encoders"))- filters = set(_ff_list("ffmpeg", "-filters"))- bsfs = set(_ff_list("ffmpeg", "-bsfs"))- have: Dict[str, bool] = {}+ """Detect which declared capabilities this machine has. No secrets, no environment variables.++ Three states per capability: available, missing, unknown. `unknown` means the ffmpeg listing+ that would prove it could not be read (unparsed output, ffmpeg failure); it is never folded into+ `missing` (a filter that exists is not reported absent) nor into `available` (a failed detection+ is not a pass). `ok` is true only when nothing required is missing or unknown.+ """+ listings = {+ "encoders": _ff_listing("ffmpeg", "-encoders"),+ "filters": _ff_listing("ffmpeg", "-filters"),+ "bsfs": _ff_listing("ffmpeg", "-bsfs"),+ }+ sets = {k: set(v["names"]) for k, v in listings.items()}+ state: Dict[str, str] = {} # capability -> available | missing | unknownwanted = required_capabilities()++ def _from(kind: str, name: str) -> str:+ lst = listings[kind]+ if lst["status"] == "parsed":+ return "available" if name in sets[kind] else "missing"+ if lst["status"] == "missing":+ return "missing" # no ffmpeg at all: nothing it provides is available+ return "unknown"+for cap in wanted["required"] + wanted["optional"]:if cap == "ffmpeg":- have[cap] = shutil.which("ffmpeg") is not None+ state[cap] = "available" if shutil.which("ffmpeg") else "missing"elif cap == "ffprobe":- have[cap] = shutil.which("ffprobe") is not None+ state[cap] = "available" if shutil.which("ffprobe") else "missing"elif cap.startswith("encoder:"):- have[cap] = cap[8:] in encoders+ state[cap] = _from("encoders", cap[8:])elif cap.startswith("filter:"):- have[cap] = cap[7:] in filters+ state[cap] = _from("filters", cap[7:])elif cap.startswith("bsf:"):- have[cap] = cap[4:] in bsfs+ state[cap] = _from("bsfs", cap[4:])elif cap == "external:whisper":- have[cap] = _whisper_available()+ state[cap] = "available" if _whisper_available() else "missing"else:- have[cap] = False- available = sorted(c for c, ok in have.items() if ok)- missing_required = sorted(c for c in wanted["required"] if not have.get(c))- missing_optional = sorted(c for c in wanted["optional"] if not have.get(c))+ state[cap] = "missing"+ available = sorted(c for c, st in state.items() if st == "available")+ missing_required = sorted(c for c in wanted["required"] if state[c] == "missing")+ missing_optional = sorted(c for c in wanted["optional"] if state[c] == "missing")+ unknown = sorted(c for c, st in state.items() if st == "unknown")+ unknown_required = [c for c in unknown if c in wanted["required"]]+ errors = [f"{k}: {v['detail']}" for k, v in listings.items() if v["status"] in ("unparsed", "failed")]return {"python": ".".join(str(x) for x in sys.version_info[:3]),"ffmpeg": _version_line("ffmpeg"),@@ -366,7 +443,10 @@ def doctor() -> Dict[str, Any]:"available": available,"missing": missing_required,"missing_optional": missing_optional,- "ok": not missing_required,+ "unknown": unknown,+ "detection": {k: {"status": v["status"], "count": len(v["names"]), "detail": v["detail"]} for k, v in listings.items()},+ "errors": errors,+ "ok": not missing_required and not unknown_required,}@@ -496,7 +576,8 @@ def build(detect: bool = True) -> Dict[str, Any]:caps: Dict[str, Any] = {"required": wanted["required"], "optional": wanted["optional"], "naming": "ffmpeg | ffprobe | encoder:<name> | filter:<name> | bsf:<name> | external:whisper"}if detect:d = doctor()- caps.update({"available": d["available"], "missing": d["missing"], "missing_optional": d["missing_optional"], "detected_by": "doctor"})+ caps.update({"available": d["available"], "missing": d["missing"], "missing_optional": d["missing_optional"],+ "unknown": d["unknown"], "detection": d["detection"], "detected_by": "doctor"})return {"contract_version": CONTRACT_VERSION,"skill": {@@ -568,7 +649,14 @@ def main() -> int:print(f"available: {', '.join(d['available'])}")print(f"missing required: {', '.join(d['missing']) or 'none'}")print(f"missing optional: {', '.join(d['missing_optional']) or 'none'}")- return 0 if d["ok"] else 1+ if d["unknown"]:+ print(f"unknown (detection failed, not proven missing): {', '.join(d['unknown'])}")+ for err in d["errors"]:+ print(f"detection error: {err}", file=sys.stderr)+ if d["ok"]:+ return 0+ # 1: something required is missing; 2: nothing proven missing but a required capability is unknown+ return 1 if d["missing"] else 2print(json.dumps(build(detect=not args.static), indent=2, sort_keys=True, ensure_ascii=False))return 0diff --git a/scripts/audio.py b/scripts/audio.pyindex 352c041..482eca9 100755--- a/scripts/audio.py+++ b/scripts/audio.py@@ -1,6 +1,8 @@#!/usr/bin/env python3-"""Audio post: denoise, voice clean-up, background music with auto-ducking,-fades and stereo/mono handling. Video is stream-copied.+"""Audio post: denoise, voice clean-up, typed dynamics (compressor, limiter,+gate), background music with auto-ducking, fades and stereo/mono handling.+Video is stream-copied; an audio output extension (.wav/.flac/.mp3/.m4a/...)+drops the picture, so `audio.py talk.mp4 -o talk.wav` is an extraction.Examples:python3 audio.py interview.mp4 --denoise # FFT noise reduction@@ -10,15 +12,65 @@ Examples:python3 audio.py clip.mp4 --fade-in 0.5 --fade-out 1 --stereopython3 audio.py surround.mov --downmix # 5.1 -> stereo with proper centre/LFE weightspython3 audio.py clip.mp4 --replace narration.wav # swap the audio track entirely+ python3 audio.py interview.mp4 -o interview.wav # extract the audio (no video in the output)+ python3 audio.py multi.mkv --audio-stream 1 --voice -o lav.m4a # pick the second audio track, clean it, write M4A+ python3 audio.py talk.wav --compress --comp-threshold -20 --comp-ratio 4 --limit --limit-ceiling -1 -o talk_dyn.wav"""import argparseimport sysfrom typing import List-from _common import add_common, apply_common, emit, audio_codec_for, default_output, die, ffmpeg_base, info, probe, run+from _common import STATE, add_common, apply_common, audio_codec_for, db_to_linear, default_output, die, emit, ffmpeg_base, info, is_audio_output, probe, runVOICE_CHAIN = "highpass=f=80,deesser=i=0.4,afftdn=nf=-25:tn=1,acompressor=threshold=-18dB:ratio=3:attack=5:release=80:makeup=2"+# Typed dynamics: every flag maps to one real option of one ffmpeg filter, validated against the+# range that filter documents (ffmpeg -h filter=acompressor / alimiter / agate). dB flags are+# converted to the linear value the filter takes, so no string reaches the graph unchecked.+DYNAMICS = {+ "acompressor": {+ "comp_threshold": ("threshold", "dB", -60.0, 0.0), # 0.000976563..1 linear+ "comp_ratio": ("ratio", "x", 1.0, 20.0),+ "comp_attack": ("attack", "ms", 0.01, 2000.0),+ "comp_release": ("release", "ms", 0.01, 9000.0),+ "comp_makeup": ("makeup", "dB", 0.0, 36.0), # 1..64 linear+ "comp_knee": ("knee", "dB", 1.0, 8.0),+ },+ "alimiter": {+ "limit_ceiling": ("limit", "dB", -24.0, 0.0), # 0.0625..1 linear+ "limit_attack": ("attack", "ms", 0.1, 80.0),+ "limit_release": ("release", "ms", 1.0, 8000.0),+ },+ "agate": {+ "gate_threshold": ("threshold", "dB", -60.0, 0.0), # 0..1 linear+ "gate_ratio": ("ratio", "x", 1.0, 9000.0),+ "gate_attack": ("attack", "ms", 0.01, 9000.0),+ "gate_release": ("release", "ms", 0.01, 9000.0),+ "gate_range": ("range", "dB", -90.0, 0.0), # 0..1 linear: how far the gate closes+ "gate_knee": ("knee", "dB", 1.0, 8.0),+ },+}+++def dynamics_filter(name: str, args: argparse.Namespace) -> str:+ """One validated `acompressor=...` / `alimiter=...` / `agate=...` filter string from typed flags."""+ opts = []+ for flag, (opt, unit, lo, hi) in DYNAMICS[name].items():+ value = getattr(args, flag)+ if value is None:+ continue+ if not (lo <= value <= hi):+ die(f"--{flag.replace('_', '-')} {value:g} is outside {lo:g}..{hi:g} {unit if unit != 'x' else ''}".rstrip()+ + f" (the range ffmpeg's {name} accepts)")+ if unit == "dB":+ # the filters take linear amplitude (agate range: -90 dB -> 0.00003 closed, 0 dB -> 1 open)+ opts.append(f"{opt}={db_to_linear(value):.6g}")+ else:+ opts.append(f"{opt}={value:g}")+ if name == "alimiter":+ opts.append("level=disabled") # keep the level: a limiter must not normalise the whole track upwards+ return name + ("=" + ":".join(opts) if opts else "")+def main() -> int:ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)@@ -43,10 +95,33 @@ def main() -> int:fades.add_argument("--mono", action="store_true", help="force 1-channel output")fades.add_argument("--downmix", action="store_true", help="downmix 5.1/7.1 to stereo using standard weights")fades.add_argument("--replace", help="replace the audio with this file (trimmed/padded to the video)")+ dyn = ap.add_argument_group("dynamics (typed; each flag is one option of ffmpeg's acompressor / alimiter / agate)")+ dyn.add_argument("--compress", action="store_true", help="compressor (acompressor); order: gate -> compressor -> limiter")+ dyn.add_argument("--comp-threshold", type=float, help="dBFS above which gain is reduced, -60..0 (ffmpeg default -12.4)")+ dyn.add_argument("--comp-ratio", type=float, help="ratio 1..20 (default 2)")+ dyn.add_argument("--comp-attack", type=float, help="ms 0.01..2000 (default 20)")+ dyn.add_argument("--comp-release", type=float, help="ms 0.01..9000 (default 250)")+ dyn.add_argument("--comp-makeup", type=float, help="make-up gain dB 0..36 (default 0)")+ dyn.add_argument("--comp-knee", type=float, help="knee dB 1..8 (default 2.83)")+ dyn.add_argument("--limit", action="store_true", help="look-ahead limiter (alimiter), level left as is")+ dyn.add_argument("--limit-ceiling", type=float, help="ceiling dBFS -24..0 (default 0)")+ dyn.add_argument("--limit-attack", type=float, help="ms 0.1..80 (default 5)")+ dyn.add_argument("--limit-release", type=float, help="ms 1..8000 (default 50)")+ dyn.add_argument("--gate", action="store_true", help="noise gate (agate)")+ dyn.add_argument("--gate-threshold", type=float, help="dBFS below which the gate closes, -60..0 (default -18.1)")+ dyn.add_argument("--gate-ratio", type=float, help="ratio 1..9000 (default 2)")+ dyn.add_argument("--gate-attack", type=float, help="ms 0.01..9000 (default 20)")+ dyn.add_argument("--gate-release", type=float, help="ms 0.01..9000 (default 250)")+ dyn.add_argument("--gate-range", type=float, help="attenuation when closed, dB -90..0 (default -6.1)")+ dyn.add_argument("--gate-knee", type=float, help="knee dB 1..8 (default 2.83)")+ ap.add_argument("--audio-stream", type=int, default=0, help="which audio stream of the input to process, 0-based in file order (probe lists them under audio_streams)")ap.add_argument("--bitrate", default="192k")add_common(ap)args = ap.parse_args()apply_common(args)+ for flag_group, switch in (("acompressor", "compress"), ("alimiter", "limit"), ("agate", "gate")):+ if not getattr(args, switch) and any(getattr(args, f) is not None for f in DYNAMICS[flag_group]):+ die(f"--{switch} is off but one of its parameters was given; add --{switch}")meta = probe(args.input)dur = meta.get("duration") or 0.0@@ -54,9 +129,15 @@ def main() -> int:if not meta.get("audio") and not args.replace:die("input has no audio stream (use --replace to add one)")output = args.output or default_output(args.input, "audio")+ audio_out = is_audio_output(output)+ streams = meta.get("audio_streams") or []+ if streams and not (0 <= args.audio_stream < len(streams)) and not STATE["dry_run"]:+ die(f"--audio-stream {args.audio_stream}: input has {len(streams)} audio stream(s), 0..{len(streams) - 1}")+ if args.audio_stream and not streams and not STATE["dry_run"]:+ die("--audio-stream needs an input with audio streams")inputs: List[str] = ["-i", args.input]- main_src = "0:a:0"+ main_src = f"0:a:{args.audio_stream}"idx = 1if args.replace:probe(args.replace)@@ -73,6 +154,12 @@ def main() -> int:fx.append(f"afftdn=nf=-{args.denoise_strength:g}:tn=1")if args.gain:fx.append(f"volume={args.gain:g}dB")+ if args.gate:+ fx.append(dynamics_filter("agate", args))+ if args.compress:+ fx.append(dynamics_filter("acompressor", args))+ if args.limit:+ fx.append(dynamics_filter("alimiter", args))if args.mono:fx.append("pan=mono|c0=0.5*c0+0.5*c1")elif args.stereo:@@ -116,14 +203,20 @@ def main() -> int:last = "out"cmd = ffmpeg_base() + inputs + ["-filter_complex", ";".join(graph), "-map", f"[{last}]"]- if has_video:+ if has_video and not audio_out:cmd += ["-map", "0:v:0", "-c:v", "copy"]+ elif has_video:+ cmd += ["-vn"] # audio extension: the picture is dropped, not copied into a container that cannot hold itcmd += audio_codec_for(output, args.bitrate) + ["-shortest", output]run(cmd)r = probe(output)a = r["audio"]- info(f"wrote {output} ({r['duration']:.3f}s, audio {a['codec']} {a['channels']}ch {a['sample_rate']}Hz)")- emit(output)+ if r.get("video") and audio_out and not STATE["dry_run"]:+ die(f"{output} unexpectedly contains a video stream")+ info(f"wrote {output} ({r['duration']:.3f}s, audio {a['codec']} {a['channels']}ch {a['sample_rate']}Hz"+ + (", video stream-copied" if has_video and not audio_out else ", video dropped" if has_video else "") + ")")+ emit(output, video=bool(has_video and not audio_out), audio_stream=args.audio_stream,+ dynamics=[f for f in (args.gate and "agate", args.compress and "acompressor", args.limit and "alimiter") if f])return 0diff --git a/scripts/cut.py b/scripts/cut.pyindex 8587440..25009f2 100755--- a/scripts/cut.py+++ b/scripts/cut.py@@ -5,10 +5,19 @@ Lossless stream copy (-c copy) is preferred. Cuts snap to keyframes in thatmode, so if frame accuracy matters pass --accurate to re-encode. Multiplesegments are cut individually and concatenated with the concat demuxer.+Audio: a stream copy lands on a packet boundary (about 21 ms for AAC, one+demuxer block for WAV); --accurate decodes and trims to the sample. The output+extension picks the codec: -o out.wav writes PCM (never an AAC packet inside a+WAV), -o out.m4a writes AAC; an audio extension on a video input drops the+picture (mp4 -> wav extraction). The result reports `precision`+(packet / sample / codec_frame / frame) and the measured duration error.+Examples:python3 cut.py input.mp4 --start 00:00:10 --end 00:00:25python3 cut.py input.mp4 --segments 0:05-0:12,1:00-1:20 -o highlights.mp4python3 cut.py input.mp4 --start 3.5 --duration 10 --accurate+ python3 cut.py talk.wav --start 1.2345 --end 2.3456 --accurate -o part.wav # sample-exact+ python3 cut.py talk.mp4 --start 1:00 --end 2:00 -o part.wav # audio extraction"""import argparseimport os@@ -16,7 +25,7 @@ import sysimport tempfilefrom typing import List, Tuple-from _common import video_args, STATE, add_common, apply_common, emit, aac_args, cfr_args, default_output, die, ffmpeg_base, info, parse_time, probe, run, x264_args+from _common import video_args, STATE, add_common, apply_common, audio_codec_for, emit, aac_args, cfr_args, default_output, die, ffmpeg_base, info, is_audio_output, parse_time, probe, rundef parse_segments(spec: str) -> List[Tuple[float, float]]:@@ -37,15 +46,62 @@ def parse_segments(spec: str) -> List[Tuple[float, float]]:return segs+def encode_args(meta: dict, dst: str, crf: int, preset: str) -> List[str]:+ """Codec arguments for a re-encoded cut: video + AAC into a video container, otherwise the codec+ the audio extension names (PCM for .wav, FLAC, MP3, AAC...) with no video stream."""+ if is_audio_output(dst) or not meta.get("video"):+ return ["-vn"] + audio_codec_for(dst)+ return video_args(meta, crf, preset) + cfr_args(meta) + aac_args()+++def copy_args(meta: dict, dst: str) -> List[str]:+ """Stream-copy arguments: everything into a video container, audio only into an audio extension."""+ if is_audio_output(dst) and meta.get("video"):+ return ["-vn", "-c:a", "copy"]+ return ["-c", "copy"]+++LOSSLESS_AUDIO = {"pcm_s16le", "pcm_s24le", "pcm_s32le", "pcm_f32le", "flac"}+++def precision_of(meta: dict, dst: str, reencoded: bool) -> str:+ """How exact the cut is, measured on what was written:++ packet stream copy; the cut lands on a packet (audio) or keyframe (video) boundary+ sample decoded audio trimmed to the sample and written losslessly (PCM / FLAC)+ codec_frame decoded audio trimmed to the sample, then framed by a lossy encoder (AAC 1024,+ MP3 1152, Opus 960 samples) which also adds its priming delay to the reported length+ frame re-encoded video: the picture is frame-exact, the audio underneath is sample-trimmed+ """+ if not reencoded:+ return "packet"+ if is_audio_output(dst) or not meta.get("video"):+ codec = audio_codec_for(dst)[1]+ return "sample" if codec in LOSSLESS_AUDIO else "codec_frame"+ return "frame"++def cut_one(src: str, start: float, end: float, dst: str, reencode: bool, crf: int, preset: str, tolerance: float = 0.5, meta: dict = None) -> bool:"""Cut one segment. Returns True if the result was re-encoded."""dur = end - startmeta = meta or probe(src)+ audio_only = is_audio_output(dst) or not meta.get("video")+ if not reencode and audio_only and audio_codec_for(dst)[1].startswith("pcm") and not str((meta.get("audio") or {}).get("codec", "")).startswith("pcm"):+ info(f"{(meta.get('audio') or {}).get('codec')} packets cannot be copied into a PCM container; decoding to PCM")+ reencode = Trueif reencode:- cmd = ffmpeg_base() + ["-ss", f"{start:.3f}", "-i", src, "-t", f"{dur:.3f}"]- cmd += video_args(meta, crf, preset) + cfr_args(meta) + aac_args() + ["-avoid_negative_ts", "make_zero", dst]+ # -ss before -i seeks, then decoding discards samples up to the exact start (accurate_seek);+ # atrim bounds the decoded stream to the requested length at sample resolution.+ cmd = ffmpeg_base() + ["-ss", f"{start:.6f}", "-i", src, "-t", f"{dur:.6f}"]+ if is_audio_output(dst) or not meta.get("video"):+ cmd += ["-af", f"atrim=end={dur:.6f},asetpts=PTS-STARTPTS"]+ cmd += encode_args(meta, dst, crf, preset) + ["-avoid_negative_ts", "make_zero", dst]+ elif audio_only:+ # output-side seek: an input seek on a video file lands on the previous video keyframe and on+ # FLAC/MP3 on a coarse index; reading from the start and dropping packets is exact to the packet+ cmd = ffmpeg_base() + ["-i", src, "-ss", f"{start:.6f}", "-t", f"{dur:.6f}"] + copy_args(meta, dst) + ["-avoid_negative_ts", "make_zero", dst]else:- cmd = ffmpeg_base() + ["-ss", f"{start:.3f}", "-i", src, "-t", f"{dur:.3f}", "-c", "copy", "-avoid_negative_ts", "make_zero", dst]+ cmd = ffmpeg_base() + ["-ss", f"{start:.3f}", "-i", src, "-t", f"{dur:.3f}"] + copy_args(meta, dst) + ["-avoid_negative_ts", "make_zero", dst]proc = run(cmd, check=False)if proc.returncode != 0:if not reencode:@@ -70,7 +126,7 @@ def main() -> int:g.add_argument("--end", help="end time")g.add_argument("--duration", help="duration instead of --end")ap.add_argument("--segments", help="comma separated START-END list, e.g. '0:05-0:12,1:00-1:20' (joined in order)")- ap.add_argument("--accurate", action="store_true", help="always re-encode for frame-accurate cuts (default: lossless -c copy, re-encoding only when the keyframe snap exceeds --tolerance)")+ ap.add_argument("--accurate", action="store_true", help="always re-encode for frame-accurate (video) / sample-accurate (audio) cuts (default: lossless -c copy, re-encoding only when the keyframe snap exceeds --tolerance)")ap.add_argument("--tolerance", type=float, default=0.5, help="max seconds a lossless cut may deviate before re-encoding kicks in (default 0.5, -1 = never)")ap.add_argument("--crf", type=int, default=18, help="x264 CRF when re-encoding (default 18)")ap.add_argument("--preset", default="medium", help="x264 preset when re-encoding")@@ -126,14 +182,17 @@ def main() -> int:proc = run(cmd, check=False)if proc.returncode != 0:info("concat with stream copy failed, re-encoding the join")- cmd = ffmpeg_base() + ["-f", "concat", "-safe", "0", "-i", listfile] + video_args(meta, args.crf, args.preset) + cfr_args(meta) + aac_args() + [output]+ cmd = ffmpeg_base() + ["-f", "concat", "-safe", "0", "-i", listfile] + encode_args(meta, output, args.crf, args.preset) + [output]run(cmd)result = probe(output)expected = sum(e - s for s, e in segments)- info(f"wrote {output} ({result.get('duration'):.3f}s, expected ~{expected:.3f}s, "- + ("re-encoded" if reencoded else "lossless stream copy") + ")")- emit(output)+ precision = precision_of(meta, output, reencoded)+ got = result.get("duration")+ error_ms = round((got - expected) * 1000, 3) if got is not None and not STATE["dry_run"] else None+ info(f"wrote {output} ({got:.3f}s, expected ~{expected:.3f}s, "+ + ("re-encoded" if reencoded else "lossless stream copy") + f", {precision} precision)")+ emit(output, expected_duration=round(expected, 6), duration_error_ms=error_ms, precision=precision, reencoded=reencoded)return 0diff --git a/scripts/join.py b/scripts/join.pyindex 83f3961..6db6112 100755--- a/scripts/join.py+++ b/scripts/join.py@@ -5,19 +5,81 @@ layout so mismatched sources (phone + camera + screen recording) cut together.Transitions (xfade): fade, dissolve, wipeleft, wiperight, wipeup, wipedown,slideleft, slideright, circleopen, fadeblack, fadewhite, smoothleft, none.+Audio-only inputs (WAV, FLAC, MP3, M4A, ...) are joined as audio: every clip is+resampled to one rate and channel layout (the first clip's rate, the widest+layout; --sample-rate / --channels override), crossfaded with acrossfade or+butted with concat, and written in the codec the output extension names. The+output of an audio join must be an audio extension; mixing audio and video+inputs is refused.+Examples:python3 join.py a.mp4 b.mp4 c.mp4 -o final.mp4 # 0.5 s crossfade, size/fps from the first clippython3 join.py *.mp4 --transition fadeblack --duration 1 -o reel.mp4python3 join.py a.mov b.mp4 --transition none --width 1920 --height 1080 --fps 30+ python3 join.py intro.wav talk.m4a outro.wav -o episode.flac # audio join, 0.5 s crossfade+ python3 join.py part1.wav part2.wav --transition none -o full.wav # butt join, sample rate of part1"""import argparseimport sysfrom typing import List-from _common import STATE, video_args, aac_args, add_common, apply_common, default_output, die, emit, ffmpeg_base, info, probe, run, x264_args+from _common import STATE, video_args, aac_args, add_common, apply_common, audio_codec_for, default_output, die, emit, ffmpeg_base, info, is_audio_output, probe, runTRANSITIONS = ["fade", "dissolve", "wipeleft", "wiperight", "wipeup", "wipedown", "slideleft", "slideright","circleopen", "circleclose", "fadeblack", "fadewhite", "smoothleft", "smoothright", "radial", "none"]+LAYOUTS = {1: "mono", 2: "stereo", 6: "5.1", 8: "7.1"}+++def join_audio(args: argparse.Namespace, metas: List[dict]) -> int:+ """Concatenate audio-only inputs: one sample rate, one channel layout, acrossfade or concat."""+ n = len(args.inputs)+ durs = [m.get("duration") or 0.0 for m in metas]+ d = args.duration if args.transition != "none" else 0.0+ for p, dur in zip(args.inputs, durs):+ if d and dur <= d * 2 and not STATE["dry_run"]:+ die(f"{p} is only {dur:.2f}s, too short for a {d:.2f}s crossfade; shorten --duration")+ rates = [m["audio"].get("sample_rate") or 48000 for m in metas]+ chans = [m["audio"].get("channels") or 2 for m in metas]+ rate = args.sample_rate or rates[0]+ channels = args.channels or max(chans)+ layout = LAYOUTS.get(channels)+ if layout is None:+ die(f"{channels}-channel output has no standard layout here (1, 2, 6 or 8); pass --channels")+ if len(set(rates)) > 1:+ info(f"sample rates differ ({', '.join(str(r) for r in rates)} Hz); resampling every clip to {rate} Hz")+ if len(set(chans)) > 1:+ info(f"channel counts differ ({', '.join(str(c) for c in chans)}); every clip becomes {layout}")+ output = args.output or default_output(args.inputs[0], "joined")+ if not is_audio_output(output):+ die(f"audio-only inputs cannot fill a video container: give -o an audio extension (.wav, .flac, .mp3, .m4a, .ogg, .opus), not {output}")++ cmd = ffmpeg_base()+ for p in args.inputs:+ cmd += ["-i", p]+ parts = [f"[{i}:a:0]aformat=sample_rates={rate}:channel_layouts={layout},asetpts=PTS-STARTPTS[a{i}]" for i in range(n)]+ if args.transition == "none":+ parts.append("".join(f"[a{i}]" for i in range(n)) + f"concat=n={n}:v=0:a=1[aout]")+ else:+ prev = "a0"+ for i in range(1, n):+ out = f"ax{i}" if i < n - 1 else "aout"+ parts.append(f"[{prev}][a{i}]acrossfade=d={d:g}:c1=tri:c2=tri[{out}]")+ prev = out+ cmd += ["-filter_complex", ";".join(parts), "-map", "[aout]", "-vn"] + audio_codec_for(output) + [output]+ run(cmd)+ expected = sum(durs) - d * (n - 1)+ r = probe(output)+ a = r.get("audio") or {}+ if not STATE["dry_run"]:+ if r.get("video"):+ die(f"{output} unexpectedly contains a video stream")+ if a.get("sample_rate") != rate or a.get("channels") != channels:+ die(f"{output} is {a.get('sample_rate')} Hz {a.get('channels')} ch, expected {rate} Hz {channels} ch")+ info(f"wrote {output} ({r['duration']:.3f}s, expected ~{expected:.3f}s, audio {a.get('codec')} {channels}ch {rate}Hz, {n} clips, "+ + ("crossfade" if d else "butt join") + ")")+ emit(output, mode="audio", clips=n, transition=args.transition if d else "none", expected_duration=round(expected, 3),+ sample_rate=rate, channels=channels, video=False)+ return 0def main() -> int:@@ -33,6 +95,9 @@ def main() -> int:ap.add_argument("--pad-color", default="black")ap.add_argument("--crf", type=int, default=18)ap.add_argument("--preset", default="medium")+ aud = ap.add_argument_group("audio-only inputs")+ aud.add_argument("--sample-rate", type=int, help="output sample rate in Hz (default: first clip's)")+ aud.add_argument("--channels", type=int, choices=[1, 2, 6, 8], help="output channel count (default: the widest clip)")add_common(ap)args = ap.parse_args()apply_common(args)@@ -40,9 +105,15 @@ def main() -> int:if len(args.inputs) < 2:die("give at least two clips")metas = [probe(p) for p in args.inputs]+ if all(not m.get("video") for m in metas):+ for p, m in zip(args.inputs, metas):+ if not m.get("audio"):+ die(f"{p} has neither a video nor an audio stream")+ return join_audio(args, metas)for p, m in zip(args.inputs, metas):if not m.get("video"):- die(f"{p} has no video stream")+ others = [q for q, mm in zip(args.inputs, metas) if mm.get("video")]+ die(f"{p} has no video stream" + (f" while {others[0]} has one; join audio with audio or give every clip a picture" if others else ""))first = metas[0]["video"]fw, fh = first["width"], first["height"]if first.get("rotation") in (90, -90, 270, -270):@@ -111,7 +182,7 @@ def main() -> int:expected = sum(durs) - d * (n - 1)r = probe(output)info(f"wrote {output} ({r['duration']:.3f}s, expected ~{expected:.3f}s, {w}x{h} @ {fps:g}fps, {n} clips, {args.transition})")- emit(output, clips=n, transition=args.transition, expected_duration=round(expected, 3))+ emit(output, mode="video", clips=n, transition=args.transition, expected_duration=round(expected, 3))return 0diff --git a/tests/fixtures/README.md b/tests/fixtures/README.mdnew file mode 100644index 0000000..0a1b3f5--- /dev/null+++ b/tests/fixtures/README.md@@ -0,0 +1,24 @@+# ffmpeg listing fixtures++Captured or constructed stdout of `ffmpeg -hide_banner -filters / -encoders / -bsfs`, used by+`tests/test_contract.py` to prove that capability detection (`doctor`) reads every layout FFmpeg+has printed. CI uploads each runner's listings and `doctor --json` as the `ffmpeg-listings-<os>`+artifact; copy a new layout from there into this directory and add it to the test table.++| File | Origin |+|---|---|+| `ffmpeg_filters_6.1.txt`, `ffmpeg_encoders_6.1.txt`, `ffmpeg_bsfs_6.1.txt` | **captured** from FFmpeg 6.1.1 (Ubuntu 24.04 apt; same output as the ubuntu-latest CI runner) |+| `ffmpeg_filters_8.1.2_macos.txt`, `ffmpeg_encoders_8.1.2_macos.txt`, `ffmpeg_bsfs_8.1.2_macos.txt` | **captured** from FFmpeg 8.1.2 (Homebrew bottle, macos-latest CI runner). This build has no libfreetype / libass / libzimg, so `drawtext`, `subtitles`, `ass` and `zscale` are absent from the listing; the tests expect `doctor` to report exactly those as missing |+| `ffmpeg_filters_9.0.1_windows.txt`, `ffmpeg_encoders_9.0.1_windows.txt`, `ffmpeg_bsfs_9.0.1_windows.txt` | **captured** from FFmpeg 9.0.1 (gyan.dev essentials build, windows-latest CI runner, CRLF line endings kept as captured) |+| `ffmpeg_filters_7.1_constructed.txt` | **constructed**: the 6.1 capture unchanged, kept under its own name so the version matrix names FFmpeg 7 explicitly (7.x prints the 6.x layout: three flag characters `T.. .S. ..C`). Not a capture of an FFmpeg 7 binary. |+| `ffmpeg_filters_garbage.txt` | not a listing at all: must yield `unknown`, never `missing` |++What the FFmpeg 8.1.2 and 9.0.1 captures show (an earlier constructed 8.0 file had guessed a+different legend and was replaced by the capture): the legend still prints three-character keys+(`T.. = Timeline support`, `.S. = Slice threading`) while the rows carry two (` TS aap AA->A`),+and a ` ------` separator line follows the legend. The parser keys on the io-spec token (`A->A`,+`AA->A`, `|->V`, `N->N`) and ignores the flag column and the legend.++The 7.1 file is the one remaining construction: it reproduces the 6.x row format with the 6.1+filter set and is not a capture of an FFmpeg 7 binary. Replace it with a capture when one is at+hand and keep the name so the tests keep working.diff --git a/tests/fixtures/ffmpeg_bsfs_6.1.txt b/tests/fixtures/ffmpeg_bsfs_6.1.txtnew file mode 100644index 0000000..4c9667e--- /dev/null+++ b/tests/fixtures/ffmpeg_bsfs_6.1.txt@@ -0,0 +1,46 @@+Bitstream filters:+aac_adtstoasc+av1_frame_merge+av1_frame_split+av1_metadata+chomp+dump_extra+dca_core+dts2pts+dv_error_marker+eac3_core+extract_extradata+filter_units+h264_metadata+h264_mp4toannexb+h264_redundant_pps+hapqa_extract+hevc_metadata+hevc_mp4toannexb+imxdump+media100_to_mjpegb+mjpeg2jpeg+mjpegadump+mp3decomp+mpeg2_metadata+mpeg4_unpack_bframes+mov2textsub+noise+null+opus_metadata+pcm_rechunk+pgs_frame_merge+prores_metadata+remove_extra+setts+text2movsub+trace_headers+truehd_core+vp9_metadata+vp9_raw_reorder+vp9_superframe+vp9_superframe_split+vvc_metadata+vvc_mp4toannexb+evc_frame_merge+diff --git a/tests/fixtures/ffmpeg_bsfs_8.1.2_macos.txt b/tests/fixtures/ffmpeg_bsfs_8.1.2_macos.txtnew file mode 100644index 0000000..a18df27--- /dev/null+++ b/tests/fixtures/ffmpeg_bsfs_8.1.2_macos.txt@@ -0,0 +1,52 @@+Bitstream filters:+aac_adtstoasc+ahx_to_mp2+apv_metadata+av1_frame_merge+av1_frame_split+av1_metadata+chomp+dump_extra+dca_core+dovi_rpu+dts2pts+dv_error_marker+eac3_core+eia608_to_smpte436m+evc_frame_merge+extract_extradata+filter_units+h264_metadata+h264_mp4toannexb+h264_redundant_pps+hapqa_extract+hevc_metadata+hevc_mp4toannexb+imxdump+lcevc_metadata+media100_to_mjpegb+mjpeg2jpeg+mjpegadump+mpeg2_metadata+mpeg4_unpack_bframes+mov2textsub+noise+null+opus_metadata+pcm_rechunk+pgs_frame_merge+prores_metadata+remove_extra+setts+showinfo+smpte436m_to_eia608+text2movsub+trace_headers+truehd_core+vp9_metadata+vp9_raw_reorder+vp9_superframe+vp9_superframe_split+vvc_metadata+vvc_mp4toannexb+diff --git a/tests/fixtures/ffmpeg_bsfs_9.0.1_windows.txt b/tests/fixtures/ffmpeg_bsfs_9.0.1_windows.txtnew file mode 100644index 0000000..1780d84--- /dev/null+++ b/tests/fixtures/ffmpeg_bsfs_9.0.1_windows.txt@@ -0,0 +1,53 @@+Bitstream filters:+aac_adtstoasc+ahx_to_mp2+apv_metadata+av1_frame_merge+av1_frame_split+av1_metadata+chomp+dump_extra+dca_core+dovi_rpu+dovi_split+dts2pts+dv_error_marker+eac3_core+eia608_to_smpte436m+evc_frame_merge+extract_extradata+filter_units+h264_metadata+h264_mp4toannexb+h264_redundant_pps+hapqa_extract+hevc_metadata+hevc_mp4toannexb+imxdump+lcevc_metadata+media100_to_mjpegb+mjpeg2jpeg+mjpegadump+mpeg2_metadata+mpeg4_unpack_bframes+mov2textsub+noise+null+opus_metadata+pcm_rechunk+pgs_frame_merge+prores_metadata+remove_extra+setts+showinfo+smpte436m_to_eia608+text2movsub+trace_headers+truehd_core+vp9_metadata+vp9_raw_reorder+vp9_superframe+vp9_superframe_split+vvc_metadata+vvc_mp4toannexb+diff --git a/tests/fixtures/ffmpeg_encoders_6.1.txt b/tests/fixtures/ffmpeg_encoders_6.1.txtnew file mode 100644index 0000000..08bcd5d--- /dev/null+++ b/tests/fixtures/ffmpeg_encoders_6.1.txt@@ -0,0 +1,233 @@+Encoders:+ V..... = Video+ A..... = Audio+ S..... = Subtitle+ .F.... = Frame-level multithreading+ ..S... = Slice-level multithreading+ ...X.. = Codec is experimental+ ....B. = Supports draw_horiz_band+ .....D = Supports direct rendering method 1+ ------+ V....D a64multi Multicolor charset for Commodore 64 (codec a64_multi)+ V....D a64multi5 Multicolor charset for Commodore 64, extended with 5th color (colram) (codec a64_multi5)+ V....D alias_pix Alias/Wavefront PIX image+ V..... amv AMV Video+ V....D apng APNG (Animated Portable Network Graphics) image+ V....D asv1 ASUS V1+ V....D asv2 ASUS V2+ V....D libaom-av1 libaom AV1 (codec av1)+ V....D librav1e librav1e AV1 (codec av1)+ V..... libsvtav1 SVT-AV1(Scalable Video Technology for AV1) encoder (codec av1)+ V....D av1_nvenc NVIDIA NVENC av1 encoder (codec av1)+ V..... av1_qsv AV1 (Intel Quick Sync Video acceleration) (codec av1)+ V....D av1_vaapi AV1 (VAAPI) (codec av1)+ V....D avrp Avid 1:1 10-bit RGB Packer+ V..X.D avui Avid Meridien Uncompressed+ V....D ayuv Uncompressed packed MS 4:4:4:4+ VF...D bitpacked Bitpacked+ V....D bmp BMP (Windows and OS/2 bitmap)+ VF...D cfhd GoPro CineForm HD+ V....D cinepak Cinepak+ V....D cljr Cirrus Logic AccuPak+ V.S..D vc2 SMPTE VC-2 (codec dirac)+ VFS..D dnxhd VC3/DNxHD+ V....D dpx DPX (Digital Picture Exchange) image+ VFS..D dvvideo DV (Digital Video)+ VF...D exr OpenEXR image+ V.S..D ffv1 FFmpeg video codec #1+ VF...D ffvhuff Huffyuv FFmpeg variant+ V....D fits Flexible Image Transport System+ V....D flashsv Flash Screen Video+ V....D flashsv2 Flash Screen Video Version 2+ V..... flv FLV / Sorenson Spark / Sorenson H.263 (Flash Video) (codec flv1)+ V....D gif GIF (Graphics Interchange Format)+ V..... h261 H.261+ V..... h263 H.263 / H.263-1996+ V..... h263_v4l2m2m V4L2 mem2mem H.263 encoder wrapper (codec h263)+ V.S... h263p H.263+ / H.263-1998 / H.263 version 2+ V....D libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264)+ V....D libx264rgb libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB (codec h264)+ V....D h264_nvenc NVIDIA NVENC H.264 encoder (codec h264)+ V..... h264_qsv H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration) (codec h264)+ V..... h264_v4l2m2m V4L2 mem2mem H.264 encoder wrapper (codec h264)+ V....D h264_vaapi H.264/AVC (VAAPI) (codec h264)+ V.S..D hap Vidvox Hap+ VF...D hdr HDR (Radiance RGBE format) image+ V....D libx265 libx265 H.265 / HEVC (codec hevc)+ V....D hevc_nvenc NVIDIA NVENC hevc encoder (codec hevc)+ V..... hevc_qsv HEVC (Intel Quick Sync Video acceleration) (codec hevc)+ V..... hevc_v4l2m2m V4L2 mem2mem HEVC encoder wrapper (codec hevc)+ V....D hevc_vaapi H.265/HEVC (VAAPI) (codec hevc)+ VF...D huffyuv Huffyuv / HuffYUV+ VF...D jpeg2000 JPEG 2000+ VF.... libopenjpeg OpenJPEG JPEG 2000 (codec jpeg2000)+ VF...D jpegls JPEG-LS+ V..... libjxl libjxl JPEG XL (codec jpegxl)+ VF...D ljpeg Lossless JPEG+ VFS..D magicyuv MagicYUV video+ VFS... mjpeg MJPEG (Motion JPEG)+ V..... mjpeg_qsv MJPEG (Intel Quick Sync Video acceleration) (codec mjpeg)+ V....D mjpeg_vaapi MJPEG (VAAPI) (codec mjpeg)+ V.S... mpeg1video MPEG-1 video+ V.S... mpeg2video MPEG-2 video+ V..... mpeg2_qsv MPEG-2 video (Intel Quick Sync Video acceleration) (codec mpeg2video)+ V....D mpeg2_vaapi MPEG-2 (VAAPI) (codec mpeg2video)+ V.S... mpeg4 MPEG-4 part 2+ V....D libxvid libxvidcore MPEG-4 part 2 (codec mpeg4)+ V..... mpeg4_v4l2m2m V4L2 mem2mem MPEG4 encoder wrapper (codec mpeg4)+ V..... msmpeg4v2 MPEG-4 part 2 Microsoft variant version 2+ V..... msmpeg4 MPEG-4 part 2 Microsoft variant version 3 (codec msmpeg4v3)+ V....D msrle Microsoft RLE+ V..... msvideo1 Microsoft Video-1+ V....D pam PAM (Portable AnyMap) image+ V....D pbm PBM (Portable BitMap) image+ V....D pcx PC Paintbrush PCX image+ V....D pfm PFM (Portable FloatMap) image+ V....D pgm PGM (Portable GrayMap) image+ V....D pgmyuv PGMYUV (Portable GrayMap YUV) image+ V....D phm PHM (Portable HalfFloatMap) image+ VF...D png PNG (Portable Network Graphics) image+ V....D ppm PPM (Portable PixelMap) image+ VF...D prores Apple ProRes+ VF...D prores_aw Apple ProRes (codec prores)+ VFS... prores_ks Apple ProRes (iCodec Pro) (codec prores)+ VF...D qoi QOI (Quite OK Image format) image+ V....D qtrle QuickTime Animation (RLE) video+ V....D r10k AJA Kona 10-bit RGB Codec+ V....D r210 Uncompressed RGB 10-bit+ VF...D rawvideo raw video+ V....D roqvideo id RoQ video (codec roq)+ V....D rpza QuickTime video (RPZA)+ V..... rv10 RealVideo 1.0+ V..... rv20 RealVideo 2.0+ V....D sgi SGI image+ V....D smc QuickTime Graphics (SMC)+ V....D snow Snow+ V..... speedhq NewTek SpeedHQ+ V....D sunrast Sun Rasterfile image+ V....D svq1 Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1+ V....D targa Truevision Targa image+ V....D libtheora libtheora Theora (codec theora)+ VF...D tiff TIFF image+ VF...D utvideo Ut Video+ VF...D v210 Uncompressed 4:2:2 10-bit+ V....D v308 Uncompressed packed 4:4:4+ V....D v408 Uncompressed packed QT 4:4:4:4+ V....D v410 Uncompressed 4:4:4 10-bit+ V.S..D vbn Vizrt Binary Image+ V..... vnull null video+ V....D libvpx libvpx VP8 (codec vp8)+ V..... vp8_v4l2m2m V4L2 mem2mem VP8 encoder wrapper (codec vp8)+ V....D vp8_vaapi VP8 (VAAPI) (codec vp8)+ V....D libvpx-vp9 libvpx VP9 (codec vp9)+ V....D vp9_vaapi VP9 (VAAPI) (codec vp9)+ V..... vp9_qsv VP9 video (Intel Quick Sync Video acceleration) (codec vp9)+ VF...D wbmp WBMP (Wireless Application Protocol Bitmap) image+ V....D libwebp_anim libwebp WebP image (codec webp)+ V....D libwebp libwebp WebP image (codec webp)+ V..... wmv1 Windows Media Video 7+ V..... wmv2 Windows Media Video 8+ V..... wrapped_avframe AVFrame to AVPacket passthrough+ V....D xbm XBM (X BitMap) image+ V....D xface X-face image+ V....D xwd XWD (X Window Dump) image+ V....D y41p Uncompressed YUV 4:1:1 12-bit+ V....D yuv4 Uncompressed packed 4:2:0+ VF...D zlib LCL (LossLess Codec Library) ZLIB+ V....D zmbv Zip Motion Blocks Video+ A....D aac AAC (Advanced Audio Coding)+ A....D ac3 ATSC A/52A (AC-3)+ A....D ac3_fixed ATSC A/52A (AC-3) (codec ac3)+ A....D adpcm_adx SEGA CRI ADX ADPCM+ A....D adpcm_argo ADPCM Argonaut Games+ A....D g722 G.722 ADPCM (codec adpcm_g722)+ A....D g726 G.726 ADPCM (codec adpcm_g726)+ A....D g726le G.726 little endian ADPCM ("right-justified") (codec adpcm_g726le)+ A....D adpcm_ima_alp ADPCM IMA High Voltage Software ALP+ A....D adpcm_ima_amv ADPCM IMA AMV+ A....D adpcm_ima_apm ADPCM IMA Ubisoft APM+ A....D adpcm_ima_qt ADPCM IMA QuickTime+ A....D adpcm_ima_ssi ADPCM IMA Simon & Schuster Interactive+ A....D adpcm_ima_wav ADPCM IMA WAV+ A....D adpcm_ima_ws ADPCM IMA Westwood+ A....D adpcm_ms ADPCM Microsoft+ A....D adpcm_swf ADPCM Shockwave Flash+ A....D adpcm_yamaha ADPCM Yamaha+ A....D alac ALAC (Apple Lossless Audio Codec)+ A..... anull null audio+ A....D aptx aptX (Audio Processing Technology for Bluetooth)+ A....D aptx_hd aptX HD (Audio Processing Technology for Bluetooth)+ A....D libcodec2 codec2 encoder using libcodec2 (codec codec2)+ A....D comfortnoise RFC 3389 comfort noise generator+ A....D dfpwm DFPWM1a audio+ A..X.D dca DCA (DTS Coherent Acoustics) (codec dts)+ A....D eac3 ATSC A/52 E-AC-3+ A....D flac FLAC (Free Lossless Audio Codec)+ A....D g723_1 G.723.1+ A....D libgsm libgsm GSM (codec gsm)+ A....D libgsm_ms libgsm GSM Microsoft variant (codec gsm_ms)+ A..X.D mlp MLP (Meridian Lossless Packing)+ A....D mp2 MP2 (MPEG audio layer 2)+ A....D mp2fixed MP2 fixed point (MPEG audio layer 2) (codec mp2)+ A....D libtwolame libtwolame MP2 (MPEG audio layer 2) (codec mp2)+ A....D libmp3lame libmp3lame MP3 (MPEG audio layer 3) (codec mp3)+ A....D libshine libshine MP3 (MPEG audio layer 3) (codec mp3)+ A....D nellymoser Nellymoser Asao+ A..X.D opus Opus+ A....D libopus libopus Opus (codec opus)+ A....D pcm_alaw PCM A-law / G.711 A-law+ A....D pcm_bluray PCM signed 16|20|24-bit big-endian for Blu-ray media+ A....D pcm_dvd PCM signed 16|20|24-bit big-endian for DVD media+ A....D pcm_f32be PCM 32-bit floating point big-endian+ A....D pcm_f32le PCM 32-bit floating point little-endian+ A....D pcm_f64be PCM 64-bit floating point big-endian+ A....D pcm_f64le PCM 64-bit floating point little-endian+ A....D pcm_mulaw PCM mu-law / G.711 mu-law+ A....D pcm_s16be PCM signed 16-bit big-endian+ A....D pcm_s16be_planar PCM signed 16-bit big-endian planar+ A....D pcm_s16le PCM signed 16-bit little-endian+ A....D pcm_s16le_planar PCM signed 16-bit little-endian planar+ A....D pcm_s24be PCM signed 24-bit big-endian+ A....D pcm_s24daud PCM D-Cinema audio signed 24-bit+ A....D pcm_s24le PCM signed 24-bit little-endian+ A....D pcm_s24le_planar PCM signed 24-bit little-endian planar+ A....D pcm_s32be PCM signed 32-bit big-endian+ A....D pcm_s32le PCM signed 32-bit little-endian+ A....D pcm_s32le_planar PCM signed 32-bit little-endian planar+ A....D pcm_s64be PCM signed 64-bit big-endian+ A....D pcm_s64le PCM signed 64-bit little-endian+ A....D pcm_s8 PCM signed 8-bit+ A....D pcm_s8_planar PCM signed 8-bit planar+ A....D pcm_u16be PCM unsigned 16-bit big-endian+ A....D pcm_u16le PCM unsigned 16-bit little-endian+ A....D pcm_u24be PCM unsigned 24-bit big-endian+ A....D pcm_u24le PCM unsigned 24-bit little-endian+ A....D pcm_u32be PCM unsigned 32-bit big-endian+ A....D pcm_u32le PCM unsigned 32-bit little-endian+ A....D pcm_u8 PCM unsigned 8-bit+ A....D pcm_vidc PCM Archimedes VIDC+ A....D real_144 RealAudio 1.0 (14.4K) (codec ra_144)+ A....D roq_dpcm id RoQ DPCM+ A..X.D s302m SMPTE 302M+ A....D sbc SBC (low-complexity subband codec)+ A..X.D sonic Sonic+ A..X.D sonicls Sonic lossless+ A....D libspeex libspeex Speex (codec speex)+ A..X.D truehd TrueHD+ A....D tta TTA (True Audio)+ A..X.D vorbis Vorbis+ A....D libvorbis libvorbis (codec vorbis)+ A....D wavpack WavPack+ A....D wmav1 Windows Media Audio 1+ A....D wmav2 Windows Media Audio 2+ S..... ssa ASS (Advanced SubStation Alpha) subtitle (codec ass)+ S..... ass ASS (Advanced SubStation Alpha) subtitle+ S..... dvbsub DVB subtitles (codec dvb_subtitle)+ S..... dvdsub DVD subtitles (codec dvd_subtitle)+ S..... mov_text 3GPP Timed Text subtitle+ S..... srt SubRip subtitle (codec subrip)+ S..... subrip SubRip subtitle+ S..... text Raw text subtitle+ S..... ttml TTML subtitle+ S..... webvtt WebVTT subtitle+ S..... xsub DivX subtitles (XSUB)diff --git a/tests/fixtures/ffmpeg_encoders_8.1.2_macos.txt b/tests/fixtures/ffmpeg_encoders_8.1.2_macos.txtnew file mode 100644index 0000000..39d93b0--- /dev/null+++ b/tests/fixtures/ffmpeg_encoders_8.1.2_macos.txt@@ -0,0 +1,202 @@+Encoders:+ V..... = Video+ A..... = Audio+ S..... = Subtitle+ .F.... = Frame-level multithreading+ ..S... = Slice-level multithreading+ ...X.. = Codec is experimental+ ....B. = Supports draw_horiz_band+ .....D = Supports direct rendering method 1+ ------+ V....D a64multi Multicolor charset for Commodore 64 (codec a64_multi)+ V....D a64multi5 Multicolor charset for Commodore 64, extended with 5th color (colram) (codec a64_multi5)+ V....D alias_pix Alias/Wavefront PIX image+ V....D amv AMV Video+ V....D apng APNG (Animated Portable Network Graphics) image+ V....D asv1 ASUS V1+ V....D asv2 ASUS V2+ V..... libsvtav1 SVT-AV1(Scalable Video Technology for AV1) encoder (codec av1)+ V....D avrp Avid 1:1 10-bit RGB Packer+ V..X.D avui Avid Meridien Uncompressed+ VF...D bitpacked Bitpacked+ V....D bmp BMP (Windows and OS/2 bitmap)+ VF...D cfhd GoPro CineForm HD+ V....D cinepak Cinepak+ V....D cljr Cirrus Logic AccuPak+ V.S..D vc2 SMPTE VC-2 (codec dirac)+ VFS..D dnxhd VC3/DNxHD+ V....D dpx DPX (Digital Picture Exchange) image+ VFS..D dvvideo DV (Digital Video)+ VFS..D dxv Resolume DXV+ VF...D exr OpenEXR image+ V.S..D ffv1 FFmpeg video codec #1+ VF...D ffvhuff Huffyuv FFmpeg variant+ V....D fits Flexible Image Transport System+ V....D flashsv Flash Screen Video+ V....D flashsv2 Flash Screen Video Version 2+ V....D flv FLV / Sorenson Spark / Sorenson H.263 (Flash Video) (codec flv1)+ V....D gif GIF (Graphics Interchange Format)+ V....D h261 H.261+ V....D h263 H.263 / H.263-1996+ V.S..D h263p H.263+ / H.263-1998 / H.263 version 2+ V....D libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264)+ V....D libx264rgb libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB (codec h264)+ V....D h264_videotoolbox VideoToolbox H.264 Encoder (codec h264)+ VF...D hdr HDR (Radiance RGBE format) image+ V....D libx265 libx265 H.265 / HEVC (codec hevc)+ V....D hevc_videotoolbox VideoToolbox H.265 Encoder (codec hevc)+ VF...D huffyuv Huffyuv / HuffYUV+ VF...D jpeg2000 JPEG 2000+ VF...D jpegls JPEG-LS+ VF...D ljpeg Lossless JPEG+ VFS..D magicyuv MagicYUV video+ VFS..D mjpeg MJPEG (Motion JPEG)+ V.S..D mpeg1video MPEG-1 video+ V.S..D mpeg2video MPEG-2 video+ V.S..D mpeg4 MPEG-4 part 2+ V....D msmpeg4v2 MPEG-4 part 2 Microsoft variant version 2+ V....D msmpeg4 MPEG-4 part 2 Microsoft variant version 3 (codec msmpeg4v3)+ V....D msrle Microsoft RLE+ V..... msvideo1 Microsoft Video-1+ V....D pam PAM (Portable AnyMap) image+ V....D pbm PBM (Portable BitMap) image+ V....D pcx PC Paintbrush PCX image+ V....D pfm PFM (Portable FloatMap) image+ V....D pgm PGM (Portable GrayMap) image+ V....D pgmyuv PGMYUV (Portable GrayMap YUV) image+ V....D phm PHM (Portable HalfFloatMap) image+ VF...D png PNG (Portable Network Graphics) image+ V....D ppm PPM (Portable PixelMap) image+ VF...D prores Apple ProRes+ VF...D prores_aw Apple ProRes (codec prores)+ VFS... prores_ks Apple ProRes (iCodec Pro) (codec prores)+ V....D prores_videotoolbox VideoToolbox ProRes Encoder (codec prores)+ VF...D qoi QOI (Quite OK Image format) image+ V....D qtrle QuickTime Animation (RLE) video+ V....D r10k AJA Kona 10-bit RGB Codec+ V....D r210 Uncompressed RGB 10-bit+ VF...D rawvideo raw video+ V....D roqvideo id RoQ video (codec roq)+ V....D rpza QuickTime video (RPZA)+ V....D rv10 RealVideo 1.0+ V....D rv20 RealVideo 2.0+ V....D sgi SGI image+ V....D smc QuickTime Graphics (SMC)+ V....D snow Snow+ V....D speedhq NewTek SpeedHQ+ V....D sunrast Sun Rasterfile image+ V....D svq1 Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1+ V....D targa Truevision Targa image+ VF...D tiff TIFF image+ VF...D utvideo Ut Video+ VF...D v210 Uncompressed 4:2:2 10-bit+ V....D v308 Uncompressed packed 4:4:4+ V....D v408 Uncompressed packed QT 4:4:4:4+ V....D v410 Uncompressed 4:4:4 10-bit+ V.S..D vbn Vizrt Binary Image+ V..... vnull null video+ V....D libvpx libvpx VP8 (codec vp8)+ V....D libvpx-vp9 libvpx VP9 (codec vp9)+ VF...D wbmp WBMP (Wireless Application Protocol Bitmap) image+ V....D wmv1 Windows Media Video 7+ V....D wmv2 Windows Media Video 8+ V..... wrapped_avframe AVFrame to AVPacket passthrough+ V....D xbm XBM (X BitMap) image+ V....D xface X-face image+ V....D xwd XWD (X Window Dump) image+ V....D y41p Uncompressed YUV 4:1:1 12-bit+ V....D yuv4 Uncompressed packed 4:2:0+ VF...D zlib LCL (LossLess Codec Library) ZLIB+ V....D zmbv Zip Motion Blocks Video+ A....D aac AAC (Advanced Audio Coding)+ A..... aac_at aac (AudioToolbox) (codec aac)+ A....D ac3 ATSC A/52A (AC-3)+ A....D ac3_fixed ATSC A/52A (AC-3) (codec ac3)+ A....D adpcm_adx SEGA CRI ADX ADPCM+ A....D adpcm_argo ADPCM Argonaut Games+ A....D g722 G.722 ADPCM (codec adpcm_g722)+ A....D g726 G.726 ADPCM (codec adpcm_g726)+ A....D g726le G.726 little endian ADPCM ("right-justified") (codec adpcm_g726le)+ A....D adpcm_ima_alp ADPCM IMA High Voltage Software ALP+ A....D adpcm_ima_amv ADPCM IMA AMV+ A....D adpcm_ima_apm ADPCM IMA Ubisoft APM+ A....D adpcm_ima_qt ADPCM IMA QuickTime+ A....D adpcm_ima_ssi ADPCM IMA Simon & Schuster Interactive+ A....D adpcm_ima_wav ADPCM IMA WAV+ A....D adpcm_ima_ws ADPCM IMA Westwood+ A....D adpcm_ms ADPCM Microsoft+ A....D adpcm_swf ADPCM Shockwave Flash+ A....D adpcm_yamaha ADPCM Yamaha+ A....D alac ALAC (Apple Lossless Audio Codec)+ A..... alac_at alac (AudioToolbox) (codec alac)+ A..... anull null audio+ A....D aptx aptX (Audio Processing Technology for Bluetooth)+ A....D aptx_hd aptX HD (Audio Processing Technology for Bluetooth)+ A....D comfortnoise RFC 3389 comfort noise generator+ A....D dfpwm DFPWM1a audio+ A..X.D dca DCA (DTS Coherent Acoustics) (codec dts)+ A....D eac3 ATSC A/52 E-AC-3+ A....D flac FLAC (Free Lossless Audio Codec)+ A....D g723_1 G.723.1+ A..... ilbc_at ilbc (AudioToolbox) (codec ilbc)+ A..X.D mlp MLP (Meridian Lossless Packing)+ A....D mp2 MP2 (MPEG audio layer 2)+ A....D mp2fixed MP2 fixed point (MPEG audio layer 2) (codec mp2)+ A....D libmp3lame libmp3lame MP3 (MPEG audio layer 3) (codec mp3)+ A....D nellymoser Nellymoser Asao+ A..X.D opus Opus+ A....D libopus libopus Opus (codec opus)+ A....D pcm_alaw PCM A-law / G.711 A-law+ A..... pcm_alaw_at pcm_alaw (AudioToolbox) (codec pcm_alaw)+ A....D pcm_bluray PCM signed 16|20|24-bit big-endian for Blu-ray media+ A....D pcm_dvd PCM signed 16|20|24-bit big-endian for DVD media+ A....D pcm_f32be PCM 32-bit floating point big-endian+ A....D pcm_f32le PCM 32-bit floating point little-endian+ A....D pcm_f64be PCM 64-bit floating point big-endian+ A....D pcm_f64le PCM 64-bit floating point little-endian+ A....D pcm_mulaw PCM mu-law / G.711 mu-law+ A..... pcm_mulaw_at pcm_mulaw (AudioToolbox) (codec pcm_mulaw)+ A....D pcm_s16be PCM signed 16-bit big-endian+ A....D pcm_s16be_planar PCM signed 16-bit big-endian planar+ A....D pcm_s16le PCM signed 16-bit little-endian+ A....D pcm_s16le_planar PCM signed 16-bit little-endian planar+ A....D pcm_s24be PCM signed 24-bit big-endian+ A....D pcm_s24daud PCM D-Cinema audio signed 24-bit+ A....D pcm_s24le PCM signed 24-bit little-endian+ A....D pcm_s24le_planar PCM signed 24-bit little-endian planar+ A....D pcm_s32be PCM signed 32-bit big-endian+ A....D pcm_s32le PCM signed 32-bit little-endian+ A....D pcm_s32le_planar PCM signed 32-bit little-endian planar+ A....D pcm_s64be PCM signed 64-bit big-endian+ A....D pcm_s64le PCM signed 64-bit little-endian+ A....D pcm_s8 PCM signed 8-bit+ A....D pcm_s8_planar PCM signed 8-bit planar+ A....D pcm_u16be PCM unsigned 16-bit big-endian+ A....D pcm_u16le PCM unsigned 16-bit little-endian+ A....D pcm_u24be PCM unsigned 24-bit big-endian+ A....D pcm_u24le PCM unsigned 24-bit little-endian+ A....D pcm_u32be PCM unsigned 32-bit big-endian+ A....D pcm_u32le PCM unsigned 32-bit little-endian+ A....D pcm_u8 PCM unsigned 8-bit+ A....D pcm_vidc PCM Archimedes VIDC+ A....D real_144 RealAudio 1.0 (14.4K) (codec ra_144)+ A....D roq_dpcm id RoQ DPCM+ A..X.D s302m SMPTE 302M+ A....D sbc SBC (low-complexity subband codec)+ A..X.D truehd TrueHD+ A....D tta TTA (True Audio)+ A..X.D vorbis Vorbis+ A....D wavpack WavPack+ A....D wmav1 Windows Media Audio 1+ A....D wmav2 Windows Media Audio 2+ S..... ssa ASS (Advanced SubStation Alpha) subtitle (codec ass)+ S..... ass ASS (Advanced SubStation Alpha) subtitle+ S..... dvbsub DVB subtitles (codec dvb_subtitle)+ S..... dvdsub DVD subtitles (codec dvd_subtitle)+ S..... mov_text 3GPP Timed Text subtitle+ S..... srt SubRip subtitle (codec subrip)+ S..... subrip SubRip subtitle+ S..... text Raw text subtitle+ S..... ttml TTML subtitle+ S..... webvtt WebVTT subtitle+ S..... xsub DivX subtitles (XSUB)diff --git a/tests/fixtures/ffmpeg_encoders_9.0.1_windows.txt b/tests/fixtures/ffmpeg_encoders_9.0.1_windows.txtnew file mode 100644index 0000000..70c4834--- /dev/null+++ b/tests/fixtures/ffmpeg_encoders_9.0.1_windows.txt@@ -0,0 +1,231 @@+Encoders:+ V..... = Video+ A..... = Audio+ S..... = Subtitle+ .F.... = Frame-level multithreading+ ..S... = Slice-level multithreading+ ...X.. = Codec is experimental+ ....B. = Supports draw_horiz_band+ .....D = Supports direct rendering method 1+ ------+ V....D a64multi Multicolor charset for Commodore 64 (codec a64_multi)+ V....D a64multi5 Multicolor charset for Commodore 64, extended with 5th color (colram) (codec a64_multi5)+ V....D alias_pix Alias/Wavefront PIX image+ V....D amv AMV Video+ V....D apng APNG (Animated Portable Network Graphics) image+ V....D asv1 ASUS V1+ V....D asv2 ASUS V2+ V....D libaom-av1 libaom AV1 (codec av1)+ V....D av1_d3d12va D3D12VA av1 encoder (codec av1)+ V....D av1_nvenc NVIDIA NVENC av1 encoder (codec av1)+ V..... av1_qsv AV1 (Intel Quick Sync Video acceleration) (codec av1)+ V....D av1_amf AMD AMF AV1 encoder (codec av1)+ V....D av1_mf AV1 via MediaFoundation (codec av1)+ V....D av1_vaapi AV1 (VAAPI) (codec av1)+ V....D avrp Avid 1:1 10-bit RGB Packer+ V..X.D avui Avid Meridien Uncompressed+ VF...D bitpacked Bitpacked+ V....D bmp BMP (Windows and OS/2 bitmap)+ VF...D cfhd GoPro CineForm HD+ V....D cinepak Cinepak+ V....D cljr Cirrus Logic AccuPak+ V.S..D vc2 SMPTE VC-2 (codec dirac)+ VFS..D dnxhd VC3/DNxHD+ V....D dpx DPX (Digital Picture Exchange) image+ VFS..D dvvideo DV (Digital Video)+ VFS..D dxv Resolume DXV+ VF...D exr OpenEXR image+ V.S..D ffv1 FFmpeg video codec #1+ VF...D ffvhuff Huffyuv FFmpeg variant+ V....D fits Flexible Image Transport System+ V....D flashsv Flash Screen Video+ V....D flashsv2 Flash Screen Video Version 2+ V....D flv FLV / Sorenson Spark / Sorenson H.263 (Flash Video) (codec flv1)+ V....D gif GIF (Graphics Interchange Format)+ V....D h261 H.261+ V....D h263 H.263 / H.263-1996+ V.S..D h263p H.263+ / H.263-1998 / H.263 version 2+ V....D libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264)+ V....D libx264rgb libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB (codec h264)+ V....D h264_amf AMD AMF H.264 Encoder (codec h264)+ V....D h264_d3d12va D3D12VA h264 encoder (codec h264)+ V....D h264_mf H264 via MediaFoundation (codec h264)+ V....D h264_nvenc NVIDIA NVENC H.264 encoder (codec h264)+ V..... h264_qsv H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration) (codec h264)+ V....D h264_vaapi H.264/AVC (VAAPI) (codec h264)+ VF...D hdr HDR (Radiance RGBE format) image+ V....D libx265 libx265 H.265 / HEVC (codec hevc)+ V....D hevc_amf AMD AMF HEVC encoder (codec hevc)+ V....D hevc_d3d12va D3D12VA hevc encoder (codec hevc)+ V....D hevc_mf HEVC via MediaFoundation (codec hevc)+ V....D hevc_nvenc NVIDIA NVENC hevc encoder (codec hevc)+ V..... hevc_qsv HEVC (Intel Quick Sync Video acceleration) (codec hevc)+ V....D hevc_vaapi H.265/HEVC (VAAPI) (codec hevc)+ VF...D huffyuv Huffyuv / HuffYUV+ VF...D jpeg2000 JPEG 2000+ VF.... libopenjpeg OpenJPEG JPEG 2000 (codec jpeg2000)+ VF...D jpegls JPEG-LS+ VF...D ljpeg Lossless JPEG+ VFS..D magicyuv MagicYUV video+ VFS..D mjpeg MJPEG (Motion JPEG)+ V..... mjpeg_qsv MJPEG (Intel Quick Sync Video acceleration) (codec mjpeg)+ V....D mjpeg_vaapi MJPEG (VAAPI) (codec mjpeg)+ V.S..D mpeg1video MPEG-1 video+ V.S..D mpeg2video MPEG-2 video+ V..... mpeg2_qsv MPEG-2 video (Intel Quick Sync Video acceleration) (codec mpeg2video)+ V....D mpeg2_vaapi MPEG-2 (VAAPI) (codec mpeg2video)+ V.S..D mpeg4 MPEG-4 part 2+ V....D libxvid libxvidcore MPEG-4 part 2 (codec mpeg4)+ V....D msmpeg4v2 MPEG-4 part 2 Microsoft variant version 2+ V....D msmpeg4 MPEG-4 part 2 Microsoft variant version 3 (codec msmpeg4v3)+ V....D msrle Microsoft RLE+ V..... msvideo1 Microsoft Video-1+ V....D pam PAM (Portable AnyMap) image+ V....D pbm PBM (Portable BitMap) image+ V....D pcx PC Paintbrush PCX image+ V..X.D pdv PDV (PlayDate Video)+ V....D pfm PFM (Portable FloatMap) image+ V....D pgm PGM (Portable GrayMap) image+ V....D pgmyuv PGMYUV (Portable GrayMap YUV) image+ V....D phm PHM (Portable HalfFloatMap) image+ VF...D png PNG (Portable Network Graphics) image+ V....D ppm PPM (Portable PixelMap) image+ VF...D prores Apple ProRes+ VF...D prores_aw Apple ProRes (codec prores)+ VFS... prores_ks Apple ProRes (iCodec Pro) (codec prores)+ VF...D qoi QOI (Quite OK Image format) image+ V....D qtrle QuickTime Animation (RLE) video+ V....D r10k AJA Kona 10-bit RGB Codec+ V....D r210 Uncompressed RGB 10-bit+ VF...D rawvideo raw video+ V....D roqvideo id RoQ video (codec roq)+ V....D rpza QuickTime video (RPZA)+ V....D rv10 RealVideo 1.0+ V....D rv20 RealVideo 2.0+ V....D sgi SGI image+ V....D smc QuickTime Graphics (SMC)+ V....D snow Snow+ V....D speedhq NewTek SpeedHQ+ V....D sunrast Sun Rasterfile image+ V....D svq1 Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1+ V....D targa Truevision Targa image+ V....D libtheora libtheora Theora (codec theora)+ VF...D tiff TIFF image+ VF...D utvideo Ut Video+ VF...D v210 Uncompressed 4:2:2 10-bit+ V.S..D vbn Vizrt Binary Image+ V..... vnull null video+ V....D libvpx libvpx VP8 (codec vp8)+ V....D vp8_vaapi VP8 (VAAPI) (codec vp8)+ V....D libvpx-vp9 libvpx VP9 (codec vp9)+ V....D vp9_vaapi VP9 (VAAPI) (codec vp9)+ V..... vp9_qsv VP9 video (Intel Quick Sync Video acceleration) (codec vp9)+ VF...D wbmp WBMP (Wireless Application Protocol Bitmap) image+ V....D libwebp_anim libwebp WebP image (codec webp)+ V....D libwebp libwebp WebP image (codec webp)+ V....D wmv1 Windows Media Video 7+ V....D wmv2 Windows Media Video 8+ V..... wrapped_avframe AVFrame to AVPacket passthrough+ V....D xbm XBM (X BitMap) image+ V....D xface X-face image+ V....D xwd XWD (X Window Dump) image+ V....D y41p Uncompressed YUV 4:1:1 12-bit+ V....D yuv4 Uncompressed packed 4:2:0+ VF...D zlib LCL (LossLess Codec Library) ZLIB+ V....D zmbv Zip Motion Blocks Video+ A....D aac AAC (Advanced Audio Coding)+ A....D aac_mf AAC via MediaFoundation (codec aac)+ A....D ac3 ATSC A/52A (AC-3)+ A....D ac3_fixed ATSC A/52A (AC-3) (codec ac3)+ A....D ac3_mf AC3 via MediaFoundation (codec ac3)+ A....D adpcm_adx SEGA CRI ADX ADPCM+ A....D adpcm_argo ADPCM Argonaut Games+ A....D g722 G.722 ADPCM (codec adpcm_g722)+ A....D g726 G.726 ADPCM (codec adpcm_g726)+ A....D g726le G.726 little endian ADPCM ("right-justified") (codec adpcm_g726le)+ A....D adpcm_ima_alp ADPCM IMA High Voltage Software ALP+ A....D adpcm_ima_amv ADPCM IMA AMV+ A....D adpcm_ima_apm ADPCM IMA Ubisoft APM+ A....D adpcm_ima_qt ADPCM IMA QuickTime+ A....D adpcm_ima_ssi ADPCM IMA Simon & Schuster Interactive+ A....D adpcm_ima_wav ADPCM IMA WAV+ A....D adpcm_ima_ws ADPCM IMA Westwood+ A....D adpcm_ms ADPCM Microsoft+ A....D adpcm_swf ADPCM Shockwave Flash+ A....D adpcm_yamaha ADPCM Yamaha+ A....D alac ALAC (Apple Lossless Audio Codec)+ A....D libopencore_amrnb OpenCORE AMR-NB (Adaptive Multi-Rate Narrow-Band) (codec amr_nb)+ A....D libvo_amrwbenc Android VisualOn AMR-WB (Adaptive Multi-Rate Wide-Band) (codec amr_wb)+ A..... anull null audio+ A....D aptx aptX (Audio Processing Technology for Bluetooth)+ A....D aptx_hd aptX HD (Audio Processing Technology for Bluetooth)+ A....D comfortnoise RFC 3389 comfort noise generator+ A....D dfpwm DFPWM1a audio+ A..X.D dca DCA (DTS Coherent Acoustics) (codec dts)+ A....D eac3 ATSC A/52 E-AC-3+ A....D flac FLAC (Free Lossless Audio Codec)+ A....D g723_1 G.723.1+ A....D libgsm libgsm GSM (codec gsm)+ A....D libgsm_ms libgsm GSM Microsoft variant (codec gsm_ms)+ A..X.D mlp MLP (Meridian Lossless Packing)+ A....D mp2 MP2 (MPEG audio layer 2)+ A....D mp2fixed MP2 fixed point (MPEG audio layer 2) (codec mp2)+ A....D libmp3lame libmp3lame MP3 (MPEG audio layer 3) (codec mp3)+ A....D mp3_mf MP3 via MediaFoundation (codec mp3)+ A....D nellymoser Nellymoser Asao+ A..X.D opus Opus+ A....D libopus libopus Opus (codec opus)+ A....D pcm_alaw PCM A-law / G.711 A-law+ A....D pcm_bluray PCM signed 16|20|24-bit big-endian for Blu-ray media+ A....D pcm_dvd PCM signed 16|20|24-bit big-endian for DVD media+ A....D pcm_f32be PCM 32-bit floating point big-endian+ A....D pcm_f32le PCM 32-bit floating point little-endian+ A....D pcm_f64be PCM 64-bit floating point big-endian+ A....D pcm_f64le PCM 64-bit floating point little-endian+ A....D pcm_mulaw PCM mu-law / G.711 mu-law+ A....D pcm_s16be PCM signed 16-bit big-endian+ A....D pcm_s16be_planar PCM signed 16-bit big-endian planar+ A....D pcm_s16le PCM signed 16-bit little-endian+ A....D pcm_s16le_planar PCM signed 16-bit little-endian planar+ A....D pcm_s24be PCM signed 24-bit big-endian+ A....D pcm_s24daud PCM D-Cinema audio signed 24-bit+ A....D pcm_s24le PCM signed 24-bit little-endian+ A....D pcm_s24le_planar PCM signed 24-bit little-endian planar+ A....D pcm_s32be PCM signed 32-bit big-endian+ A....D pcm_s32le PCM signed 32-bit little-endian+ A....D pcm_s32le_planar PCM signed 32-bit little-endian planar+ A....D pcm_s64be PCM signed 64-bit big-endian+ A....D pcm_s64le PCM signed 64-bit little-endian+ A....D pcm_s8 PCM signed 8-bit+ A....D pcm_s8_planar PCM signed 8-bit planar+ A....D pcm_u16be PCM unsigned 16-bit big-endian+ A....D pcm_u16le PCM unsigned 16-bit little-endian+ A....D pcm_u24be PCM unsigned 24-bit big-endian+ A....D pcm_u24le PCM unsigned 24-bit little-endian+ A....D pcm_u32be PCM unsigned 32-bit big-endian+ A....D pcm_u32le PCM unsigned 32-bit little-endian+ A....D pcm_u8 PCM unsigned 8-bit+ A....D pcm_vidc PCM Archimedes VIDC+ A....D real_144 RealAudio 1.0 (14.4K) (codec ra_144)+ A....D roq_dpcm id RoQ DPCM+ A..X.D s302m SMPTE 302M+ A....D sbc SBC (low-complexity subband codec)+ A....D libspeex libspeex Speex (codec speex)+ A..X.D truehd TrueHD+ A....D tta TTA (True Audio)+ A..X.D vorbis Vorbis+ A....D libvorbis libvorbis (codec vorbis)+ A....D wavpack WavPack+ A....D wmav1 Windows Media Audio 1+ A....D wmav2 Windows Media Audio 2+ S..... ssa ASS (Advanced SubStation Alpha) subtitle (codec ass)+ S..... ass ASS (Advanced SubStation Alpha) subtitle+ S..... dvbsub DVB subtitles (codec dvb_subtitle)+ S..... dvdsub DVD subtitles (codec dvd_subtitle)+ S..... mov_text 3GPP Timed Text subtitle+ S..... srt SubRip subtitle (codec subrip)+ S..... subrip SubRip subtitle+ S..... text Raw text subtitle+ S..... ttml TTML subtitle+ S..... webvtt WebVTT subtitle+ S..... xsub DivX subtitles (XSUB)diff --git a/tests/fixtures/ffmpeg_filters_6.1.txt b/tests/fixtures/ffmpeg_filters_6.1.txtnew file mode 100644index 0000000..c0b2572--- /dev/null+++ b/tests/fixtures/ffmpeg_filters_6.1.txt@@ -0,0 +1,563 @@+Filters:+ T.. = Timeline support+ .S. = Slice threading+ ..C = Command support+ A = Audio input/output+ V = Video input/output+ N = Dynamic number and/or type of input/output+ | = Source or sink filter+ ... abench A->A Benchmark part of a filtergraph.+ ..C acompressor A->A Audio compressor.+ ... acontrast A->A Simple audio dynamic range compression/expansion filter.+ ... acopy A->A Copy the input audio unchanged to the output.+ ... acue A->A Delay filtering to match a cue.+ ... acrossfade AA->A Cross fade two input audio streams.+ .S. acrossover A->N Split audio into per-bands streams.+ T.C acrusher A->A Reduce audio bit resolution.+ TS. adeclick A->A Remove impulsive noise from input audio.+ TS. adeclip A->A Remove clipping from input audio.+ TS. adecorrelate A->A Apply decorrelation to input audio.+ T.C adelay A->A Delay one or more audio channels.+ TSC adenorm A->A Remedy denormals by adding extremely low-level noise.+ T.. aderivative A->A Compute derivative of input audio.+ TSC adrc A->A Audio Spectral Dynamic Range Controller.+ TSC adynamicequalizer A->A Apply Dynamic Equalization of input audio.+ T.C adynamicsmooth A->A Apply Dynamic Smoothing of input audio.+ ... aecho A->A Add echoing to the audio.+ TSC aemphasis A->A Audio emphasis.+ T.. aeval A->A Filter audio signal according to a specified expression.+ T.C aexciter A->A Enhance high frequency part of audio.+ T.C afade A->A Fade in/out input audio.+ TSC afftdn A->A Denoise audio samples using FFT.+ TS. afftfilt A->A Apply arbitrary expressions to samples in frequency domain.+ .SC afir N->N Apply Finite Impulse Response filter with supplied coefficients in additional stream(s).+ ... aformat A->A Convert the input audio to one of the specified formats.+ TSC afreqshift A->A Apply frequency shifting to input audio.+ TSC afwtdn A->A Denoise audio stream using Wavelets.+ T.C agate A->A Audio gate.+ .S. aiir A->N Apply Infinite Impulse Response filter with supplied coefficients.+ T.. aintegral A->A Compute integral of input audio.+ ... ainterleave N->A Temporally interleave audio inputs.+ T.. alatency A->A Report audio filtering latency.+ T.C alimiter A->A Audio lookahead limiter.+ TSC allpass A->A Apply a two-pole all-pass filter.+ ... aloop A->A Loop audio samples.+ ... amerge N->A Merge two or more audio streams into a single multi-channel stream.+ T.. ametadata A->A Manipulate audio frame metadata.+ ..C amix N->A Audio mixing.+ ... amultiply AA->A Multiply two audio streams.+ TSC anequalizer A->N Apply high-order audio parametric multi band equalizer.+ TSC anlmdn A->A Reduce broadband noise from stream using Non-Local Means.+ TSC anlmf AA->A Apply Normalized Least-Mean-Fourth algorithm to first audio stream.+ TSC anlms AA->A Apply Normalized Least-Mean-Squares algorithm to first audio stream.+ ... anull A->A Pass the source unchanged to the output.+ T.. apad A->A Pad audio with silence.+ T.C aperms A->A Set permissions for the output audio frame.+ ... aphaser A->A Add a phasing effect to the audio.+ TSC aphaseshift A->A Apply phase shifting to input audio.+ TS. apsnr AA->A Measure Audio Peak Signal-to-Noise Ratio.+ TSC apsyclip A->A Audio Psychoacoustic Clipper.+ ... apulsator A->A Audio pulsator.+ ..C arealtime A->A Slow down filtering to match realtime.+ ... aresample A->A Resample audio data.+ ... areverse A->A Reverse an audio clip.+ TSC arls AA->A Apply Recursive Least Squares algorithm to first audio stream.+ TSC arnndn A->A Reduce noise from speech using Recurrent Neural Networks.+ TS. asdr AA->A Measure Audio Signal-to-Distortion Ratio.+ ... asegment A->N Segment audio stream.+ ... aselect A->N Select audio frames to pass in output.+ ... asendcmd A->A Send commands to filters.+ T.C asetnsamples A->A Set the number of samples for each output audio frames.+ ..C asetpts A->A Set PTS for the output audio frame.+ ... asetrate A->A Change the sample rate without altering the data.+ ... asettb A->A Set timebase for the audio output link.+ ... ashowinfo A->A Show textual information for each audio frame.+ T.. asidedata A->A Manipulate audio frame side data.+ TS. asisdr AA->A Measure Audio Scale-Invariant Signal-to-Distortion Ratio.+ TSC asoftclip A->A Audio Soft Clipper.+ .S. aspectralstats A->A Show frequency domain statistics about audio frames.+ ... asplit A->N Pass on the audio input to N audio outputs.+ ... asr A->A Automatic Speech Recognition.+ .S. astats A->A Show time domain statistics about audio frames.+ ..C astreamselect N->N Select audio streams+ TSC asubboost A->A Boost subwoofer frequencies.+ TSC asubcut A->A Cut subwoofer frequencies.+ TSC asupercut A->A Cut super frequencies.+ TSC asuperpass A->A Apply high order Butterworth band-pass filter.+ TSC asuperstop A->A Apply high order Butterworth band-stop filter.+ ..C atempo A->A Adjust audio tempo.+ TSC atilt A->A Apply spectral tilt to audio.+ ... atrim A->A Pick one continuous section from the input, drop the rest.+ ... axcorrelate AA->A Cross-correlate two audio streams.+ ... azmq A->A Receive commands through ZMQ and broker them to filters.+ TSC bandpass A->A Apply a two-pole Butterworth band-pass filter.+ TSC bandreject A->A Apply a two-pole Butterworth band-reject filter.+ TSC bass A->A Boost or cut lower frequencies.+ TSC biquad A->A Apply a biquad IIR filter with the given coefficients.+ ... bs2b A->A Bauer stereo-to-binaural filter.+ ... channelmap A->A Remap audio channels.+ ... channelsplit A->N Split audio into per-channel streams.+ ... chorus A->A Add a chorus effect to the audio.+ ... compand A->A Compress or expand audio dynamic range.+ T.C compensationdelay A->A Audio Compensation Delay Line.+ T.C crossfeed A->A Apply headphone crossfeed filter.+ TSC crystalizer A->A Simple audio noise sharpening filter.+ T.. dcshift A->A Apply a DC shift to the audio.+ T.. deesser A->A Apply de-essing to the audio.+ T.C dialoguenhance A->A Audio Dialogue Enhancement.+ ... drmeter A->A Measure audio dynamic range.+ TSC dynaudnorm A->A Dynamic Audio Normalizer.+ ... earwax A->A Widen the stereo image.+ ... ebur128 A->N EBU R128 scanner.+ TSC equalizer A->A Apply two-pole peaking equalization (EQ) filter.+ T.C extrastereo A->A Increase difference between stereo audio channels.+ ..C firequalizer A->A Finite Impulse Response Equalizer.+ ... flanger A->A Apply a flanging effect to the audio.+ ... haas A->A Apply Haas Stereo Enhancer.+ ... hdcd A->A Apply High Definition Compatible Digital (HDCD) decoding.+ .S. headphone N->A Apply headphone binaural spatialization with HRTFs in additional streams.+ TSC highpass A->A Apply a high-pass filter with 3dB point frequency.+ TSC highshelf A->A Apply a high shelf filter.+ ... join N->A Join multiple audio streams into multi-channel output.+ ..C ladspa N->A Apply LADSPA effect.+ ... loudnorm A->A EBU R128 loudness normalization+ TSC lowpass A->A Apply a low-pass filter with 3dB point frequency.+ TSC lowshelf A->A Apply a low shelf filter.+ ..C lv2 N->A Apply LV2 effect.+ ... mcompand A->A Multiband Compress or expand audio dynamic range.+ ... pan A->A Remix channels with coefficients (panning).+ ... replaygain A->A ReplayGain scanner.+ ..C rubberband A->A Apply time-stretching and pitch-shifting.+ ..C sidechaincompress AA->A Sidechain compressor.+ T.C sidechaingate AA->A Audio sidechain gate.+ ... silencedetect A->A Detect silence.+ T.C silenceremove A->A Remove silence.+ .S. sofalizer A->A SOFAlizer (Spatially Oriented Format for Acoustics).+ T.C speechnorm A->A Speech Normalizer.+ T.C stereotools A->A Apply various stereo tools.+ T.C stereowiden A->A Apply stereo widening effect.+ ... superequalizer A->A Apply 18 band equalization filter.+ .SC surround A->A Apply audio surround upmix filter.+ TSC tiltshelf A->A Apply a tilt shelf filter.+ TSC treble A->A Boost or cut upper frequencies.+ T.. tremolo A->A Apply tremolo effect.+ T.. vibrato A->A Apply vibrato effect.+ T.C virtualbass A->A Audio Virtual Bass.+ T.C volume A->A Change input volume.+ ... volumedetect A->A Detect audio volume.+ ... aevalsrc |->A Generate an audio signal generated by an expression.+ ... afdelaysrc |->A Generate a Fractional delay FIR coefficients.+ ... afireqsrc |->A Generate a FIR equalizer coefficients audio stream.+ ... afirsrc |->A Generate a FIR coefficients audio stream.+ ... anoisesrc |->A Generate a noise audio signal.+ ... anullsrc |->A Null audio source, return empty audio frames.+ ... flite |->A Synthesize voice from text using libflite.+ ... hilbert |->A Generate a Hilbert transform FIR coefficients.+ ... sinc |->A Generate a sinc kaiser-windowed low-pass, high-pass, band-pass, or band-reject FIR coefficients.+ ... sine |->A Generate sine wave audio signal.+ ... anullsink A->| Do absolutely nothing with the input audio.+ ... addroi V->V Add region of interest to frame.+ ... alphaextract V->V Extract an alpha channel as a grayscale image component.+ T.. alphamerge VV->V Copy the luma value of the second input into the alpha channel of the first input.+ TSC amplify V->V Amplify changes between successive video frames.+ ... ass V->V Render ASS subtitles onto input video using the libass library.+ TSC atadenoise V->V Apply an Adaptive Temporal Averaging Denoiser.+ T.C avgblur V->V Apply Average Blur filter.+ ... avgblur_opencl V->V Apply average blur filter+ ... avgblur_vulkan V->V Apply avgblur mask to input video+ TSC backgroundkey V->V Turns a static background into transparency.+ T.C bbox V->V Compute bounding box for each frame.+ ... bench V->V Benchmark part of a filtergraph.+ TSC bilateral V->V Apply Bilateral filter.+ ... bilateral_cuda V->V GPU accelerated bilateral filter+ T.. bitplanenoise V->V Measure bit plane noise.+ .S. blackdetect V->V Detect video intervals that are (almost) black.+ ... blackframe V->V Detect frames that are (almost) black.+ TSC blend VV->V Blend two video frames into each other.+ ..C blend_vulkan VV->V Blend two video frames in Vulkan+ ... blockdetect V->V Blockdetect filter.+ ... blurdetect V->V Blurdetect filter.+ TS. bm3d N->V Block-Matching 3D denoiser.+ T.. boxblur V->V Blur the input.+ ... boxblur_opencl V->V Apply boxblur filter to input video+ TS. bwdif V->V Deinterlace the input image.+ T.. bwdif_cuda V->V Deinterlace CUDA frames+ T.. bwdif_vulkan V->V Deinterlace Vulkan frames via bwdif+ TSC cas V->V Contrast Adaptive Sharpen.+ ... ccrepack V->V Repack CEA-708 closed caption metadata+ ... chromaber_vulkan V->V Offset chroma of input video (chromatic aberration)+ TSC chromahold V->V Turns a certain color range into gray.+ TSC chromakey V->V Turns a certain color into transparency. Operates on YUV colors.+ ... chromakey_cuda V->V GPU accelerated chromakey filter+ TSC chromanr V->V Reduce chrominance noise.+ TSC chromashift V->V Shift chroma.+ ... ciescope V->V Video CIE scope.+ T.. codecview V->V Visualize information about some codecs.+ TSC colorbalance V->V Adjust the color balance.+ TSC colorchannelmixer V->V Adjust colors by mixing color channels.+ TSC colorcontrast V->V Adjust color contrast between RGB components.+ TSC colorcorrect V->V Adjust color white balance selectively for blacks and whites.+ TSC colorize V->V Overlay a solid color on the video stream.+ TSC colorkey V->V Turns a certain color into transparency. Operates on RGB colors.+ ... colorkey_opencl V->V Turns a certain color into transparency. Operates on RGB colors.+ TSC colorhold V->V Turns a certain color range into gray. Operates on RGB colors.+ TSC colorlevels V->V Adjust the color levels.+ TSC colormap VVV->V Apply custom Color Maps to video stream.+ TS. colormatrix V->V Convert color matrix.+ TS. colorspace V->V Convert between colorspaces.+ ... colorspace_cuda V->V CUDA accelerated video color converter+ TSC colortemperature V->V Adjust color temperature of video.+ TSC convolution V->V Apply convolution filter.+ ... convolution_opencl V->V Apply convolution mask to input video+ TS. convolve VV->V Convolve first video stream with second video stream.+ ... copy V->V Copy the input video unchanged to the output.+ T.. corr VV->V Calculate the correlation between two video streams.+ ... cover_rect V->V Find and cover a user specified object.+ ..C crop V->V Crop the input video.+ T.C cropdetect V->V Auto-detect crop size.+ ... cue V->V Delay filtering to match a cue.+ TSC curves V->V Adjust components curves.+ .SC datascope V->V Video data analysis.+ T.C dblur V->V Apply Directional Blur filter.+ TS. dctdnoiz V->V Denoise frames using 2D DCT.+ TSC deband V->V Debands video.+ T.C deblock V->V Deblock video.+ ... decimate N->V Decimate frames (post field matching filter).+ TS. deconvolve VV->V Deconvolve first video stream with second video stream.+ TS. dedot V->V Reduce cross-luminance and cross-color.+ TSC deflate V->V Apply deflate effect.+ ... deflicker V->V Remove temporal frame luminance variations.+ ... deinterlace_qsv V->V Quick Sync Video "deinterlacing"+ ... deinterlace_vaapi V->V Deinterlacing of VAAPI surfaces+ ... dejudder V->V Remove judder produced by pullup.+ T.. delogo V->V Remove logo from input video.+ ... denoise_vaapi V->V VAAPI VPP for de-noise+ T.. derain V->V Apply derain filter to the input.+ ... deshake V->V Stabilize shaky video.+ ... deshake_opencl V->V Feature-point based video stabilization filter+ TSC despill V->V Despill video.+ ... detelecine V->V Apply an inverse telecine pattern.+ TSC dilation V->V Apply dilation effect.+ ... dilation_opencl V->V Apply dilation effect+ TSC displace VVV->V Displace pixels.+ ... dnn_classify V->V Apply DNN classify filter to the input.+ ... dnn_detect V->V Apply DNN detect filter to the input.+ ... dnn_processing V->V Apply DNN processing filter to the input.+ .S. doubleweave V->V Weave input video fields into double number of frames.+ T.C drawbox V->V Draw a colored box on the input video.+ ... drawgraph V->V Draw a graph using input video metadata.+ T.C drawgrid V->V Draw a colored grid on the input video.+ T.C drawtext V->V Draw text on top of video frames using libfreetype library.+ T.. edgedetect V->V Detect and draw edge.+ ... elbg V->V Apply posterize effect, using the ELBG algorithm.+ T.. entropy V->V Measure video frames entropy.+ .S. epx V->V Scale the input using EPX algorithm.+ T.C eq V->V Adjust brightness, contrast, gamma, and saturation.+ TSC erosion V->V Apply erosion effect.+ ... erosion_opencl V->V Apply erosion effect+ TSC estdif V->V Apply Edge Slope Tracing deinterlace.+ TSC exposure V->V Adjust exposure of the video stream.+ ... extractplanes V->N Extract planes as grayscale frames.+ TS. fade V->V Fade in/out input video.+ ..C feedback VV->VV Apply feedback video filter.+ TSC fftdnoiz V->V Denoise frames using 3D FFT.+ TS. fftfilt V->V Apply arbitrary expressions to pixels in frequency domain.+ ... field V->V Extract a field from the input video.+ ... fieldhint V->V Field matching using hints.+ ... fieldmatch N->V Field matching for inverse telecine.+ T.. fieldorder V->V Set the field order.+ T.C fillborders V->V Fill borders of the input video.+ ... find_rect V->V Find a user specified object.+ ... flip_vulkan V->V Flip both horizontally and vertically+ T.. floodfill V->V Fill area with same color with another color.+ ... format V->V Convert the input video to one of the specified pixel formats.+ ... fps V->V Force constant framerate.+ ... framepack VV->V Generate a frame packed stereoscopic video.+ .S. framerate V->V Upsamples or downsamples progressive source between specified frame rates.+ T.. framestep V->V Select one frame every N frames.+ ... freezedetect V->V Detects frozen video input.+ ... freezeframes VV->V Freeze video frames.+ T.C frei0r V->V Apply a frei0r effect.+ T.. fspp V->V Apply Fast Simple Post-processing filter.+ TSC gblur V->V Apply Gaussian Blur filter.+ ... gblur_vulkan V->V Gaussian Blur in Vulkan+ TS. geq V->V Apply generic equation to each pixel.+ T.. gradfun V->V Debands video quickly using gradients.+ ..C graphmonitor V->V Show various filtergraph stats.+ TS. grayworld V->V Adjust white balance using LAB gray world algorithm+ TS. greyedge V->V Estimates scene illumination by grey edge assumption.+ TSC guided N->V Apply Guided filter.+ TSC haldclut VV->V Adjust colors using a Hald CLUT.+ TS. hflip V->V Horizontally flip the input video.+ ... hflip_vulkan V->V Horizontally flip the input video in Vulkan+ T.. histeq V->V Apply global color histogram equalization.+ ... histogram V->V Compute and draw a histogram.+ TSC hqdn3d V->V Apply a High Quality 3D Denoiser.+ .S. hqx V->V Scale the input by 2, 3 or 4 using the hq*x magnification algorithm.+ .S. hstack N->V Stack video inputs horizontally.+ TSC hsvhold V->V Turns a certain HSV range into gray.+ TSC hsvkey V->V Turns a certain HSV range into transparency. Operates on YUV colors.+ T.C hue V->V Adjust the hue and saturation of the input video.+ TSC huesaturation V->V Apply hue-saturation-intensity adjustments.+ ... hwdownload V->V Download a hardware frame to a normal frame+ ... hwmap V->V Map hardware frames+ ... hwupload V->V Upload a normal frame to a hardware frame+ ... hwupload_cuda V->V Upload a system memory frame to a CUDA device.+ T.. hysteresis VV->V Grow first stream into second stream by connecting components.+ TS. identity VV->V Calculate the Identity between two video streams.+ ... idet V->V Interlace detect Filter.+ T.C il V->V Deinterleave or interleave fields.+ TSC inflate V->V Apply inflate effect.+ ... interlace V->V Convert progressive video into interlaced.+ ... interleave N->V Temporally interleave video inputs.+ ... kerndeint V->V Apply kernel deinterlacing to the input.+ TSC kirsch V->V Apply kirsch operator.+ TSC lagfun V->V Slowly update darker pixels.+ T.. latency V->V Report video filtering latency.+ TSC lenscorrection V->V Rectify the image by correcting for lens distortion.+ ..C libplacebo N->V Apply various GPU filters from libplacebo+ TSC limitdiff N->V Apply filtering with limiting difference.+ TSC limiter V->V Limit pixels components to the specified range.+ ... loop V->V Loop video frames.+ TSC lumakey V->V Turns a certain luma into transparency.+ TSC lut V->V Compute and apply a lookup table to the RGB/YUV input video.+ TSC lut1d V->V Adjust colors using a 1D LUT.+ TSC lut2 VV->V Compute and apply a lookup table from two video inputs.+ TSC lut3d V->V Adjust colors using a 3D LUT.+ TSC lutrgb V->V Compute and apply a lookup table to the RGB input video.+ TSC lutyuv V->V Compute and apply a lookup table to the YUV input video.+ TSC maskedclamp VVV->V Clamp first stream with second stream and third stream.+ TSC maskedmax VVV->V Apply filtering with maximum difference of two streams.+ TSC maskedmerge VVV->V Merge first stream with second stream using third stream as mask.+ TSC maskedmin VVV->V Apply filtering with minimum difference of two streams.+ TSC maskedthreshold VV->V Pick pixels comparing absolute difference of two streams with threshold.+ TSC maskfun V->V Create Mask.+ ... mcdeint V->V Apply motion compensating deinterlacing.+ TSC median V->V Apply Median filter.+ ... mergeplanes N->V Merge planes.+ ... mestimate V->V Generate motion vectors.+ T.. metadata V->V Manipulate video frame metadata.+ T.. midequalizer VV->V Apply Midway Equalization.+ ... minterpolate V->V Frame rate conversion using Motion Interpolation.+ TSC mix N->V Mix video inputs.+ TSC monochrome V->V Convert video to gray using custom color filter.+ TSC morpho VV->V Apply Morphological filter.+ ... mpdecimate V->V Remove near-duplicate frames.+ TS. msad VV->V Calculate the MSAD between two video streams.+ TSC multiply VV->V Multiply first video stream with second video stream.+ TSC negate V->V Negate input video.+ TS. nlmeans V->V Non-local means denoiser.+ ... nlmeans_opencl V->V Non-local means denoiser through OpenCL+ ... nlmeans_vulkan V->V Non-local means denoiser (Vulkan)+ TSC nnedi V->V Apply neural network edge directed interpolation intra-only deinterlacer.+ ... noformat V->V Force libavfilter not to use any of the specified pixel formats for the input to the next filter.+ TS. noise V->V Add noise.+ T.C normalize V->V Normalize RGB video.+ ... null V->V Pass the source unchanged to the output.+ T.C oscilloscope V->V 2D Video Oscilloscope.+ TSC overlay VV->V Overlay a video source on top of the input.+ ... overlay_opencl VV->V Overlay one video on top of another+ ... overlay_qsv VV->V Quick Sync Video overlay.+ ... overlay_vaapi VV->V Overlay one video on top of another+ ... overlay_vulkan VV->V Overlay a source on top of another+ ... overlay_cuda VV->V Overlay one video on top of another using CUDA+ T.. owdenoise V->V Denoise using wavelets.+ ... pad V->V Pad the input video.+ ... pad_opencl V->V Pad the input video.+ ... palettegen V->V Find the optimal palette for a given stream.+ ... paletteuse VV->V Use a palette to downsample an input video stream.+ T.C perms V->V Set permissions for the output video frame.+ TS. perspective V->V Correct the perspective of video.+ T.C phase V->V Phase shift fields.+ ... photosensitivity V->V Filter out photosensitive epilepsy seizure-inducing flashes.+ ... pixdesctest V->V Test pixel format definitions.+ TSC pixelize V->V Pixelize video.+ T.C pixscope V->V Pixel data analysis.+ T.C pp V->V Filter video using libpostproc.+ T.. pp7 V->V Apply Postprocessing 7 filter.+ TS. premultiply N->V PreMultiply first stream with first plane of second stream.+ TSC prewitt V->V Apply prewitt operator.+ ... prewitt_opencl V->V Apply prewitt operator+ ... procamp_vaapi V->V ProcAmp (color balance) adjustments for hue, saturation, brightness, contrast+ ... program_opencl N->V Filter video using an OpenCL program+ TSC pseudocolor V->V Make pseudocolored video frames.+ TS. psnr VV->V Calculate the PSNR between two video streams.+ ... pullup V->V Pullup from field sequence to frames.+ T.. qp V->V Change video quantization parameters.+ ... random V->V Return random frames.+ TSC readeia608 V->V Read EIA-608 Closed Caption codes from input video and write them to frame metadata.+ ... readvitc V->V Read vertical interval timecode and write it to frame metadata.+ ..C realtime V->V Slow down filtering to match realtime.+ .S. remap VVV->V Remap pixels.+ ... remap_opencl VVV->V Remap pixels using OpenCL.+ TS. removegrain V->V Remove grain.+ T.. removelogo V->V Remove a TV logo based on a mask image.+ ... repeatfields V->V Hard repeat fields based on MPEG repeat field flag.+ ... reverse V->V Reverse a clip.+ TSC rgbashift V->V Shift RGBA.+ TSC roberts V->V Apply roberts cross operator.+ ... roberts_opencl V->V Apply roberts operator+ TSC rotate V->V Rotate the input image.+ T.. sab V->V Apply shape adaptive blur.+ ..C scale V->V Scale the input video size and/or convert the image format.+ ... scale_cuda V->V GPU accelerated video resizer+ ... scale_qsv V->V Quick Sync Video "scaling and format conversion"+ ... scale_vaapi V->V Scale to/from VAAPI surfaces.+ ... scale_vulkan V->V Scale Vulkan frames+ ..C scale2ref VV->VV Scale the input video size and/or convert the image format to the given reference.+ ... scdet V->V Detect video scene change+ TSC scharr V->V Apply scharr operator.+ TSC scroll V->V Scroll input video.+ ... segment V->N Segment video stream.+ ... select V->N Select video frames to pass in output.+ TS. selectivecolor V->V Apply CMYK adjustments to specific color ranges.+ ... sendcmd V->V Send commands to filters.+ ... separatefields V->V Split input video frames into fields.+ ... setdar V->V Set the frame display aspect ratio.+ ... setfield V->V Force field for the output video frame.+ ... setparams V->V Force field, or color property for the output video frame.+ ..C setpts V->V Set PTS for the output video frame.+ ... setrange V->V Force color range for the output video frame.+ ... setsar V->V Set the pixel sample aspect ratio.+ ... settb V->V Set timebase for the video output link.+ ... sharpness_vaapi V->V VAAPI VPP for sharpness+ TSC shear V->V Shear transform the input image.+ ... showinfo V->V Show textual information for each video frame.+ ... showpalette V->V Display frame palette.+ T.. shuffleframes V->V Shuffle video frames.+ TS. shufflepixels V->V Shuffle video pixels.+ T.. shuffleplanes V->V Shuffle video planes.+ T.. sidedata V->V Manipulate video frame side data.+ .S. signalstats V->V Generate statistics from video analysis.+ ... signature N->V Calculate the MPEG-7 video signature+ ... siti V->V Calculate spatial information (SI) and temporal information (TI).+ T.. smartblur V->V Blur the input video without impacting the outlines.+ TSC sobel V->V Apply sobel operator.+ ... sobel_opencl V->V Apply sobel operator+ ... split V->N Pass on the input to N video outputs.+ T.C spp V->V Apply a simple post processing filter.+ ... sr V->V Apply DNN-based image super resolution to the input.+ TS. ssim VV->V Calculate the SSIM between two video streams.+ ... ssim360 VV->V Calculate the SSIM between two 360 video streams.+ .S. stereo3d V->V Convert video stereoscopic 3D view.+ ..C streamselect N->N Select video streams+ ... subtitles V->V Render text subtitles onto input video using the libass library.+ .S. super2xsai V->V Scale the input by 2x using the Super2xSaI pixel art algorithm.+ T.C swaprect V->V Swap 2 rectangular objects in video.+ T.. swapuv V->V Swap U and V components.+ TSC tblend V->V Blend successive frames.+ ... telecine V->V Apply a telecine pattern.+ ... thistogram V->V Compute and draw a temporal histogram.+ TSC threshold VVVV->V Threshold first video stream using other video streams.+ TS. thumbnail V->V Select the most representative frame in a given sequence of consecutive frames.+ ... thumbnail_cuda V->V Select the most representative frame in a given sequence of consecutive frames.+ ... tile V->V Tile several successive frames together.+ ... tinterlace V->V Perform temporal field interlacing.+ TSC tlut2 V->V Compute and apply a lookup table from two successive frames.+ TSC tmedian V->V Pick median pixels from successive frames.+ T.. tmidequalizer V->V Apply Temporal Midway Equalization.+ TSC tmix V->V Mix successive video frames.+ .S. tonemap V->V Conversion to/from different dynamic ranges.+ ... tonemap_opencl V->V Perform HDR to SDR conversion with tonemapping.+ ... tonemap_vaapi V->V VAAPI VPP for tone-mapping+ ... tpad V->V Temporarily pad video frames.+ .S. transpose V->V Transpose input video.+ ... transpose_opencl V->V Transpose input video+ ... transpose_vaapi V->V VAAPI VPP for transpose+ ... transpose_vulkan V->V Transpose Vulkan Filter+ ... trim V->V Pick one continuous section from the input, drop the rest.+ TS. unpremultiply N->V UnPreMultiply first stream with first plane of second stream.+ TS. unsharp V->V Sharpen or blur the input video.+ ... unsharp_opencl V->V Apply unsharp mask to input video+ ... untile V->V Untile a frame into a sequence of frames.+ TS. uspp V->V Apply Ultra Simple / Slow Post-processing filter.+ .SC v360 V->V Convert 360 projection of video.+ T.. vaguedenoiser V->V Apply a Wavelet based Denoiser.+ TSC varblur VV->V Apply Variable Blur filter.+ ..C vectorscope V->V Video vectorscope.+ T.. vflip V->V Flip the input video vertically.+ ... vflip_vulkan V->V Vertically flip the input video in Vulkan+ ... vfrdet V->V Variable frame rate detect filter.+ TSC vibrance V->V Boost or alter saturation.+ ... vidstabdetect V->V Extract relative transformations, pass 1 of 2 for stabilization (see vidstabtransform for pass 2).+ ... vidstabtransform V->V Transform the frames, pass 2 of 2 for stabilization (see vidstabdetect for pass 1).+ TS. vif VV->V Calculate the VIF between two video streams.+ T.. vignette V->V Make or reverse a vignette effect.+ ... vmafmotion V->V Calculate the VMAF Motion score.+ ... vpp_qsv V->V Quick Sync Video "VPP"+ .S. vstack N->V Stack video inputs vertically.+ TSC w3fdif V->V Apply Martin Weston three field deinterlace.+ .SC waveform V->V Video waveform monitor.+ .S. weave V->V Weave input video fields into frames.+ .S. xbr V->V Scale the input using xBR algorithm.+ TS. xcorrelate VV->V Cross-correlate first video stream with second video stream.+ .S. xfade VV->V Cross fade one video with another video.+ ... xfade_opencl VV->V Cross fade one video with another video.+ ... xfade_vulkan VV->V Cross fade one video with another video.+ TSC xmedian N->V Pick median pixels from several video inputs.+ .S. xstack N->V Stack video inputs into custom layout.+ TS. yadif V->V Deinterlace the input image.+ T.. yadif_cuda V->V Deinterlace CUDA frames+ TSC yaepblur V->V Yet another edge preserving blur filter.+ ... zmq V->V Receive commands through ZMQ and broker them to filters.+ ... zoompan V->V Apply Zoom & Pan effect.+ .SC zscale V->V Apply resizing, colorspace and bit depth conversion.+ ... hstack_vaapi N->V "VA-API" hstack+ ... vstack_vaapi N->V "VA-API" vstack+ ... xstack_vaapi N->V "VA-API" xstack+ ... hstack_qsv N->V "Quick Sync Video" hstack+ ... vstack_qsv N->V "Quick Sync Video" vstack+ ... xstack_qsv N->V "Quick Sync Video" xstack+ ... allrgb |->V Generate all RGB colors.+ ... allyuv |->V Generate all yuv colors.+ ... cellauto |->V Create pattern generated by an elementary cellular automaton.+ ..C color |->V Provide an uniformly colored input.+ ... color_vulkan |->V Generate a constant color (Vulkan)+ ... colorchart |->V Generate color checker chart.+ ... colorspectrum |->V Generate colors spectrum.+ ... frei0r_src |->V Generate a frei0r source.+ .S. gradients |->V Draw a gradients.+ ... haldclutsrc |->V Provide an identity Hald CLUT.+ ... life |->V Create life.+ ... mandelbrot |->V Render a Mandelbrot fractal.+ ... mptestsrc |->V Generate various test pattern.+ ... nullsrc |->V Null video source, return unprocessed video frames.+ ... openclsrc |->V Generate video using an OpenCL program+ ... pal75bars |->V Generate PAL 75% color bars.+ ... pal100bars |->V Generate PAL 100% color bars.+ ... rgbtestsrc |->V Generate RGB test pattern.+ .S. sierpinski |->V Render a Sierpinski fractal.+ ... smptebars |->V Generate SMPTE color bars.+ ... smptehdbars |->V Generate SMPTE HD color bars.+ ... testsrc |->V Generate test pattern.+ ... testsrc2 |->V Generate another test pattern.+ ... yuvtestsrc |->V Generate YUV test pattern.+ .SC zoneplate |->V Generate zone-plate.+ ... nullsink V->| Do absolutely nothing with the input video.+ ..C a3dscope A->V Convert input audio to 3d scope video output.+ ... abitscope A->V Convert input audio to audio bit scope video output.+ ... adrawgraph A->V Draw a graph using input audio metadata.+ ..C agraphmonitor A->V Show various filtergraph stats.+ ... ahistogram A->V Convert input audio to histogram video output.+ ... aphasemeter A->N Convert input audio to phase meter video output.+ .SC avectorscope A->V Convert input audio to vectorscope video output.+ ..C concat N->N Concatenate audio and video streams.+ ... showcqt A->V Convert input audio to a CQT (Constant/Clamped Q Transform) spectrum video output.+ .S. showcwt A->V Convert input audio to a CWT (Continuous Wavelet Transform) spectrum video output.+ ... showfreqs A->V Convert input audio to a frequencies video output.+ .S. showspatial A->V Convert input audio to a spatial video output.+ .S. showspectrum A->V Convert input audio to a spectrum video output.+ .S. showspectrumpic A->V Convert input audio to a spectrum video output single picture.+ ... showvolume A->V Convert input audio volume to video output.+ ... showwaves A->V Convert input audio to a video output.+ ... showwavespic A->V Convert input audio to a video output single picture.+ ... spectrumsynth VV->A Convert input spectrum videos to audio output.+ ..C avsynctest |->AV Generate an Audio Video Sync Test.+ ..C amovie |->N Read audio from a movie source.+ ..C movie |->N Read from a movie source.+ ... afifo A->A Buffer input frames and send them when they are requested.+ ... fifo V->V Buffer input images and send them when they are requested.+ ... abuffer |->A Buffer audio frames, and make them accessible to the filterchain.+ ... buffer |->V Buffer video frames, and make them accessible to the filterchain.+ ... abuffersink A->| Buffer audio frames, and make them available to the end of the filter graph.+ ... buffersink V->| Buffer video frames, and make them available to the end of the filter graph.diff --git a/tests/fixtures/ffmpeg_filters_7.1_constructed.txt b/tests/fixtures/ffmpeg_filters_7.1_constructed.txtnew file mode 100644index 0000000..c0b2572--- /dev/null+++ b/tests/fixtures/ffmpeg_filters_7.1_constructed.txt@@ -0,0 +1,563 @@+Filters:+ T.. = Timeline support+ .S. = Slice threading+ ..C = Command support+ A = Audio input/output+ V = Video input/output+ N = Dynamic number and/or type of input/output+ | = Source or sink filter+ ... abench A->A Benchmark part of a filtergraph.+ ..C acompressor A->A Audio compressor.+ ... acontrast A->A Simple audio dynamic range compression/expansion filter.+ ... acopy A->A Copy the input audio unchanged to the output.+ ... acue A->A Delay filtering to match a cue.+ ... acrossfade AA->A Cross fade two input audio streams.+ .S. acrossover A->N Split audio into per-bands streams.+ T.C acrusher A->A Reduce audio bit resolution.+ TS. adeclick A->A Remove impulsive noise from input audio.+ TS. adeclip A->A Remove clipping from input audio.+ TS. adecorrelate A->A Apply decorrelation to input audio.+ T.C adelay A->A Delay one or more audio channels.+ TSC adenorm A->A Remedy denormals by adding extremely low-level noise.+ T.. aderivative A->A Compute derivative of input audio.+ TSC adrc A->A Audio Spectral Dynamic Range Controller.+ TSC adynamicequalizer A->A Apply Dynamic Equalization of input audio.+ T.C adynamicsmooth A->A Apply Dynamic Smoothing of input audio.+ ... aecho A->A Add echoing to the audio.+ TSC aemphasis A->A Audio emphasis.+ T.. aeval A->A Filter audio signal according to a specified expression.+ T.C aexciter A->A Enhance high frequency part of audio.+ T.C afade A->A Fade in/out input audio.+ TSC afftdn A->A Denoise audio samples using FFT.+ TS. afftfilt A->A Apply arbitrary expressions to samples in frequency domain.+ .SC afir N->N Apply Finite Impulse Response filter with supplied coefficients in additional stream(s).+ ... aformat A->A Convert the input audio to one of the specified formats.+ TSC afreqshift A->A Apply frequency shifting to input audio.+ TSC afwtdn A->A Denoise audio stream using Wavelets.+ T.C agate A->A Audio gate.+ .S. aiir A->N Apply Infinite Impulse Response filter with supplied coefficients.+ T.. aintegral A->A Compute integral of input audio.+ ... ainterleave N->A Temporally interleave audio inputs.+ T.. alatency A->A Report audio filtering latency.+ T.C alimiter A->A Audio lookahead limiter.+ TSC allpass A->A Apply a two-pole all-pass filter.+ ... aloop A->A Loop audio samples.+ ... amerge N->A Merge two or more audio streams into a single multi-channel stream.+ T.. ametadata A->A Manipulate audio frame metadata.+ ..C amix N->A Audio mixing.+ ... amultiply AA->A Multiply two audio streams.+ TSC anequalizer A->N Apply high-order audio parametric multi band equalizer.+ TSC anlmdn A->A Reduce broadband noise from stream using Non-Local Means.+ TSC anlmf AA->A Apply Normalized Least-Mean-Fourth algorithm to first audio stream.+ TSC anlms AA->A Apply Normalized Least-Mean-Squares algorithm to first audio stream.+ ... anull A->A Pass the source unchanged to the output.+ T.. apad A->A Pad audio with silence.+ T.C aperms A->A Set permissions for the output audio frame.+ ... aphaser A->A Add a phasing effect to the audio.+ TSC aphaseshift A->A Apply phase shifting to input audio.+ TS. apsnr AA->A Measure Audio Peak Signal-to-Noise Ratio.+ TSC apsyclip A->A Audio Psychoacoustic Clipper.+ ... apulsator A->A Audio pulsator.+ ..C arealtime A->A Slow down filtering to match realtime.+ ... aresample A->A Resample audio data.+ ... areverse A->A Reverse an audio clip.+ TSC arls AA->A Apply Recursive Least Squares algorithm to first audio stream.+ TSC arnndn A->A Reduce noise from speech using Recurrent Neural Networks.+ TS. asdr AA->A Measure Audio Signal-to-Distortion Ratio.+ ... asegment A->N Segment audio stream.+ ... aselect A->N Select audio frames to pass in output.+ ... asendcmd A->A Send commands to filters.+ T.C asetnsamples A->A Set the number of samples for each output audio frames.+ ..C asetpts A->A Set PTS for the output audio frame.+ ... asetrate A->A Change the sample rate without altering the data.+ ... asettb A->A Set timebase for the audio output link.+ ... ashowinfo A->A Show textual information for each audio frame.+ T.. asidedata A->A Manipulate audio frame side data.+ TS. asisdr AA->A Measure Audio Scale-Invariant Signal-to-Distortion Ratio.+ TSC asoftclip A->A Audio Soft Clipper.+ .S. aspectralstats A->A Show frequency domain statistics about audio frames.+ ... asplit A->N Pass on the audio input to N audio outputs.+ ... asr A->A Automatic Speech Recognition.+ .S. astats A->A Show time domain statistics about audio frames.+ ..C astreamselect N->N Select audio streams+ TSC asubboost A->A Boost subwoofer frequencies.+ TSC asubcut A->A Cut subwoofer frequencies.+ TSC asupercut A->A Cut super frequencies.+ TSC asuperpass A->A Apply high order Butterworth band-pass filter.+ TSC asuperstop A->A Apply high order Butterworth band-stop filter.+ ..C atempo A->A Adjust audio tempo.+ TSC atilt A->A Apply spectral tilt to audio.+ ... atrim A->A Pick one continuous section from the input, drop the rest.+ ... axcorrelate AA->A Cross-correlate two audio streams.+ ... azmq A->A Receive commands through ZMQ and broker them to filters.+ TSC bandpass A->A Apply a two-pole Butterworth band-pass filter.+ TSC bandreject A->A Apply a two-pole Butterworth band-reject filter.+ TSC bass A->A Boost or cut lower frequencies.+ TSC biquad A->A Apply a biquad IIR filter with the given coefficients.+ ... bs2b A->A Bauer stereo-to-binaural filter.+ ... channelmap A->A Remap audio channels.+ ... channelsplit A->N Split audio into per-channel streams.+ ... chorus A->A Add a chorus effect to the audio.+ ... compand A->A Compress or expand audio dynamic range.+ T.C compensationdelay A->A Audio Compensation Delay Line.+ T.C crossfeed A->A Apply headphone crossfeed filter.+ TSC crystalizer A->A Simple audio noise sharpening filter.+ T.. dcshift A->A Apply a DC shift to the audio.+ T.. deesser A->A Apply de-essing to the audio.+ T.C dialoguenhance A->A Audio Dialogue Enhancement.+ ... drmeter A->A Measure audio dynamic range.+ TSC dynaudnorm A->A Dynamic Audio Normalizer.+ ... earwax A->A Widen the stereo image.+ ... ebur128 A->N EBU R128 scanner.+ TSC equalizer A->A Apply two-pole peaking equalization (EQ) filter.+ T.C extrastereo A->A Increase difference between stereo audio channels.+ ..C firequalizer A->A Finite Impulse Response Equalizer.+ ... flanger A->A Apply a flanging effect to the audio.+ ... haas A->A Apply Haas Stereo Enhancer.+ ... hdcd A->A Apply High Definition Compatible Digital (HDCD) decoding.+ .S. headphone N->A Apply headphone binaural spatialization with HRTFs in additional streams.+ TSC highpass A->A Apply a high-pass filter with 3dB point frequency.+ TSC highshelf A->A Apply a high shelf filter.+ ... join N->A Join multiple audio streams into multi-channel output.+ ..C ladspa N->A Apply LADSPA effect.+ ... loudnorm A->A EBU R128 loudness normalization+ TSC lowpass A->A Apply a low-pass filter with 3dB point frequency.+ TSC lowshelf A->A Apply a low shelf filter.+ ..C lv2 N->A Apply LV2 effect.+ ... mcompand A->A Multiband Compress or expand audio dynamic range.+ ... pan A->A Remix channels with coefficients (panning).+ ... replaygain A->A ReplayGain scanner.+ ..C rubberband A->A Apply time-stretching and pitch-shifting.+ ..C sidechaincompress AA->A Sidechain compressor.+ T.C sidechaingate AA->A Audio sidechain gate.+ ... silencedetect A->A Detect silence.+ T.C silenceremove A->A Remove silence.+ .S. sofalizer A->A SOFAlizer (Spatially Oriented Format for Acoustics).+ T.C speechnorm A->A Speech Normalizer.+ T.C stereotools A->A Apply various stereo tools.+ T.C stereowiden A->A Apply stereo widening effect.+ ... superequalizer A->A Apply 18 band equalization filter.+ .SC surround A->A Apply audio surround upmix filter.+ TSC tiltshelf A->A Apply a tilt shelf filter.+ TSC treble A->A Boost or cut upper frequencies.+ T.. tremolo A->A Apply tremolo effect.+ T.. vibrato A->A Apply vibrato effect.+ T.C virtualbass A->A Audio Virtual Bass.+ T.C volume A->A Change input volume.+ ... volumedetect A->A Detect audio volume.+ ... aevalsrc |->A Generate an audio signal generated by an expression.+ ... afdelaysrc |->A Generate a Fractional delay FIR coefficients.+ ... afireqsrc |->A Generate a FIR equalizer coefficients audio stream.+ ... afirsrc |->A Generate a FIR coefficients audio stream.+ ... anoisesrc |->A Generate a noise audio signal.+ ... anullsrc |->A Null audio source, return empty audio frames.+ ... flite |->A Synthesize voice from text using libflite.+ ... hilbert |->A Generate a Hilbert transform FIR coefficients.+ ... sinc |->A Generate a sinc kaiser-windowed low-pass, high-pass, band-pass, or band-reject FIR coefficients.+ ... sine |->A Generate sine wave audio signal.+ ... anullsink A->| Do absolutely nothing with the input audio.+ ... addroi V->V Add region of interest to frame.+ ... alphaextract V->V Extract an alpha channel as a grayscale image component.+ T.. alphamerge VV->V Copy the luma value of the second input into the alpha channel of the first input.+ TSC amplify V->V Amplify changes between successive video frames.+ ... ass V->V Render ASS subtitles onto input video using the libass library.+ TSC atadenoise V->V Apply an Adaptive Temporal Averaging Denoiser.+ T.C avgblur V->V Apply Average Blur filter.+ ... avgblur_opencl V->V Apply average blur filter+ ... avgblur_vulkan V->V Apply avgblur mask to input video+ TSC backgroundkey V->V Turns a static background into transparency.+ T.C bbox V->V Compute bounding box for each frame.+ ... bench V->V Benchmark part of a filtergraph.+ TSC bilateral V->V Apply Bilateral filter.+ ... bilateral_cuda V->V GPU accelerated bilateral filter+ T.. bitplanenoise V->V Measure bit plane noise.+ .S. blackdetect V->V Detect video intervals that are (almost) black.+ ... blackframe V->V Detect frames that are (almost) black.+ TSC blend VV->V Blend two video frames into each other.+ ..C blend_vulkan VV->V Blend two video frames in Vulkan+ ... blockdetect V->V Blockdetect filter.+ ... blurdetect V->V Blurdetect filter.+ TS. bm3d N->V Block-Matching 3D denoiser.+ T.. boxblur V->V Blur the input.+ ... boxblur_opencl V->V Apply boxblur filter to input video+ TS. bwdif V->V Deinterlace the input image.+ T.. bwdif_cuda V->V Deinterlace CUDA frames+ T.. bwdif_vulkan V->V Deinterlace Vulkan frames via bwdif+ TSC cas V->V Contrast Adaptive Sharpen.+ ... ccrepack V->V Repack CEA-708 closed caption metadata+ ... chromaber_vulkan V->V Offset chroma of input video (chromatic aberration)+ TSC chromahold V->V Turns a certain color range into gray.+ TSC chromakey V->V Turns a certain color into transparency. Operates on YUV colors.+ ... chromakey_cuda V->V GPU accelerated chromakey filter+ TSC chromanr V->V Reduce chrominance noise.+ TSC chromashift V->V Shift chroma.+ ... ciescope V->V Video CIE scope.+ T.. codecview V->V Visualize information about some codecs.+ TSC colorbalance V->V Adjust the color balance.+ TSC colorchannelmixer V->V Adjust colors by mixing color channels.+ TSC colorcontrast V->V Adjust color contrast between RGB components.+ TSC colorcorrect V->V Adjust color white balance selectively for blacks and whites.+ TSC colorize V->V Overlay a solid color on the video stream.+ TSC colorkey V->V Turns a certain color into transparency. Operates on RGB colors.+ ... colorkey_opencl V->V Turns a certain color into transparency. Operates on RGB colors.+ TSC colorhold V->V Turns a certain color range into gray. Operates on RGB colors.+ TSC colorlevels V->V Adjust the color levels.+ TSC colormap VVV->V Apply custom Color Maps to video stream.+ TS. colormatrix V->V Convert color matrix.+ TS. colorspace V->V Convert between colorspaces.+ ... colorspace_cuda V->V CUDA accelerated video color converter+ TSC colortemperature V->V Adjust color temperature of video.+ TSC convolution V->V Apply convolution filter.+ ... convolution_opencl V->V Apply convolution mask to input video+ TS. convolve VV->V Convolve first video stream with second video stream.+ ... copy V->V Copy the input video unchanged to the output.+ T.. corr VV->V Calculate the correlation between two video streams.+ ... cover_rect V->V Find and cover a user specified object.+ ..C crop V->V Crop the input video.+ T.C cropdetect V->V Auto-detect crop size.+ ... cue V->V Delay filtering to match a cue.+ TSC curves V->V Adjust components curves.+ .SC datascope V->V Video data analysis.+ T.C dblur V->V Apply Directional Blur filter.+ TS. dctdnoiz V->V Denoise frames using 2D DCT.+ TSC deband V->V Debands video.+ T.C deblock V->V Deblock video.+ ... decimate N->V Decimate frames (post field matching filter).+ TS. deconvolve VV->V Deconvolve first video stream with second video stream.+ TS. dedot V->V Reduce cross-luminance and cross-color.+ TSC deflate V->V Apply deflate effect.+ ... deflicker V->V Remove temporal frame luminance variations.+ ... deinterlace_qsv V->V Quick Sync Video "deinterlacing"+ ... deinterlace_vaapi V->V Deinterlacing of VAAPI surfaces+ ... dejudder V->V Remove judder produced by pullup.+ T.. delogo V->V Remove logo from input video.+ ... denoise_vaapi V->V VAAPI VPP for de-noise+ T.. derain V->V Apply derain filter to the input.+ ... deshake V->V Stabilize shaky video.+ ... deshake_opencl V->V Feature-point based video stabilization filter+ TSC despill V->V Despill video.+ ... detelecine V->V Apply an inverse telecine pattern.+ TSC dilation V->V Apply dilation effect.+ ... dilation_opencl V->V Apply dilation effect+ TSC displace VVV->V Displace pixels.+ ... dnn_classify V->V Apply DNN classify filter to the input.+ ... dnn_detect V->V Apply DNN detect filter to the input.+ ... dnn_processing V->V Apply DNN processing filter to the input.+ .S. doubleweave V->V Weave input video fields into double number of frames.+ T.C drawbox V->V Draw a colored box on the input video.+ ... drawgraph V->V Draw a graph using input video metadata.+ T.C drawgrid V->V Draw a colored grid on the input video.+ T.C drawtext V->V Draw text on top of video frames using libfreetype library.+ T.. edgedetect V->V Detect and draw edge.+ ... elbg V->V Apply posterize effect, using the ELBG algorithm.+ T.. entropy V->V Measure video frames entropy.+ .S. epx V->V Scale the input using EPX algorithm.+ T.C eq V->V Adjust brightness, contrast, gamma, and saturation.+ TSC erosion V->V Apply erosion effect.+ ... erosion_opencl V->V Apply erosion effect+ TSC estdif V->V Apply Edge Slope Tracing deinterlace.+ TSC exposure V->V Adjust exposure of the video stream.+ ... extractplanes V->N Extract planes as grayscale frames.+ TS. fade V->V Fade in/out input video.+ ..C feedback VV->VV Apply feedback video filter.+ TSC fftdnoiz V->V Denoise frames using 3D FFT.+ TS. fftfilt V->V Apply arbitrary expressions to pixels in frequency domain.+ ... field V->V Extract a field from the input video.+ ... fieldhint V->V Field matching using hints.+ ... fieldmatch N->V Field matching for inverse telecine.+ T.. fieldorder V->V Set the field order.+ T.C fillborders V->V Fill borders of the input video.+ ... find_rect V->V Find a user specified object.+ ... flip_vulkan V->V Flip both horizontally and vertically+ T.. floodfill V->V Fill area with same color with another color.+ ... format V->V Convert the input video to one of the specified pixel formats.+ ... fps V->V Force constant framerate.+ ... framepack VV->V Generate a frame packed stereoscopic video.+ .S. framerate V->V Upsamples or downsamples progressive source between specified frame rates.+ T.. framestep V->V Select one frame every N frames.+ ... freezedetect V->V Detects frozen video input.+ ... freezeframes VV->V Freeze video frames.+ T.C frei0r V->V Apply a frei0r effect.+ T.. fspp V->V Apply Fast Simple Post-processing filter.+ TSC gblur V->V Apply Gaussian Blur filter.+ ... gblur_vulkan V->V Gaussian Blur in Vulkan+ TS. geq V->V Apply generic equation to each pixel.+ T.. gradfun V->V Debands video quickly using gradients.+ ..C graphmonitor V->V Show various filtergraph stats.+ TS. grayworld V->V Adjust white balance using LAB gray world algorithm+ TS. greyedge V->V Estimates scene illumination by grey edge assumption.+ TSC guided N->V Apply Guided filter.+ TSC haldclut VV->V Adjust colors using a Hald CLUT.+ TS. hflip V->V Horizontally flip the input video.+ ... hflip_vulkan V->V Horizontally flip the input video in Vulkan+ T.. histeq V->V Apply global color histogram equalization.+ ... histogram V->V Compute and draw a histogram.+ TSC hqdn3d V->V Apply a High Quality 3D Denoiser.+ .S. hqx V->V Scale the input by 2, 3 or 4 using the hq*x magnification algorithm.+ .S. hstack N->V Stack video inputs horizontally.+ TSC hsvhold V->V Turns a certain HSV range into gray.+ TSC hsvkey V->V Turns a certain HSV range into transparency. Operates on YUV colors.+ T.C hue V->V Adjust the hue and saturation of the input video.+ TSC huesaturation V->V Apply hue-saturation-intensity adjustments.+ ... hwdownload V->V Download a hardware frame to a normal frame+ ... hwmap V->V Map hardware frames+ ... hwupload V->V Upload a normal frame to a hardware frame+ ... hwupload_cuda V->V Upload a system memory frame to a CUDA device.+ T.. hysteresis VV->V Grow first stream into second stream by connecting components.+ TS. identity VV->V Calculate the Identity between two video streams.+ ... idet V->V Interlace detect Filter.+ T.C il V->V Deinterleave or interleave fields.+ TSC inflate V->V Apply inflate effect.+ ... interlace V->V Convert progressive video into interlaced.+ ... interleave N->V Temporally interleave video inputs.+ ... kerndeint V->V Apply kernel deinterlacing to the input.+ TSC kirsch V->V Apply kirsch operator.+ TSC lagfun V->V Slowly update darker pixels.+ T.. latency V->V Report video filtering latency.+ TSC lenscorrection V->V Rectify the image by correcting for lens distortion.+ ..C libplacebo N->V Apply various GPU filters from libplacebo+ TSC limitdiff N->V Apply filtering with limiting difference.+ TSC limiter V->V Limit pixels components to the specified range.+ ... loop V->V Loop video frames.+ TSC lumakey V->V Turns a certain luma into transparency.+ TSC lut V->V Compute and apply a lookup table to the RGB/YUV input video.+ TSC lut1d V->V Adjust colors using a 1D LUT.+ TSC lut2 VV->V Compute and apply a lookup table from two video inputs.+ TSC lut3d V->V Adjust colors using a 3D LUT.+ TSC lutrgb V->V Compute and apply a lookup table to the RGB input video.+ TSC lutyuv V->V Compute and apply a lookup table to the YUV input video.+ TSC maskedclamp VVV->V Clamp first stream with second stream and third stream.+ TSC maskedmax VVV->V Apply filtering with maximum difference of two streams.+ TSC maskedmerge VVV->V Merge first stream with second stream using third stream as mask.+ TSC maskedmin VVV->V Apply filtering with minimum difference of two streams.+ TSC maskedthreshold VV->V Pick pixels comparing absolute difference of two streams with threshold.+ TSC maskfun V->V Create Mask.+ ... mcdeint V->V Apply motion compensating deinterlacing.+ TSC median V->V Apply Median filter.+ ... mergeplanes N->V Merge planes.+ ... mestimate V->V Generate motion vectors.+ T.. metadata V->V Manipulate video frame metadata.+ T.. midequalizer VV->V Apply Midway Equalization.+ ... minterpolate V->V Frame rate conversion using Motion Interpolation.+ TSC mix N->V Mix video inputs.+ TSC monochrome V->V Convert video to gray using custom color filter.+ TSC morpho VV->V Apply Morphological filter.+ ... mpdecimate V->V Remove near-duplicate frames.+ TS. msad VV->V Calculate the MSAD between two video streams.+ TSC multiply VV->V Multiply first video stream with second video stream.+ TSC negate V->V Negate input video.+ TS. nlmeans V->V Non-local means denoiser.+ ... nlmeans_opencl V->V Non-local means denoiser through OpenCL+ ... nlmeans_vulkan V->V Non-local means denoiser (Vulkan)+ TSC nnedi V->V Apply neural network edge directed interpolation intra-only deinterlacer.+ ... noformat V->V Force libavfilter not to use any of the specified pixel formats for the input to the next filter.+ TS. noise V->V Add noise.+ T.C normalize V->V Normalize RGB video.+ ... null V->V Pass the source unchanged to the output.+ T.C oscilloscope V->V 2D Video Oscilloscope.+ TSC overlay VV->V Overlay a video source on top of the input.+ ... overlay_opencl VV->V Overlay one video on top of another+ ... overlay_qsv VV->V Quick Sync Video overlay.+ ... overlay_vaapi VV->V Overlay one video on top of another+ ... overlay_vulkan VV->V Overlay a source on top of another+ ... overlay_cuda VV->V Overlay one video on top of another using CUDA+ T.. owdenoise V->V Denoise using wavelets.+ ... pad V->V Pad the input video.+ ... pad_opencl V->V Pad the input video.+ ... palettegen V->V Find the optimal palette for a given stream.+ ... paletteuse VV->V Use a palette to downsample an input video stream.+ T.C perms V->V Set permissions for the output video frame.+ TS. perspective V->V Correct the perspective of video.+ T.C phase V->V Phase shift fields.+ ... photosensitivity V->V Filter out photosensitive epilepsy seizure-inducing flashes.+ ... pixdesctest V->V Test pixel format definitions.+ TSC pixelize V->V Pixelize video.+ T.C pixscope V->V Pixel data analysis.+ T.C pp V->V Filter video using libpostproc.+ T.. pp7 V->V Apply Postprocessing 7 filter.+ TS. premultiply N->V PreMultiply first stream with first plane of second stream.+ TSC prewitt V->V Apply prewitt operator.+ ... prewitt_opencl V->V Apply prewitt operator+ ... procamp_vaapi V->V ProcAmp (color balance) adjustments for hue, saturation, brightness, contrast+ ... program_opencl N->V Filter video using an OpenCL program+ TSC pseudocolor V->V Make pseudocolored video frames.+ TS. psnr VV->V Calculate the PSNR between two video streams.+ ... pullup V->V Pullup from field sequence to frames.+ T.. qp V->V Change video quantization parameters.+ ... random V->V Return random frames.+ TSC readeia608 V->V Read EIA-608 Closed Caption codes from input video and write them to frame metadata.+ ... readvitc V->V Read vertical interval timecode and write it to frame metadata.+ ..C realtime V->V Slow down filtering to match realtime.+ .S. remap VVV->V Remap pixels.+ ... remap_opencl VVV->V Remap pixels using OpenCL.+ TS. removegrain V->V Remove grain.+ T.. removelogo V->V Remove a TV logo based on a mask image.+ ... repeatfields V->V Hard repeat fields based on MPEG repeat field flag.+ ... reverse V->V Reverse a clip.+ TSC rgbashift V->V Shift RGBA.+ TSC roberts V->V Apply roberts cross operator.+ ... roberts_opencl V->V Apply roberts operator+ TSC rotate V->V Rotate the input image.+ T.. sab V->V Apply shape adaptive blur.+ ..C scale V->V Scale the input video size and/or convert the image format.+ ... scale_cuda V->V GPU accelerated video resizer+ ... scale_qsv V->V Quick Sync Video "scaling and format conversion"+ ... scale_vaapi V->V Scale to/from VAAPI surfaces.+ ... scale_vulkan V->V Scale Vulkan frames+ ..C scale2ref VV->VV Scale the input video size and/or convert the image format to the given reference.+ ... scdet V->V Detect video scene change+ TSC scharr V->V Apply scharr operator.+ TSC scroll V->V Scroll input video.+ ... segment V->N Segment video stream.+ ... select V->N Select video frames to pass in output.+ TS. selectivecolor V->V Apply CMYK adjustments to specific color ranges.+ ... sendcmd V->V Send commands to filters.+ ... separatefields V->V Split input video frames into fields.+ ... setdar V->V Set the frame display aspect ratio.+ ... setfield V->V Force field for the output video frame.+ ... setparams V->V Force field, or color property for the output video frame.+ ..C setpts V->V Set PTS for the output video frame.+ ... setrange V->V Force color range for the output video frame.+ ... setsar V->V Set the pixel sample aspect ratio.+ ... settb V->V Set timebase for the video output link.+ ... sharpness_vaapi V->V VAAPI VPP for sharpness+ TSC shear V->V Shear transform the input image.+ ... showinfo V->V Show textual information for each video frame.+ ... showpalette V->V Display frame palette.+ T.. shuffleframes V->V Shuffle video frames.+ TS. shufflepixels V->V Shuffle video pixels.+ T.. shuffleplanes V->V Shuffle video planes.+ T.. sidedata V->V Manipulate video frame side data.+ .S. signalstats V->V Generate statistics from video analysis.+ ... signature N->V Calculate the MPEG-7 video signature+ ... siti V->V Calculate spatial information (SI) and temporal information (TI).+ T.. smartblur V->V Blur the input video without impacting the outlines.+ TSC sobel V->V Apply sobel operator.+ ... sobel_opencl V->V Apply sobel operator+ ... split V->N Pass on the input to N video outputs.+ T.C spp V->V Apply a simple post processing filter.+ ... sr V->V Apply DNN-based image super resolution to the input.+ TS. ssim VV->V Calculate the SSIM between two video streams.+ ... ssim360 VV->V Calculate the SSIM between two 360 video streams.+ .S. stereo3d V->V Convert video stereoscopic 3D view.+ ..C streamselect N->N Select video streams+ ... subtitles V->V Render text subtitles onto input video using the libass library.+ .S. super2xsai V->V Scale the input by 2x using the Super2xSaI pixel art algorithm.+ T.C swaprect V->V Swap 2 rectangular objects in video.+ T.. swapuv V->V Swap U and V components.+ TSC tblend V->V Blend successive frames.+ ... telecine V->V Apply a telecine pattern.+ ... thistogram V->V Compute and draw a temporal histogram.+ TSC threshold VVVV->V Threshold first video stream using other video streams.+ TS. thumbnail V->V Select the most representative frame in a given sequence of consecutive frames.+ ... thumbnail_cuda V->V Select the most representative frame in a given sequence of consecutive frames.+ ... tile V->V Tile several successive frames together.+ ... tinterlace V->V Perform temporal field interlacing.+ TSC tlut2 V->V Compute and apply a lookup table from two successive frames.+ TSC tmedian V->V Pick median pixels from successive frames.+ T.. tmidequalizer V->V Apply Temporal Midway Equalization.+ TSC tmix V->V Mix successive video frames.+ .S. tonemap V->V Conversion to/from different dynamic ranges.+ ... tonemap_opencl V->V Perform HDR to SDR conversion with tonemapping.+ ... tonemap_vaapi V->V VAAPI VPP for tone-mapping+ ... tpad V->V Temporarily pad video frames.+ .S. transpose V->V Transpose input video.+ ... transpose_opencl V->V Transpose input video+ ... transpose_vaapi V->V VAAPI VPP for transpose+ ... transpose_vulkan V->V Transpose Vulkan Filter+ ... trim V->V Pick one continuous section from the input, drop the rest.+ TS. unpremultiply N->V UnPreMultiply first stream with first plane of second stream.+ TS. unsharp V->V Sharpen or blur the input video.+ ... unsharp_opencl V->V Apply unsharp mask to input video+ ... untile V->V Untile a frame into a sequence of frames.+ TS. uspp V->V Apply Ultra Simple / Slow Post-processing filter.+ .SC v360 V->V Convert 360 projection of video.+ T.. vaguedenoiser V->V Apply a Wavelet based Denoiser.+ TSC varblur VV->V Apply Variable Blur filter.+ ..C vectorscope V->V Video vectorscope.+ T.. vflip V->V Flip the input video vertically.+ ... vflip_vulkan V->V Vertically flip the input video in Vulkan+ ... vfrdet V->V Variable frame rate detect filter.+ TSC vibrance V->V Boost or alter saturation.+ ... vidstabdetect V->V Extract relative transformations, pass 1 of 2 for stabilization (see vidstabtransform for pass 2).+ ... vidstabtransform V->V Transform the frames, pass 2 of 2 for stabilization (see vidstabdetect for pass 1).+ TS. vif VV->V Calculate the VIF between two video streams.+ T.. vignette V->V Make or reverse a vignette effect.+ ... vmafmotion V->V Calculate the VMAF Motion score.+ ... vpp_qsv V->V Quick Sync Video "VPP"+ .S. vstack N->V Stack video inputs vertically.+ TSC w3fdif V->V Apply Martin Weston three field deinterlace.+ .SC waveform V->V Video waveform monitor.+ .S. weave V->V Weave input video fields into frames.+ .S. xbr V->V Scale the input using xBR algorithm.+ TS. xcorrelate VV->V Cross-correlate first video stream with second video stream.+ .S. xfade VV->V Cross fade one video with another video.+ ... xfade_opencl VV->V Cross fade one video with another video.+ ... xfade_vulkan VV->V Cross fade one video with another video.+ TSC xmedian N->V Pick median pixels from several video inputs.+ .S. xstack N->V Stack video inputs into custom layout.+ TS. yadif V->V Deinterlace the input image.+ T.. yadif_cuda V->V Deinterlace CUDA frames+ TSC yaepblur V->V Yet another edge preserving blur filter.+ ... zmq V->V Receive commands through ZMQ and broker them to filters.+ ... zoompan V->V Apply Zoom & Pan effect.+ .SC zscale V->V Apply resizing, colorspace and bit depth conversion.+ ... hstack_vaapi N->V "VA-API" hstack+ ... vstack_vaapi N->V "VA-API" vstack+ ... xstack_vaapi N->V "VA-API" xstack+ ... hstack_qsv N->V "Quick Sync Video" hstack+ ... vstack_qsv N->V "Quick Sync Video" vstack+ ... xstack_qsv N->V "Quick Sync Video" xstack+ ... allrgb |->V Generate all RGB colors.+ ... allyuv |->V Generate all yuv colors.+ ... cellauto |->V Create pattern generated by an elementary cellular automaton.+ ..C color |->V Provide an uniformly colored input.+ ... color_vulkan |->V Generate a constant color (Vulkan)+ ... colorchart |->V Generate color checker chart.+ ... colorspectrum |->V Generate colors spectrum.+ ... frei0r_src |->V Generate a frei0r source.+ .S. gradients |->V Draw a gradients.+ ... haldclutsrc |->V Provide an identity Hald CLUT.+ ... life |->V Create life.+ ... mandelbrot |->V Render a Mandelbrot fractal.+ ... mptestsrc |->V Generate various test pattern.+ ... nullsrc |->V Null video source, return unprocessed video frames.+ ... openclsrc |->V Generate video using an OpenCL program+ ... pal75bars |->V Generate PAL 75% color bars.+ ... pal100bars |->V Generate PAL 100% color bars.+ ... rgbtestsrc |->V Generate RGB test pattern.+ .S. sierpinski |->V Render a Sierpinski fractal.+ ... smptebars |->V Generate SMPTE color bars.+ ... smptehdbars |->V Generate SMPTE HD color bars.+ ... testsrc |->V Generate test pattern.+ ... testsrc2 |->V Generate another test pattern.+ ... yuvtestsrc |->V Generate YUV test pattern.+ .SC zoneplate |->V Generate zone-plate.+ ... nullsink V->| Do absolutely nothing with the input video.+ ..C a3dscope A->V Convert input audio to 3d scope video output.+ ... abitscope A->V Convert input audio to audio bit scope video output.+ ... adrawgraph A->V Draw a graph using input audio metadata.+ ..C agraphmonitor A->V Show various filtergraph stats.+ ... ahistogram A->V Convert input audio to histogram video output.+ ... aphasemeter A->N Convert input audio to phase meter video output.+ .SC avectorscope A->V Convert input audio to vectorscope video output.+ ..C concat N->N Concatenate audio and video streams.+ ... showcqt A->V Convert input audio to a CQT (Constant/Clamped Q Transform) spectrum video output.+ .S. showcwt A->V Convert input audio to a CWT (Continuous Wavelet Transform) spectrum video output.+ ... showfreqs A->V Convert input audio to a frequencies video output.+ .S. showspatial A->V Convert input audio to a spatial video output.+ .S. showspectrum A->V Convert input audio to a spectrum video output.+ .S. showspectrumpic A->V Convert input audio to a spectrum video output single picture.+ ... showvolume A->V Convert input audio volume to video output.+ ... showwaves A->V Convert input audio to a video output.+ ... showwavespic A->V Convert input audio to a video output single picture.+ ... spectrumsynth VV->A Convert input spectrum videos to audio output.+ ..C avsynctest |->AV Generate an Audio Video Sync Test.+ ..C amovie |->N Read audio from a movie source.+ ..C movie |->N Read from a movie source.+ ... afifo A->A Buffer input frames and send them when they are requested.+ ... fifo V->V Buffer input images and send them when they are requested.+ ... abuffer |->A Buffer audio frames, and make them accessible to the filterchain.+ ... buffer |->V Buffer video frames, and make them accessible to the filterchain.+ ... abuffersink A->| Buffer audio frames, and make them available to the end of the filter graph.+ ... buffersink V->| Buffer video frames, and make them available to the end of the filter graph.diff --git a/tests/fixtures/ffmpeg_filters_8.1.2_macos.txt b/tests/fixtures/ffmpeg_filters_8.1.2_macos.txtnew file mode 100644index 0000000..a95ab98--- /dev/null+++ b/tests/fixtures/ffmpeg_filters_8.1.2_macos.txt@@ -0,0 +1,489 @@+Filters:+ T.. = Timeline support+ .S. = Slice threading+ A = Audio input/output+ V = Video input/output+ N = Dynamic number and/or type of input/output+ | = Source or sink filter+ ------+ TS aap AA->A Apply Affine Projection algorithm to first audio stream.+ .. abench A->A Benchmark part of a filtergraph.+ .. acompressor A->A Audio compressor.+ .. acontrast A->A Simple audio dynamic range compression/expansion filter.+ .. acopy A->A Copy the input audio unchanged to the output.+ .. acue A->A Delay filtering to match a cue.+ .. acrossfade N->A Cross fade two input audio streams.+ .S acrossover A->N Split audio into per-bands streams.+ T. acrusher A->A Reduce audio bit resolution.+ TS adeclick A->A Remove impulsive noise from input audio.+ TS adeclip A->A Remove clipping from input audio.+ TS adecorrelate A->A Apply decorrelation to input audio.+ T. adelay A->A Delay one or more audio channels.+ TS adenorm A->A Remedy denormals by adding extremely low-level noise.+ T. aderivative A->A Compute derivative of input audio.+ TS adrc A->A Audio Spectral Dynamic Range Controller.+ TS adynamicequalizer A->A Apply Dynamic Equalization of input audio.+ T. adynamicsmooth A->A Apply Dynamic Smoothing of input audio.+ .. aecho A->A Add echoing to the audio.+ TS aemphasis A->A Audio emphasis.+ T. aeval A->A Filter audio signal according to a specified expression.+ T. aexciter A->A Enhance high frequency part of audio.+ T. afade A->A Fade in/out input audio.+ TS afftdn A->A Denoise audio samples using FFT.+ TS afftfilt A->A Apply arbitrary expressions to samples in frequency domain.+ TS afir N->A Apply Finite Impulse Response filter with supplied coefficients in additional stream(s).+ .. aformat A->A Convert the input audio to one of the specified formats.+ TS afreqshift A->A Apply frequency shifting to input audio.+ TS afwtdn A->A Denoise audio stream using Wavelets.+ T. agate A->A Audio gate.+ .S aiir A->N Apply Infinite Impulse Response filter with supplied coefficients.+ T. aintegral A->A Compute integral of input audio.+ .. ainterleave N->A Temporally interleave audio inputs.+ T. alatency A->A Report audio filtering latency.+ T. alimiter A->A Audio lookahead limiter.+ TS allpass A->A Apply a two-pole all-pass filter.+ .. aloop A->A Loop audio samples.+ .. amerge N->A Merge two or more audio streams into a single multi-channel stream.+ T. ametadata A->A Manipulate audio frame metadata.+ .. amix N->A Audio mixing.+ .. amultiply AA->A Multiply two audio streams.+ TS anequalizer A->N Apply high-order audio parametric multi band equalizer.+ TS anlmdn A->A Reduce broadband noise from stream using Non-Local Means.+ TS anlmf AA->A Apply Normalized Least-Mean-Fourth algorithm to first audio stream.+ TS anlms AA->A Apply Normalized Least-Mean-Squares algorithm to first audio stream.+ .. anull A->A Pass the source unchanged to the output.+ T. apad A->A Pad audio with silence.+ T. aperms A->A Set permissions for the output audio frame.+ .. aphaser A->A Add a phasing effect to the audio.+ TS aphaseshift A->A Apply phase shifting to input audio.+ TS apsnr AA->A Measure Audio Peak Signal-to-Noise Ratio.+ TS apsyclip A->A Audio Psychoacoustic Clipper.+ .. apulsator A->A Audio pulsator.+ .. arealtime A->A Slow down filtering to match realtime.+ .. aresample A->A Resample audio data.+ .. areverse A->A Reverse an audio clip.+ TS arls AA->A Apply Recursive Least Squares algorithm to first audio stream.+ TS arnndn A->A Reduce noise from speech using Recurrent Neural Networks.+ TS asdr AA->A Measure Audio Signal-to-Distortion Ratio.+ .. asegment A->N Segment audio stream.+ .. aselect A->N Select audio frames to pass in output.+ .. asendcmd A->A Send commands to filters.+ T. asetnsamples A->A Set the number of samples for each output audio frames.+ .. asetpts A->A Set PTS for the output audio frame.+ .. asetrate A->A Change the sample rate without altering the data.+ .. asettb A->A Set timebase for the audio output link.+ .. ashowinfo A->A Show textual information for each audio frame.+ T. asidedata A->A Manipulate audio frame side data.+ TS asisdr AA->A Measure Audio Scale-Invariant Signal-to-Distortion Ratio.+ TS asoftclip A->A Audio Soft Clipper.+ .S aspectralstats A->A Show frequency domain statistics about audio frames.+ .. asplit A->N Pass on the audio input to N audio outputs.+ .S astats A->A Show time domain statistics about audio frames.+ .. astreamselect N->N Select audio streams+ TS asubboost A->A Boost subwoofer frequencies.+ TS asubcut A->A Cut subwoofer frequencies.+ TS asupercut A->A Cut super frequencies.+ TS asuperpass A->A Apply high order Butterworth band-pass filter.+ TS asuperstop A->A Apply high order Butterworth band-stop filter.+ .. atempo A->A Adjust audio tempo.+ TS atilt A->A Apply spectral tilt to audio.+ .. atrim A->A Pick one continuous section from the input, drop the rest.+ .. axcorrelate AA->A Cross-correlate two audio streams.+ TS bandpass A->A Apply a two-pole Butterworth band-pass filter.+ TS bandreject A->A Apply a two-pole Butterworth band-reject filter.+ TS bass A->A Boost or cut lower frequencies.+ TS biquad A->A Apply a biquad IIR filter with the given coefficients.+ .. channelmap A->A Remap audio channels.+ .. channelsplit A->N Split audio into per-channel streams.+ .. chorus A->A Add a chorus effect to the audio.+ .. compand A->A Compress or expand audio dynamic range.+ T. compensationdelay A->A Audio Compensation Delay Line.+ T. crossfeed A->A Apply headphone crossfeed filter.+ TS crystalizer A->A Simple audio noise sharpening filter.+ T. dcshift A->A Apply a DC shift to the audio.+ T. deesser A->A Apply de-essing to the audio.+ T. dialoguenhance A->A Audio Dialogue Enhancement.+ .. drmeter A->A Measure audio dynamic range.+ TS dynaudnorm A->A Dynamic Audio Normalizer.+ .. earwax A->A Widen the stereo image.+ .. ebur128 A->N EBU R128 scanner.+ TS equalizer A->A Apply two-pole peaking equalization (EQ) filter.+ T. extrastereo A->A Increase difference between stereo audio channels.+ .. firequalizer A->A Finite Impulse Response Equalizer.+ .. flanger A->A Apply a flanging effect to the audio.+ .. haas A->A Apply Haas Stereo Enhancer.+ .. hdcd A->A Apply High Definition Compatible Digital (HDCD) decoding.+ .S headphone N->A Apply headphone binaural spatialization with HRTFs in additional streams.+ TS highpass A->A Apply a high-pass filter with 3dB point frequency.+ TS highshelf A->A Apply a high shelf filter.+ .. join N->A Join multiple audio streams into multi-channel output.+ .. loudnorm A->A EBU R128 loudness normalization+ TS lowpass A->A Apply a low-pass filter with 3dB point frequency.+ TS lowshelf A->A Apply a low shelf filter.+ .. mcompand A->A Multiband Compress or expand audio dynamic range.+ .. pan A->A Remix channels with coefficients (panning).+ .. replaygain A->A ReplayGain scanner.+ .. sidechaincompress AA->A Sidechain compressor.+ T. sidechaingate AA->A Audio sidechain gate.+ .. silencedetect A->A Detect silence.+ T. silenceremove A->A Remove silence.+ T. speechnorm A->A Speech Normalizer.+ T. stereotools A->A Apply various stereo tools.+ T. stereowiden A->A Apply stereo widening effect.+ .. superequalizer A->A Apply 18 band equalization filter.+ .S surround A->A Apply audio surround upmix filter.+ TS tiltshelf A->A Apply a tilt shelf filter.+ TS treble A->A Boost or cut upper frequencies.+ T. tremolo A->A Apply tremolo effect.+ T. vibrato A->A Apply vibrato effect.+ T. virtualbass A->A Audio Virtual Bass.+ T. volume A->A Change input volume.+ .. volumedetect A->A Detect audio volume.+ .. aevalsrc |->A Generate an audio signal generated by an expression.+ .. afdelaysrc |->A Generate a Fractional delay FIR coefficients.+ .. afireqsrc |->A Generate a FIR equalizer coefficients audio stream.+ .. afirsrc |->A Generate a FIR coefficients audio stream.+ .. anoisesrc |->A Generate a noise audio signal.+ .. anullsrc |->A Null audio source, return empty audio frames.+ .. hilbert |->A Generate a Hilbert transform FIR coefficients.+ .. sinc |->A Generate a sinc kaiser-windowed low-pass, high-pass, band-pass, or band-reject FIR coefficients.+ .. sine |->A Generate sine wave audio signal.+ .. anullsink A->| Do absolutely nothing with the input audio.+ .. addroi V->V Add region of interest to frame.+ .. alphaextract V->V Extract an alpha channel as a grayscale image component.+ T. alphamerge VV->V Copy the luma value of the second input into the alpha channel of the first input.+ TS amplify V->V Amplify changes between successive video frames.+ TS atadenoise V->V Apply an Adaptive Temporal Averaging Denoiser.+ T. avgblur V->V Apply Average Blur filter.+ TS backgroundkey V->V Turns a static background into transparency.+ T. bbox V->V Compute bounding box for each frame.+ .. bench V->V Benchmark part of a filtergraph.+ TS bilateral V->V Apply Bilateral filter.+ T. bitplanenoise V->V Measure bit plane noise.+ .S blackdetect V->V Detect video intervals that are (almost) black.+ .S blackframe V->V Detect frames that are (almost) black.+ TS blend VV->V Blend two video frames into each other.+ .. blockdetect V->V Blockdetect filter.+ .. blurdetect V->V Blurdetect filter.+ TS bm3d N->V Block-Matching 3D denoiser.+ T. boxblur V->V Blur the input.+ TS bwdif V->V Deinterlace the input image.+ TS cas V->V Contrast Adaptive Sharpen.+ .. ccrepack V->V Repack CEA-708 closed caption metadata+ TS chromahold V->V Turns a certain color range into gray.+ TS chromakey V->V Turns a certain color into transparency. Operates on YUV colors.+ TS chromanr V->V Reduce chrominance noise.+ TS chromashift V->V Shift chroma.+ .. ciescope V->V Video CIE scope.+ T. codecview V->V Visualize information about some codecs.+ TS colorbalance V->V Adjust the color balance.+ TS colorchannelmixer V->V Adjust colors by mixing color channels.+ TS colorcontrast V->V Adjust color contrast between RGB components.+ TS colorcorrect V->V Adjust color white balance selectively for blacks and whites.+ .S colordetect V->V Detect video color properties.+ TS colorize V->V Overlay a solid color on the video stream.+ TS colorkey V->V Turns a certain color into transparency. Operates on RGB colors.+ TS colorhold V->V Turns a certain color range into gray. Operates on RGB colors.+ TS colorlevels V->V Adjust the color levels.+ TS colormap VVV->V Apply custom Color Maps to video stream.+ TS colormatrix V->V Convert color matrix.+ TS colorspace V->V Convert between colorspaces.+ TS colortemperature V->V Adjust color temperature of video.+ TS convolution V->V Apply convolution filter.+ TS convolve VV->V Convolve first video stream with second video stream.+ .. copy V->V Copy the input video unchanged to the output.+ .. coreimage V->V Video filtering using CoreImage API.+ TS corr VV->V Calculate the correlation between two video streams.+ .. cover_rect V->V Find and cover a user specified object.+ .. crop V->V Crop the input video.+ T. cropdetect V->V Auto-detect crop size.+ .. cue V->V Delay filtering to match a cue.+ TS curves V->V Adjust components curves.+ .S datascope V->V Video data analysis.+ T. dblur V->V Apply Directional Blur filter.+ TS dctdnoiz V->V Denoise frames using 2D DCT.+ TS deband V->V Debands video.+ T. deblock V->V Deblock video.+ .. decimate N->V Decimate frames (post field matching filter).+ TS deconvolve VV->V Deconvolve first video stream with second video stream.+ TS dedot V->V Reduce cross-luminance and cross-color.+ TS deflate V->V Apply deflate effect.+ .. deflicker V->V Remove temporal frame luminance variations.+ .. dejudder V->V Remove judder produced by pullup.+ T. delogo V->V Remove logo from input video.+ .. deshake V->V Stabilize shaky video.+ TS despill V->V Despill video.+ .. detelecine V->V Apply an inverse telecine pattern.+ TS dilation V->V Apply dilation effect.+ TS displace VVV->V Displace pixels.+ .S doubleweave V->V Weave input video fields into double number of frames.+ T. drawbox V->V Draw a colored box on the input video.+ .. drawgraph V->V Draw a graph using input video metadata.+ T. drawgrid V->V Draw a colored grid on the input video.+ T. edgedetect V->V Detect and draw edge.+ .. elbg V->V Apply posterize effect, using the ELBG algorithm.+ T. entropy V->V Measure video frames entropy.+ .S epx V->V Scale the input using EPX algorithm.+ T. eq V->V Adjust brightness, contrast, gamma, and saturation.+ TS erosion V->V Apply erosion effect.+ TS estdif V->V Apply Edge Slope Tracing deinterlace.+ TS exposure V->V Adjust exposure of the video stream.+ .. extractplanes V->N Extract planes as grayscale frames.+ TS fade V->V Fade in/out input video.+ T. feedback VV->VV Apply feedback video filter.+ TS fftdnoiz V->V Denoise frames using 3D FFT.+ TS fftfilt V->V Apply arbitrary expressions to pixels in frequency domain.+ .. field V->V Extract a field from the input video.+ .. fieldhint V->V Field matching using hints.+ .. fieldmatch N->V Field matching for inverse telecine.+ T. fieldorder V->V Set the field order.+ T. fillborders V->V Fill borders of the input video.+ .. find_rect V->V Find a user specified object.+ T. floodfill V->V Fill area with same color with another color.+ .. format V->V Convert the input video to one of the specified pixel formats.+ .. fps V->V Force constant framerate.+ .. framepack VV->V Generate a frame packed stereoscopic video.+ .S framerate V->V Upsamples or downsamples progressive source between specified frame rates.+ T. framestep V->V Select one frame every N frames.+ .. freezedetect V->V Detects frozen video input.+ .. freezeframes VV->V Freeze video frames.+ T. fspp V->V Apply Fast Simple Post-processing filter.+ .. fsync V->V Synchronize video frames from external source.+ TS gblur V->V Apply Gaussian Blur filter.+ TS geq V->V Apply generic equation to each pixel.+ T. gradfun V->V Debands video quickly using gradients.+ .. graphmonitor V->V Show various filtergraph stats.+ TS grayworld V->V Adjust white balance using LAB gray world algorithm+ TS greyedge V->V Estimates scene illumination by grey edge assumption.+ TS guided N->V Apply Guided filter.+ TS haldclut VV->V Adjust colors using a Hald CLUT.+ TS hflip V->V Horizontally flip the input video.+ T. histeq V->V Apply global color histogram equalization.+ .. histogram V->V Compute and draw a histogram.+ TS hqdn3d V->V Apply a High Quality 3D Denoiser.+ .S hqx V->V Scale the input by 2, 3 or 4 using the hq*x magnification algorithm.+ .S hstack N->V Stack video inputs horizontally.+ TS hsvhold V->V Turns a certain HSV range into gray.+ TS hsvkey V->V Turns a certain HSV range into transparency. Operates on YUV colors.+ T. hue V->V Adjust the hue and saturation of the input video.+ TS huesaturation V->V Apply hue-saturation-intensity adjustments.+ .. hwdownload V->V Download a hardware frame to a normal frame+ .. hwmap V->V Map hardware frames+ .. hwupload V->V Upload a normal frame to a hardware frame+ T. hysteresis VV->V Grow first stream into second stream by connecting components.+ TS identity VV->V Calculate the Identity between two video streams.+ .. idet V->V Interlace detect Filter.+ T. il V->V Deinterleave or interleave fields.+ TS inflate V->V Apply inflate effect.+ .. interlace V->V Convert progressive video into interlaced.+ .. interleave N->V Temporally interleave video inputs.+ .. kerndeint V->V Apply kernel deinterlacing to the input.+ TS kirsch V->V Apply kirsch operator.+ TS lagfun V->V Slowly update darker pixels.+ T. latency V->V Report video filtering latency.+ TS lenscorrection V->V Rectify the image by correcting for lens distortion.+ .. libvmaf VV->V Calculate the VMAF between two video streams.+ TS limitdiff N->V Apply filtering with limiting difference.+ TS limiter V->V Limit pixels components to the specified range.+ .. loop V->V Loop video frames.+ TS lumakey V->V Turns a certain luma into transparency.+ TS lut V->V Compute and apply a lookup table to the RGB/YUV input video.+ TS lut1d V->V Adjust colors using a 1D LUT.+ TS lut2 VV->V Compute and apply a lookup table from two video inputs.+ TS lut3d V->V Adjust colors using a 3D LUT.+ TS lutrgb V->V Compute and apply a lookup table to the RGB input video.+ TS lutyuv V->V Compute and apply a lookup table to the YUV input video.+ TS maskedclamp VVV->V Clamp first stream with second stream and third stream.+ TS maskedmax VVV->V Apply filtering with maximum difference of two streams.+ TS maskedmerge VVV->V Merge first stream with second stream using third stream as mask.+ TS maskedmin VVV->V Apply filtering with minimum difference of two streams.+ TS maskedthreshold VV->V Pick pixels comparing absolute difference of two streams with threshold.+ TS maskfun V->V Create Mask.+ .. mcdeint V->V Apply motion compensating deinterlacing.+ TS median V->V Apply Median filter.+ .. mergeplanes N->V Merge planes.+ .. mestimate V->V Generate motion vectors.+ T. metadata V->V Manipulate video frame metadata.+ T. midequalizer VV->V Apply Midway Equalization.+ .. minterpolate V->V Frame rate conversion using Motion Interpolation.+ TS mix N->V Mix video inputs.+ TS monochrome V->V Convert video to gray using custom color filter.+ TS morpho VV->V Apply Morphological filter.+ .. mpdecimate V->V Remove near-duplicate frames.+ TS msad VV->V Calculate the MSAD between two video streams.+ TS multiply VV->V Multiply first video stream with second video stream.+ TS negate V->V Negate input video.+ TS nlmeans V->V Non-local means denoiser.+ TS nnedi V->V Apply neural network edge directed interpolation intra-only deinterlacer.+ .. noformat V->V Force libavfilter not to use any of the specified pixel formats for the input to the next filter.+ TS noise V->V Add noise.+ T. normalize V->V Normalize RGB video.+ .. null V->V Pass the source unchanged to the output.+ T. oscilloscope V->V 2D Video Oscilloscope.+ TS overlay VV->V Overlay a video source on top of the input.+ T. owdenoise V->V Denoise using wavelets.+ .. pad V->V Pad the input video.+ .. palettegen V->V Find the optimal palette for a given stream.+ .. paletteuse VV->V Use a palette to downsample an input video stream.+ T. perms V->V Set permissions for the output video frame.+ TS perspective V->V Correct the perspective of video.+ T. phase V->V Phase shift fields.+ .. photosensitivity V->V Filter out photosensitive epilepsy seizure-inducing flashes.+ .. pixdesctest V->V Test pixel format definitions.+ TS pixelize V->V Pixelize video.+ T. pixscope V->V Pixel data analysis.+ T. pp7 V->V Apply Postprocessing 7 filter.+ TS premultiply N->V PreMultiply first stream with first plane of second stream.+ .S premultiply_dynamic V->V Premultiply or unpremultiply an image in-place, as needed.+ TS prewitt V->V Apply prewitt operator.+ TS pseudocolor V->V Make pseudocolored video frames.+ TS psnr VV->V Calculate the PSNR between two video streams.+ .. pullup V->V Pullup from field sequence to frames.+ T. qp V->V Change video quantization parameters.+ .. random V->V Return random frames.+ TS readeia608 V->V Read EIA-608 Closed Caption codes from input video and write them to frame metadata.+ .. readvitc V->V Read vertical interval timecode and write it to frame metadata.+ .. realtime V->V Slow down filtering to match realtime.+ .S remap VVV->V Remap pixels.+ TS removegrain V->V Remove grain.+ T. removelogo V->V Remove a TV logo based on a mask image.+ .. repeatfields V->V Hard repeat fields based on MPEG repeat field flag.+ .. reverse V->V Reverse a clip.+ TS rgbashift V->V Shift RGBA.+ TS roberts V->V Apply roberts cross operator.+ TS rotate V->V Rotate the input image.+ T. sab V->V Apply shape adaptive blur.+ .. scale V->V Scale the input video size and/or convert the image format.+ .. scale_vt V->V Scale Videotoolbox frames+ .. scale2ref VV->VV Scale the input video size and/or convert the image format to the given reference.+ .. scdet V->V Detect video scene change+ TS scharr V->V Apply scharr operator.+ TS scroll V->V Scroll input video.+ .. segment V->N Segment video stream.+ .. select V->N Select video frames to pass in output.+ TS selectivecolor V->V Apply CMYK adjustments to specific color ranges.+ .. sendcmd V->V Send commands to filters.+ .. separatefields V->V Split input video frames into fields.+ .. setdar V->V Set the frame display aspect ratio.+ .. setfield V->V Force field for the output video frame.+ .. setparams V->V Force field, or color property for the output video frame.+ .. setpts V->V Set PTS for the output video frame.+ .. setrange V->V Force color range for the output video frame.+ .. setsar V->V Set the pixel sample aspect ratio.+ .. settb V->V Set timebase for the video output link.+ TS shear V->V Shear transform the input image.+ .. showinfo V->V Show textual information for each video frame.+ .. showpalette V->V Display frame palette.+ T. shuffleframes V->V Shuffle video frames.+ TS shufflepixels V->V Shuffle video pixels.+ T. shuffleplanes V->V Shuffle video planes.+ T. sidedata V->V Manipulate video frame side data.+ .S signalstats V->V Generate statistics from video analysis.+ .. signature N->V Calculate the MPEG-7 video signature+ .. siti V->V Calculate spatial information (SI) and temporal information (TI).+ T. smartblur V->V Blur the input video without impacting the outlines.+ TS sobel V->V Apply sobel operator.+ .. split V->N Pass on the input to N video outputs.+ T. spp V->V Apply a simple post processing filter.+ TS ssim VV->V Calculate the SSIM between two video streams.+ .. ssim360 VV->V Calculate the SSIM between two 360 video streams.+ .S stereo3d V->V Convert video stereoscopic 3D view.+ .. streamselect N->N Select video streams+ .S super2xsai V->V Scale the input by 2x using the Super2xSaI pixel art algorithm.+ T. swaprect V->V Swap 2 rectangular objects in video.+ T. swapuv V->V Swap U and V components.+ TS tblend V->V Blend successive frames.+ .. telecine V->V Apply a telecine pattern.+ .. thistogram V->V Compute and draw a temporal histogram.+ TS threshold VVVV->V Threshold first video stream using other video streams.+ TS thumbnail V->V Select the most representative frame in a given sequence of consecutive frames.+ .. tile V->V Tile several successive frames together.+ .. tiltandshift V->V Generate a tilt-and-shift'd video.+ .. tinterlace V->V Perform temporal field interlacing.+ TS tlut2 V->V Compute and apply a lookup table from two successive frames.+ TS tmedian V->V Pick median pixels from successive frames.+ T. tmidequalizer V->V Apply Temporal Midway Equalization.+ TS tmix V->V Mix successive video frames.+ .S tonemap V->V Conversion to/from different dynamic ranges.+ .. tpad V->V Temporarily pad video frames.+ .S transpose V->V Transpose input video.+ .. transpose_vt V->V Transpose Videotoolbox frames+ .. trim V->V Pick one continuous section from the input, drop the rest.+ TS unpremultiply N->V UnPreMultiply first stream with first plane of second stream.+ TS unsharp V->V Sharpen or blur the input video.+ .. untile V->V Untile a frame into a sequence of frames.+ TS uspp V->V Apply Ultra Simple / Slow Post-processing filter.+ .S v360 V->V Convert 360 projection of video.+ T. vaguedenoiser V->V Apply a Wavelet based Denoiser.+ TS varblur VV->V Apply Variable Blur filter.+ .. vectorscope V->V Video vectorscope.+ T. vflip V->V Flip the input video vertically.+ .. vfrdet V->V Variable frame rate detect filter.+ TS vibrance V->V Boost or alter saturation.+ TS vif VV->V Calculate the VIF between two video streams.+ T. vignette V->V Make or reverse a vignette effect.+ .. vmafmotion V->V Calculate the VMAF Motion score.+ .S vstack N->V Stack video inputs vertically.+ TS w3fdif V->V Apply Martin Weston three field deinterlace.+ .S waveform V->V Video waveform monitor.+ .S weave V->V Weave input video fields into frames.+ .S xbr V->V Scale the input using xBR algorithm.+ TS xcorrelate VV->V Cross-correlate first video stream with second video stream.+ .S xfade VV->V Cross fade one video with another video.+ TS xmedian N->V Pick median pixels from several video inputs.+ T. xpsnr VV->V Calculate the extended perceptually weighted peak signal-to-noise ratio (XPSNR) between two video streams.+ .S xstack N->V Stack video inputs into custom layout.+ TS yadif V->V Deinterlace the input image.+ T. yadif_videotoolbox V->V YADIF for VideoToolbox frames using Metal compute+ TS yaepblur V->V Yet another edge preserving blur filter.+ .. zoompan V->V Apply Zoom & Pan effect.+ .. allrgb |->V Generate all RGB colors.+ .. allyuv |->V Generate all yuv colors.+ .. cellauto |->V Create pattern generated by an elementary cellular automaton.+ .. color |->V Provide an uniformly colored input.+ .. colorchart |->V Generate color checker chart.+ .. colorspectrum |->V Generate colors spectrum.+ .. coreimagesrc |->V Video source using image generators of CoreImage API.+ .S gradients |->V Draw a gradients.+ .. haldclutsrc |->V Provide an identity Hald CLUT.+ .. life |->V Create life.+ .. mandelbrot |->V Render a Mandelbrot fractal.+ .. mptestsrc |->V Generate various test pattern.+ .. nullsrc |->V Null video source, return unprocessed video frames.+ .. pal75bars |->V Generate PAL 75% color bars.+ .. pal100bars |->V Generate PAL 100% color bars.+ .. perlin |->V Generate Perlin noise+ .. rgbtestsrc |->V Generate RGB test pattern.+ .S sierpinski |->V Render a Sierpinski fractal.+ .. smptebars |->V Generate SMPTE color bars.+ .. smptehdbars |->V Generate SMPTE HD color bars.+ .. testsrc |->V Generate test pattern.+ .. testsrc2 |->V Generate another test pattern.+ .. yuvtestsrc |->V Generate YUV test pattern.+ .S zoneplate |->V Generate zone-plate.+ .. nullsink V->| Do absolutely nothing with the input video.+ .. a3dscope A->V Convert input audio to 3d scope video output.+ .. abitscope A->V Convert input audio to audio bit scope video output.+ .. adrawgraph A->V Draw a graph using input audio metadata.+ .. agraphmonitor A->V Show various filtergraph stats.+ .. ahistogram A->V Convert input audio to histogram video output.+ .. aphasemeter A->N Convert input audio to phase meter video output.+ .S avectorscope A->V Convert input audio to vectorscope video output.+ .. concat N->N Concatenate audio and video streams.+ .. showcqt A->V Convert input audio to a CQT (Constant/Clamped Q Transform) spectrum video output.+ .S showcwt A->V Convert input audio to a CWT (Continuous Wavelet Transform) spectrum video output.+ .. showfreqs A->V Convert input audio to a frequencies video output.+ .S showspatial A->V Convert input audio to a spatial video output.+ .S showspectrum A->V Convert input audio to a spectrum video output.+ .S showspectrumpic A->V Convert input audio to a spectrum video output single picture.+ .. showvolume A->V Convert input audio volume to video output.+ .. showwaves A->V Convert input audio to a video output.+ .. showwavespic A->V Convert input audio to a video output single picture.+ .. spectrumsynth VV->A Convert input spectrum videos to audio output.+ .. avsynctest |->AV Generate an Audio Video Sync Test.+ .. amovie |->N Read audio from a movie source.+ .. movie |->N Read from a movie source.+ .. abuffer |->A Buffer audio frames, and make them accessible to the filterchain.+ .. buffer |->V Buffer video frames, and make them accessible to the filterchain.+ .. abuffersink A->| Buffer audio frames, and make them available to the end of the filter graph.+ .. buffersink V->| Buffer video frames, and make them available to the end of the filter graph.diff --git a/tests/fixtures/ffmpeg_filters_9.0.1_windows.txt b/tests/fixtures/ffmpeg_filters_9.0.1_windows.txtnew file mode 100644index 0000000..c5e734b--- /dev/null+++ b/tests/fixtures/ffmpeg_filters_9.0.1_windows.txt@@ -0,0 +1,535 @@+Filters:+ T.. = Timeline support+ .S. = Slice threading+ A = Audio input/output+ V = Video input/output+ N = Dynamic number and/or type of input/output+ | = Source or sink filter+ ------+ TS aap AA->A Apply Affine Projection algorithm to first audio stream.+ .. abench A->A Benchmark part of a filtergraph.+ .. acompressor A->A Audio compressor.+ .. acontrast A->A Simple audio dynamic range compression/expansion filter.+ .. acopy A->A Copy the input audio unchanged to the output.+ .. acue A->A Delay filtering to match a cue.+ .. acrossfade N->A Cross fade two input audio streams.+ .S acrossover A->N Split audio into per-bands streams.+ T. acrusher A->A Reduce audio bit resolution.+ TS adeclick A->A Remove impulsive noise from input audio.+ TS adeclip A->A Remove clipping from input audio.+ TS adecorrelate A->A Apply decorrelation to input audio.+ T. adelay A->A Delay one or more audio channels.+ TS adenorm A->A Remedy denormals by adding extremely low-level noise.+ T. aderivative A->A Compute derivative of input audio.+ TS adrc A->A Audio Spectral Dynamic Range Controller.+ TS adynamicequalizer A->A Apply Dynamic Equalization of input audio.+ T. adynamicsmooth A->A Apply Dynamic Smoothing of input audio.+ .. aecho A->A Add echoing to the audio.+ TS aemphasis A->A Audio emphasis.+ T. aeval A->A Filter audio signal according to a specified expression.+ T. aexciter A->A Enhance high frequency part of audio.+ T. afade A->A Fade in/out input audio.+ TS afftdn A->A Denoise audio samples using FFT.+ TS afftfilt A->A Apply arbitrary expressions to samples in frequency domain.+ TS afir N->A Apply Finite Impulse Response filter with supplied coefficients in additional stream(s).+ .. aformat A->A Convert the input audio to one of the specified formats.+ TS afreqshift A->A Apply frequency shifting to input audio.+ TS afwtdn A->A Denoise audio stream using Wavelets.+ T. agate A->A Audio gate.+ .S aiir A->N Apply Infinite Impulse Response filter with supplied coefficients.+ T. aintegral A->A Compute integral of input audio.+ .. ainterleave N->A Temporally interleave audio inputs.+ T. alatency A->A Report audio filtering latency.+ T. alimiter A->A Audio lookahead limiter.+ TS allpass A->A Apply a two-pole all-pass filter.+ .. aloop A->A Loop audio samples.+ .. amerge N->A Merge two or more audio streams into a single multi-channel stream.+ T. ametadata A->A Manipulate audio frame metadata.+ .. amix N->A Audio mixing.+ .. amultiply AA->A Multiply two audio streams.+ TS anequalizer A->N Apply high-order audio parametric multi band equalizer.+ TS anlmdn A->A Reduce broadband noise from stream using Non-Local Means.+ TS anlmf AA->A Apply Normalized Least-Mean-Fourth algorithm to first audio stream.+ TS anlms AA->A Apply Normalized Least-Mean-Squares algorithm to first audio stream.+ .. anull A->A Pass the source unchanged to the output.+ T. apad A->A Pad audio with silence.+ T. aperms A->A Set permissions for the output audio frame.+ .. aphaser A->A Add a phasing effect to the audio.+ TS aphaseshift A->A Apply phase shifting to input audio.+ TS apsnr AA->A Measure Audio Peak Signal-to-Noise Ratio.+ TS apsyclip A->A Audio Psychoacoustic Clipper.+ .. apulsator A->A Audio pulsator.+ .. arealtime A->A Slow down filtering to match realtime.+ .. aresample A->A Resample audio data.+ .. areverse A->A Reverse an audio clip.+ TS arls AA->A Apply Recursive Least Squares algorithm to first audio stream.+ TS arnndn A->A Reduce noise from speech using Recurrent Neural Networks.+ TS asdr AA->A Measure Audio Signal-to-Distortion Ratio.+ .. asegment A->N Segment audio stream.+ .. aselect A->N Select audio frames to pass in output.+ .. asendcmd A->A Send commands to filters.+ T. asetnsamples A->A Set the number of samples for each output audio frames.+ .. asetpts A->A Set PTS for the output audio frame.+ .. asetrate A->A Change the sample rate without altering the data.+ .. asettb A->A Set timebase for the audio output link.+ .. ashowinfo A->A Show textual information for each audio frame.+ T. asidedata A->A Manipulate audio frame side data.+ TS asisdr AA->A Measure Audio Scale-Invariant Signal-to-Distortion Ratio.+ TS asoftclip A->A Audio Soft Clipper.+ .S aspectralstats A->A Show frequency domain statistics about audio frames.+ .. asplit A->N Pass on the audio input to N audio outputs.+ .S astats A->A Show time domain statistics about audio frames.+ .. astreamselect N->N Select audio streams+ TS asubboost A->A Boost subwoofer frequencies.+ TS asubcut A->A Cut subwoofer frequencies.+ TS asupercut A->A Cut super frequencies.+ TS asuperpass A->A Apply high order Butterworth band-pass filter.+ TS asuperstop A->A Apply high order Butterworth band-stop filter.+ .. atempo A->A Adjust audio tempo.+ TS atilt A->A Apply spectral tilt to audio.+ .. atrim A->A Pick one continuous section from the input, drop the rest.+ .. axcorrelate AA->A Cross-correlate two audio streams.+ .. azmq A->A Receive commands through ZMQ and broker them to filters.+ TS bandpass A->A Apply a two-pole Butterworth band-pass filter.+ TS bandreject A->A Apply a two-pole Butterworth band-reject filter.+ TS bass A->A Boost or cut lower frequencies.+ TS biquad A->A Apply a biquad IIR filter with the given coefficients.+ .. channelmap A->A Remap audio channels.+ .. channelsplit A->N Split audio into per-channel streams.+ .. chorus A->A Add a chorus effect to the audio.+ .. compand A->A Compress or expand audio dynamic range.+ T. compensationdelay A->A Audio Compensation Delay Line.+ T. crossfeed A->A Apply headphone crossfeed filter.+ TS crystalizer A->A Simple audio noise sharpening filter.+ T. dcshift A->A Apply a DC shift to the audio.+ T. deesser A->A Apply de-essing to the audio.+ T. dialoguenhance A->A Audio Dialogue Enhancement.+ .. drmeter A->A Measure audio dynamic range.+ TS dynaudnorm A->A Dynamic Audio Normalizer.+ .. earwax A->A Widen the stereo image.+ .. ebur128 A->N EBU R128 scanner.+ TS equalizer A->A Apply two-pole peaking equalization (EQ) filter.+ T. extrastereo A->A Increase difference between stereo audio channels.+ .. firequalizer A->A Finite Impulse Response Equalizer.+ .. flanger A->A Apply a flanging effect to the audio.+ .. haas A->A Apply Haas Stereo Enhancer.+ .. hdcd A->A Apply High Definition Compatible Digital (HDCD) decoding.+ .S headphone N->A Apply headphone binaural spatialization with HRTFs in additional streams.+ TS highpass A->A Apply a high-pass filter with 3dB point frequency.+ TS highshelf A->A Apply a high shelf filter.+ .. join N->A Join multiple audio streams into multi-channel output.+ .. loudnorm A->A EBU R128 loudness normalization+ TS lowpass A->A Apply a low-pass filter with 3dB point frequency.+ TS lowshelf A->A Apply a low shelf filter.+ .. mcompand A->A Multiband Compress or expand audio dynamic range.+ .. pan A->A Remix channels with coefficients (panning).+ .. replaygain A->A ReplayGain scanner.+ .. rubberband A->A Apply time-stretching and pitch-shifting.+ .. sidechaincompress AA->A Sidechain compressor.+ T. sidechaingate AA->A Audio sidechain gate.+ .. silencedetect A->A Detect silence.+ T. silenceremove A->A Remove silence.+ T. speechnorm A->A Speech Normalizer.+ T. stereotools A->A Apply various stereo tools.+ T. stereowiden A->A Apply stereo widening effect.+ .. superequalizer A->A Apply 18 band equalization filter.+ .S surround A->A Apply audio surround upmix filter.+ TS tiltshelf A->A Apply a tilt shelf filter.+ TS treble A->A Boost or cut upper frequencies.+ T. tremolo A->A Apply tremolo effect.+ T. vibrato A->A Apply vibrato effect.+ T. virtualbass A->A Audio Virtual Bass.+ T. volume A->A Change input volume.+ .. volumedetect A->A Detect audio volume.+ .. aevalsrc |->A Generate an audio signal generated by an expression.+ .. afdelaysrc |->A Generate a Fractional delay FIR coefficients.+ .. afireqsrc |->A Generate a FIR equalizer coefficients audio stream.+ .. afirsrc |->A Generate a FIR coefficients audio stream.+ .. anoisesrc |->A Generate a noise audio signal.+ .. anullsrc |->A Null audio source, return empty audio frames.+ .. hilbert |->A Generate a Hilbert transform FIR coefficients.+ .. sinc |->A Generate a sinc kaiser-windowed low-pass, high-pass, band-pass, or band-reject FIR coefficients.+ .. sine |->A Generate sine wave audio signal.+ .. anullsink A->| Do absolutely nothing with the input audio.+ .. addroi V->V Add region of interest to frame.+ .. alphaextract V->V Extract an alpha channel as a grayscale image component.+ T. alphamerge VV->V Copy the luma value of the second input into the alpha channel of the first input.+ TS amplify V->V Amplify changes between successive video frames.+ .. ass V->V Render ASS subtitles onto input video using the libass library.+ TS atadenoise V->V Apply an Adaptive Temporal Averaging Denoiser.+ T. avgblur V->V Apply Average Blur filter.+ TS backgroundkey V->V Turns a static background into transparency.+ T. bbox V->V Compute bounding box for each frame.+ .. bench V->V Benchmark part of a filtergraph.+ TS bilateral V->V Apply Bilateral filter.+ .. bilateral_cuda V->V GPU accelerated bilateral filter+ T. bitplanenoise V->V Measure bit plane noise.+ .S blackdetect V->V Detect video intervals that are (almost) black.+ .S blackframe V->V Detect frames that are (almost) black.+ TS blend VV->V Blend two video frames into each other.+ .. blockdetect V->V Blockdetect filter.+ .. blurdetect V->V Blurdetect filter.+ TS bm3d N->V Block-Matching 3D denoiser.+ T. boxblur V->V Blur the input.+ TS bwdif V->V Deinterlace the input image.+ T. bwdif_cuda V->V Deinterlace CUDA frames+ TS cas V->V Contrast Adaptive Sharpen.+ .. ccrepack V->V Repack CEA-708 closed caption metadata+ TS chromahold V->V Turns a certain color range into gray.+ TS chromakey V->V Turns a certain color into transparency. Operates on YUV colors.+ .. chromakey_cuda V->V GPU accelerated chromakey filter+ TS chromanr V->V Reduce chrominance noise.+ TS chromashift V->V Shift chroma.+ .. ciescope V->V Video CIE scope.+ T. codecview V->V Visualize information about some codecs.+ TS colorbalance V->V Adjust the color balance.+ TS colorchannelmixer V->V Adjust colors by mixing color channels.+ TS colorcontrast V->V Adjust color contrast between RGB components.+ TS colorcorrect V->V Adjust color white balance selectively for blacks and whites.+ .S colordetect V->V Detect video color properties.+ TS colorize V->V Overlay a solid color on the video stream.+ TS colorkey V->V Turns a certain color into transparency. Operates on RGB colors.+ TS colorhold V->V Turns a certain color range into gray. Operates on RGB colors.+ TS colorlevels V->V Adjust the color levels.+ TS colormap VVV->V Apply custom Color Maps to video stream.+ TS colormatrix V->V Convert color matrix.+ TS colorspace V->V Convert between colorspaces.+ .. colorspace_cuda V->V CUDA accelerated video color converter+ TS colortemperature V->V Adjust color temperature of video.+ TS convolution V->V Apply convolution filter.+ TS convolve VV->V Convolve first video stream with second video stream.+ .. copy V->V Copy the input video unchanged to the output.+ TS corr VV->V Calculate the correlation between two video streams.+ .. cover_rect V->V Find and cover a user specified object.+ .. crop V->V Crop the input video.+ T. cropdetect V->V Auto-detect crop size.+ .. cue V->V Delay filtering to match a cue.+ TS curves V->V Adjust components curves.+ .S datascope V->V Video data analysis.+ T. dblur V->V Apply Directional Blur filter.+ TS dctdnoiz V->V Denoise frames using 2D DCT.+ TS deband V->V Debands video.+ T. deblock V->V Deblock video.+ .. decimate N->V Decimate frames (post field matching filter).+ TS deconvolve VV->V Deconvolve first video stream with second video stream.+ TS dedot V->V Reduce cross-luminance and cross-color.+ TS deflate V->V Apply deflate effect.+ .. deflicker V->V Remove temporal frame luminance variations.+ .. deinterlace_qsv V->V Quick Sync Video "deinterlacing"+ .. deinterlace_d3d12 V->V Deinterlacing using Direct3D12 Video Processor+ .. deinterlace_vaapi V->V Deinterlacing of VAAPI surfaces+ .. dejudder V->V Remove judder produced by pullup.+ T. delogo V->V Remove logo from input video.+ .. denoise_vaapi V->V VAAPI VPP for de-noise+ .. deshake V->V Stabilize shaky video.+ TS despill V->V Despill video.+ .. detelecine V->V Apply an inverse telecine pattern.+ TS dilation V->V Apply dilation effect.+ TS displace VVV->V Displace pixels.+ .S doubleweave V->V Weave input video fields into double number of frames.+ T. drawbox V->V Draw a colored box on the input video.+ .. drawgraph V->V Draw a graph using input video metadata.+ T. drawgrid V->V Draw a colored grid on the input video.+ T. drawtext V->V Draw text on top of video frames using libfreetype library.+ T. drawvg V->V Draw vector graphics on top of video frames.+ T. edgedetect V->V Detect and draw edge.+ .. elbg V->V Apply posterize effect, using the ELBG algorithm.+ T. entropy V->V Measure video frames entropy.+ .S epx V->V Scale the input using EPX algorithm.+ T. eq V->V Adjust brightness, contrast, gamma, and saturation.+ TS erosion V->V Apply erosion effect.+ TS estdif V->V Apply Edge Slope Tracing deinterlace.+ TS exposure V->V Adjust exposure of the video stream.+ .. extractplanes V->N Extract planes as grayscale frames.+ TS fade V->V Fade in/out input video.+ T. feedback VV->VV Apply feedback video filter.+ TS fftdnoiz V->V Denoise frames using 3D FFT.+ TS fftfilt V->V Apply arbitrary expressions to pixels in frequency domain.+ .. field V->V Extract a field from the input video.+ .. fieldhint V->V Field matching using hints.+ .. fieldmatch N->V Field matching for inverse telecine.+ T. fieldorder V->V Set the field order.+ T. fillborders V->V Fill borders of the input video.+ .. find_rect V->V Find a user specified object.+ T. floodfill V->V Fill area with same color with another color.+ .. format V->V Convert the input video to one of the specified pixel formats.+ .. fps V->V Force constant framerate.+ .. framepack VV->V Generate a frame packed stereoscopic video.+ .S framerate V->V Upsamples or downsamples progressive source between specified frame rates.+ T. framestep V->V Select one frame every N frames.+ .. freezedetect V->V Detects frozen video input.+ .. freezeframes VV->V Freeze video frames.+ T. fspp V->V Apply Fast Simple Post-processing filter.+ .. fsync V->V Synchronize video frames from external source.+ TS gblur V->V Apply Gaussian Blur filter.+ TS geq V->V Apply generic equation to each pixel.+ T. gradfun V->V Debands video quickly using gradients.+ .. graphmonitor V->V Show various filtergraph stats.+ TS grayworld V->V Adjust white balance using LAB gray world algorithm+ TS greyedge V->V Estimates scene illumination by grey edge assumption.+ TS guided N->V Apply Guided filter.+ TS haldclut VV->V Adjust colors using a Hald CLUT.+ TS hflip V->V Horizontally flip the input video.+ T. histeq V->V Apply global color histogram equalization.+ .. histogram V->V Compute and draw a histogram.+ TS hqdn3d V->V Apply a High Quality 3D Denoiser.+ .S hqx V->V Scale the input by 2, 3 or 4 using the hq*x magnification algorithm.+ .S hstack N->V Stack video inputs horizontally.+ TS hsvhold V->V Turns a certain HSV range into gray.+ TS hsvkey V->V Turns a certain HSV range into transparency. Operates on YUV colors.+ T. hue V->V Adjust the hue and saturation of the input video.+ TS huesaturation V->V Apply hue-saturation-intensity adjustments.+ .. hwdownload V->V Download a hardware frame to a normal frame+ .. hwmap V->V Map hardware frames+ .. hwupload V->V Upload a normal frame to a hardware frame+ .. hwupload_cuda V->V Upload a system memory frame to a CUDA device.+ T. hysteresis VV->V Grow first stream into second stream by connecting components.+ TS identity VV->V Calculate the Identity between two video streams.+ .. idet V->V Interlace detect Filter.+ T. il V->V Deinterleave or interleave fields.+ TS inflate V->V Apply inflate effect.+ .. interlace V->V Convert progressive video into interlaced.+ .. interleave N->V Temporally interleave video inputs.+ .. kerndeint V->V Apply kernel deinterlacing to the input.+ TS kirsch V->V Apply kirsch operator.+ TS lagfun V->V Slowly update darker pixels.+ T. latency V->V Report video filtering latency.+ TS lenscorrection V->V Rectify the image by correcting for lens distortion.+ .. libvmaf VV->V Calculate the VMAF between two video streams.+ TS limitdiff N->V Apply filtering with limiting difference.+ TS limiter V->V Limit pixels components to the specified range.+ .. loop V->V Loop video frames.+ TS lumakey V->V Turns a certain luma into transparency.+ TS lut V->V Compute and apply a lookup table to the RGB/YUV input video.+ TS lut1d V->V Adjust colors using a 1D LUT.+ TS lut2 VV->V Compute and apply a lookup table from two video inputs.+ TS lut3d V->V Adjust colors using a 3D LUT.+ TS lutrgb V->V Compute and apply a lookup table to the RGB input video.+ TS lutyuv V->V Compute and apply a lookup table to the YUV input video.+ TS maskedclamp VVV->V Clamp first stream with second stream and third stream.+ TS maskedmax VVV->V Apply filtering with maximum difference of two streams.+ TS maskedmerge VVV->V Merge first stream with second stream using third stream as mask.+ TS maskedmin VVV->V Apply filtering with minimum difference of two streams.+ TS maskedthreshold VV->V Pick pixels comparing absolute difference of two streams with threshold.+ TS maskfun V->V Create Mask.+ .. mcdeint V->V Apply motion compensating deinterlacing.+ TS median V->V Apply Median filter.+ .. mergeplanes N->V Merge planes.+ .. mestimate V->V Generate motion vectors.+ .. mestimate_d3d12 V->V Generate motion vectors using D3D12 hardware acceleration.+ T. metadata V->V Manipulate video frame metadata.+ T. midequalizer VV->V Apply Midway Equalization.+ .. minterpolate V->V Frame rate conversion using Motion Interpolation.+ TS mix N->V Mix video inputs.+ TS monochrome V->V Convert video to gray using custom color filter.+ TS morpho VV->V Apply Morphological filter.+ .. mpdecimate V->V Remove near-duplicate frames.+ TS msad VV->V Calculate the MSAD between two video streams.+ TS multiply VV->V Multiply first video stream with second video stream.+ TS negate V->V Negate input video.+ TS nlmeans V->V Non-local means denoiser.+ TS nnedi V->V Apply neural network edge directed interpolation intra-only deinterlacer.+ .. noformat V->V Force libavfilter not to use any of the specified pixel formats for the input to the next filter.+ TS noise V->V Add noise.+ T. normalize V->V Normalize RGB video.+ .. null V->V Pass the source unchanged to the output.+ T. oscilloscope V->V 2D Video Oscilloscope.+ TS overlay VV->V Overlay a video source on top of the input.+ .. overlay_qsv VV->V Quick Sync Video overlay.+ .. overlay_vaapi VV->V Overlay one video on top of another+ T. overlay_cuda VV->V Overlay one video on top of another using CUDA+ T. owdenoise V->V Denoise using wavelets.+ .. pad V->V Pad the input video.+ .. pad_cuda V->V CUDA-based GPU padding filter+ .. palettegen V->V Find the optimal palette for a given stream.+ .. paletteuse VV->V Use a palette to downsample an input video stream.+ T. perms V->V Set permissions for the output video frame.+ TS perspective V->V Correct the perspective of video.+ T. phase V->V Phase shift fields.+ .. photosensitivity V->V Filter out photosensitive epilepsy seizure-inducing flashes.+ .. pixdesctest V->V Test pixel format definitions.+ TS pixelize V->V Pixelize video.+ T. pixscope V->V Pixel data analysis.+ T. pp7 V->V Apply Postprocessing 7 filter.+ TS premultiply N->V PreMultiply first stream with first plane of second stream.+ .S premultiply_dynamic V->V Premultiply or unpremultiply an image in-place, as needed.+ TS prewitt V->V Apply prewitt operator.+ .. procamp_vaapi V->V ProcAmp (color balance) adjustments for hue, saturation, brightness, contrast+ TS pseudocolor V->V Make pseudocolored video frames.+ TS psnr VV->V Calculate the PSNR between two video streams.+ .. pullup V->V Pullup from field sequence to frames.+ T. qp V->V Change video quantization parameters.+ .. random V->V Return random frames.+ TS readeia608 V->V Read EIA-608 Closed Caption codes from input video and write them to frame metadata.+ .. readvitc V->V Read vertical interval timecode and write it to frame metadata.+ .. realtime V->V Slow down filtering to match realtime.+ .S remap VVV->V Remap pixels.+ TS removegrain V->V Remove grain.+ T. removelogo V->V Remove a TV logo based on a mask image.+ .. repeatfields V->V Hard repeat fields based on MPEG repeat field flag.+ .. reverse V->V Reverse a clip.+ TS rgbashift V->V Shift RGBA.+ TS roberts V->V Apply roberts cross operator.+ TS rotate V->V Rotate the input image.+ T. sab V->V Apply shape adaptive blur.+ .. scale V->V Scale the input video size and/or convert the image format.+ .. vpp_amf V->V AMF video scaling and format conversion+ .. sr_amf V->V AMF HQ video upscaling+ .. frc_amf V->V AMF video Frame Rate Converter+ .. scale_cuda V->V GPU accelerated video resizer+ .. scale_d3d11 V->V Scale video using Direct3D11+ .. scale_d3d12 V->V Scale video using Direct3D12+ .. scale_qsv V->V Quick Sync Video "scaling and format conversion"+ .. scale_vaapi V->V Scale to/from VAAPI surfaces.+ .. scale2ref VV->VV Scale the input video size and/or convert the image format to the given reference.+ .. scdet V->V Detect video scene change+ TS scharr V->V Apply scharr operator.+ TS scroll V->V Scroll input video.+ .. segment V->N Segment video stream.+ .. select V->N Select video frames to pass in output.+ TS selectivecolor V->V Apply CMYK adjustments to specific color ranges.+ .. sendcmd V->V Send commands to filters.+ .. separatefields V->V Split input video frames into fields.+ .. setdar V->V Set the frame display aspect ratio.+ .. setfield V->V Force field for the output video frame.+ .. setparams V->V Force field, or color property for the output video frame.+ .. setpts V->V Set PTS for the output video frame.+ .. setrange V->V Force color range for the output video frame.+ .. setsar V->V Set the pixel sample aspect ratio.+ .. settb V->V Set timebase for the video output link.+ .. sharpness_vaapi V->V VAAPI VPP for sharpness+ TS shear V->V Shear transform the input image.+ .. showinfo V->V Show textual information for each video frame.+ .. showpalette V->V Display frame palette.+ T. shuffleframes V->V Shuffle video frames.+ TS shufflepixels V->V Shuffle video pixels.+ T. shuffleplanes V->V Shuffle video planes.+ T. sidedata V->V Manipulate video frame side data.+ .S signalstats V->V Generate statistics from video analysis.+ .. signature N->V Calculate the MPEG-7 video signature+ .. siti V->V Calculate spatial information (SI) and temporal information (TI).+ T. smartblur V->V Blur the input video without impacting the outlines.+ TS sobel V->V Apply sobel operator.+ .. split V->N Pass on the input to N video outputs.+ T. spp V->V Apply a simple post processing filter.+ TS ssim VV->V Calculate the SSIM between two video streams.+ .. ssim360 VV->V Calculate the SSIM between two 360 video streams.+ .S stereo3d V->V Convert video stereoscopic 3D view.+ .. streamselect N->N Select video streams+ .. subtitles V->V Render text subtitles onto input video using the libass library.+ .S super2xsai V->V Scale the input by 2x using the Super2xSaI pixel art algorithm.+ T. swaprect V->V Swap 2 rectangular objects in video.+ T. swapuv V->V Swap U and V components.+ TS tblend V->V Blend successive frames.+ .. telecine V->V Apply a telecine pattern.+ .. thistogram V->V Compute and draw a temporal histogram.+ TS threshold VVVV->V Threshold first video stream using other video streams.+ TS thumbnail V->V Select the most representative frame in a given sequence of consecutive frames.+ .. thumbnail_cuda V->V Select the most representative frame in a given sequence of consecutive frames using CUDA.+ .. tile V->V Tile several successive frames together.+ .. tiltandshift V->V Generate a tilt-and-shift'd video.+ .. tinterlace V->V Perform temporal field interlacing.+ TS tlut2 V->V Compute and apply a lookup table from two successive frames.+ TS tmedian V->V Pick median pixels from successive frames.+ T. tmidequalizer V->V Apply Temporal Midway Equalization.+ TS tmix V->V Mix successive video frames.+ .S tonemap V->V Conversion to/from different dynamic ranges.+ .. tonemap_vaapi V->V VAAPI VPP for tone-mapping+ .. tpad V->V Temporarily pad video frames.+ .S transpose V->V Transpose input video.+ .. transpose_cuda V->V Transpose input video using CUDA+ .. transpose_vaapi V->V VAAPI VPP for transpose+ .. trim V->V Pick one continuous section from the input, drop the rest.+ TS unpremultiply N->V UnPreMultiply first stream with first plane of second stream.+ TS unsharp V->V Sharpen or blur the input video.+ .. untile V->V Untile a frame into a sequence of frames.+ TS uspp V->V Apply Ultra Simple / Slow Post-processing filter.+ .S v360 V->V Convert 360 projection of video.+ T. vaguedenoiser V->V Apply a Wavelet based Denoiser.+ TS varblur VV->V Apply Variable Blur filter.+ .. vectorscope V->V Video vectorscope.+ T. vflip V->V Flip the input video vertically.+ .. vfrdet V->V Variable frame rate detect filter.+ TS vibrance V->V Boost or alter saturation.+ .. vidstabdetect V->V Extract relative transformations, pass 1 of 2 for stabilization (see vidstabtransform for pass 2).+ .. vidstabtransform V->V Transform the frames, pass 2 of 2 for stabilization (see vidstabdetect for pass 1).+ TS vif VV->V Calculate the VIF between two video streams.+ T. vignette V->V Make or reverse a vignette effect.+ .. vmafmotion V->V Calculate the VMAF Motion score.+ .. vpp_qsv V->V Quick Sync Video "VPP"+ .S vstack N->V Stack video inputs vertically.+ TS w3fdif V->V Apply Martin Weston three field deinterlace.+ .S waveform V->V Video waveform monitor.+ .S weave V->V Weave input video fields into frames.+ .S xbr V->V Scale the input using xBR algorithm.+ TS xcorrelate VV->V Cross-correlate first video stream with second video stream.+ .S xfade VV->V Cross fade one video with another video.+ TS xmedian N->V Pick median pixels from several video inputs.+ T. xpsnr VV->V Calculate the extended perceptually weighted peak signal-to-noise ratio (XPSNR) between two video streams.+ .S xstack N->V Stack video inputs into custom layout.+ TS yadif V->V Deinterlace the input image.+ T. yadif_cuda V->V Deinterlace CUDA frames+ TS yaepblur V->V Yet another edge preserving blur filter.+ .. zmq V->V Receive commands through ZMQ and broker them to filters.+ .. zoompan V->V Apply Zoom & Pan effect.+ .S zscale V->V Apply resizing, colorspace and bit depth conversion.+ .. hstack_vaapi N->V "VA-API" hstack+ .. vstack_vaapi N->V "VA-API" vstack+ .. xstack_vaapi N->V "VA-API" xstack+ .. hstack_qsv N->V "Quick Sync Video" hstack+ .. vstack_qsv N->V "Quick Sync Video" vstack+ .. xstack_qsv N->V "Quick Sync Video" xstack+ .. pad_vaapi V->V Pad the input video.+ .. drawbox_vaapi V->V Draw a colored box on the input video.+ .. allrgb |->V Generate all RGB colors.+ .. allyuv |->V Generate all yuv colors.+ .. vsrc_amf |->V AMD AMF screen capture+ .. cellauto |->V Create pattern generated by an elementary cellular automaton.+ .. color |->V Provide an uniformly colored input.+ .. colorchart |->V Generate color checker chart.+ .. colorspectrum |->V Generate colors spectrum.+ .. ddagrab |->V Grab Windows Desktop images using Desktop Duplication API+ .. gfxcapture |->V Capture graphics/screen content as a video source+ .S gradients |->V Draw a gradients.+ .. haldclutsrc |->V Provide an identity Hald CLUT.+ .. life |->V Create life.+ .. mandelbrot |->V Render a Mandelbrot fractal.+ .. mptestsrc |->V Generate various test pattern.+ .. nullsrc |->V Null video source, return unprocessed video frames.+ .. pal75bars |->V Generate PAL 75% color bars.+ .. pal100bars |->V Generate PAL 100% color bars.+ .. perlin |->V Generate Perlin noise+ .. rgbtestsrc |->V Generate RGB test pattern.+ .S sierpinski |->V Render a Sierpinski fractal.+ .. smptebars |->V Generate SMPTE color bars.+ .. smptehdbars |->V Generate SMPTE HD color bars.+ .. testsrc |->V Generate test pattern.+ .. testsrc2 |->V Generate another test pattern.+ .. yuvtestsrc |->V Generate YUV test pattern.+ .S zoneplate |->V Generate zone-plate.+ .. nullsink V->| Do absolutely nothing with the input video.+ .. a3dscope A->V Convert input audio to 3d scope video output.+ .. abitscope A->V Convert input audio to audio bit scope video output.+ .. adrawgraph A->V Draw a graph using input audio metadata.+ .. agraphmonitor A->V Show various filtergraph stats.+ .. ahistogram A->V Convert input audio to histogram video output.+ .. aphasemeter A->N Convert input audio to phase meter video output.+ .S avectorscope A->V Convert input audio to vectorscope video output.+ .. concat N->N Concatenate audio and video streams.+ .. showcqt A->V Convert input audio to a CQT (Constant/Clamped Q Transform) spectrum video output.+ .S showcwt A->V Convert input audio to a CWT (Continuous Wavelet Transform) spectrum video output.+ .. showfreqs A->V Convert input audio to a frequencies video output.+ .S showspatial A->V Convert input audio to a spatial video output.+ .S showspectrum A->V Convert input audio to a spectrum video output.+ .S showspectrumpic A->V Convert input audio to a spectrum video output single picture.+ .. showvolume A->V Convert input audio volume to video output.+ .. showwaves A->V Convert input audio to a video output.+ .. showwavespic A->V Convert input audio to a video output single picture.+ .. spectrumsynth VV->A Convert input spectrum videos to audio output.+ .. avsynctest |->AV Generate an Audio Video Sync Test.+ .. amovie |->N Read audio from a movie source.+ .. movie |->N Read from a movie source.+ .. abuffer |->A Buffer audio frames, and make them accessible to the filterchain.+ .. buffer |->V Buffer video frames, and make them accessible to the filterchain.+ .. abuffersink A->| Buffer audio frames, and make them available to the end of the filter graph.+ .. buffersink V->| Buffer video frames, and make them available to the end of the filter graph.diff --git a/tests/fixtures/ffmpeg_filters_garbage.txt b/tests/fixtures/ffmpeg_filters_garbage.txtnew file mode 100644index 0000000..66ef639--- /dev/null+++ b/tests/fixtures/ffmpeg_filters_garbage.txt@@ -0,0 +1,4 @@+ffmpeg: unrecognized option '-filters'+Some random text++without any tablediff --git a/tests/test_all.py b/tests/test_all.pyindex 14eaedd..f6d60a2 100644--- a/tests/test_all.py+++ b/tests/test_all.py@@ -871,6 +871,174 @@ class FFmpegSkillTests(unittest.TestCase):self.assertEqual((ctx.dry_run, ctx.fast, ctx.commands), (False, False, []))# ---------------------------------------------------------------- help++ # ------------------------------------------------------------------ audio: extraction, concat, precision, dynamics+ @staticmethod+ def _samples(path):+ """(codec, sample_rate, duration_ts) of the first audio stream as ffprobe sees it."""+ out = subprocess.run(["ffprobe", "-v", "error", "-select_streams", "a:0", "-show_entries", "stream=codec_name,sample_rate,duration_ts",+ "-of", "csv=p=0", str(path)], stdout=subprocess.PIPE, text=True, check=True).stdout.strip().split(",")+ return out[0], int(out[1]), int(out[2])++ @staticmethod+ def _peak_rms(path):+ proc = subprocess.run(["ffmpeg", "-hide_banner", "-i", str(path), "-af", "astats=measure_overall=Peak_level+RMS_level:measure_perchannel=none",+ "-f", "null", "-"], stderr=subprocess.PIPE, text=True)+ vals = dict(re.findall(r"(Peak level|RMS level) dB: (-?[\d.]+)", proc.stderr))+ return float(vals["Peak level"]), float(vals["RMS level"])++ def test_audio_extraction_from_video_container(self):+ """mp4 -> wav / m4a through audio.py and cut.py: no video stream, codec from the extension, stream selection."""+ wav = OUT / "ex_audio.wav"+ data = json.loads(script("audio.py", self.src, "-o", wav, "--json").stdout)+ self.assertIsNone(data["probe"]["video"])+ self.assertEqual(data["probe"]["audio"]["codec"], "pcm_s16le")+ self.assertFalse(data["video"])+ m4a = OUT / "ex_voice.m4a"+ data = json.loads(script("audio.py", self.src, "--voice", "-o", m4a, "--json").stdout)+ self.assertIsNone(data["probe"]["video"])+ self.assertEqual(data["probe"]["audio"]["codec"], "aac")+ # a video output keeps the stream-copied picture as before+ mp4 = OUT / "ex_keep.mp4"+ data = json.loads(script("audio.py", self.src, "--denoise", "-o", mp4, "--json").stdout)+ self.assertIsNotNone(data["probe"]["video"])+ self.assertTrue(data["video"])+ # two audio streams: --audio-stream 1 picks the 880 Hz / 44.1 kHz track, an index past the end fails as input+ two = OUT / "two_streams.mkv"+ sh("ffmpeg", "-y", "-hide_banner", "-loglevel", "error", "-f", "lavfi", "-i", "testsrc2=size=320x180:rate=30",+ "-f", "lavfi", "-i", "sine=frequency=440:sample_rate=48000", "-f", "lavfi", "-i", "sine=frequency=880:sample_rate=44100",+ "-t", "4", "-map", "0:v", "-map", "1:a", "-map", "2:a", "-c:v", "libx264", "-preset", "ultrafast", "-pix_fmt", "yuv420p", "-c:a", "aac", two)+ self.assertEqual(len(probe(str(two))["audio_streams"]), 2)+ self.assertEqual(probe(str(two))["audio_streams"][1]["sample_rate"], 44100)+ s1 = OUT / "two_s1.wav"+ data = json.loads(script("audio.py", two, "--audio-stream", "1", "-o", s1, "--json").stdout)+ self.assertEqual(data["audio_stream"], 1)+ self.assertEqual(self._samples(s1)[1], 44100)+ proc = script("audio.py", two, "--audio-stream", "2", "-o", OUT / "nope.wav", "--json", expect_fail=True)+ self.assertEqual(json.loads(proc.stdout)["error"]["kind"], "input")+ self.assertIn("2 audio stream", proc.stderr)+ # cut.py with an audio extension extracts too, and never copies AAC packets into a WAV+ cw = OUT / "ex_cut.wav"+ data = json.loads(script("cut.py", self.src, "--start", "1", "--end", "3", "-o", cw, "--json").stdout)+ self.assertIsNone(data["probe"]["video"])+ self.assertEqual(self._samples(cw)[0], "pcm_s16le")+ self.assertEqual(data["precision"], "sample")++ def test_join_audio_only_inputs(self):+ """WAV + M4A + MP3 of different rates and channel counts join as audio; video containers and mixed inputs are refused."""+ st = OUT / "j_stereo44.m4a"+ sh("ffmpeg", "-y", "-hide_banner", "-loglevel", "error", "-f", "lavfi", "-i", "sine=frequency=1000:sample_rate=44100", "-t", "3", "-ac", "2", "-c:a", "aac", st)+ mp3 = OUT / "j_mono.mp3"+ sh("ffmpeg", "-y", "-hide_banner", "-loglevel", "error", "-f", "lavfi", "-i", "sine=frequency=500:sample_rate=48000", "-t", "3", "-c:a", "libmp3lame", mp3)+ mic_dur = probe(str(self.mic))["duration"]+ # crossfade -> flac: rate of the first clip, widest layout+ out = OUT / "j_audio.flac"+ data = json.loads(script("join.py", self.mic, st, mp3, "-o", out, "--json").stdout)+ self.assertEqual(data["mode"], "audio")+ self.assertEqual((data["sample_rate"], data["channels"]), (48000, 2))+ self.assertIsNone(data["probe"]["video"])+ self.assertEqual(data["probe"]["audio"]["codec"], "flac")+ self.assertClose(data["probe"]["duration"], mic_dur + 3 + 3 - 2 * 0.5, 0.15)+ # butt join -> wav, explicit rate and channels+ out2 = OUT / "j_audio.wav"+ data = json.loads(script("join.py", st, mp3, "--transition", "none", "--sample-rate", "44100", "--channels", "1", "-o", out2, "--json").stdout)+ self.assertEqual(self._samples(out2)[:2], ("pcm_s16le", 44100))+ self.assertEqual(data["probe"]["audio"]["channels"], 1)+ self.assertClose(data["probe"]["duration"], 6.0, 0.1)+ # refusals are input errors, before ffmpeg runs+ proc = script("join.py", self.mic, mp3, "-o", OUT / "j_audio.mp4", "--json", expect_fail=True)+ self.assertIn("audio extension", json.loads(proc.stdout)["error"]["message"])+ self.assertNotIn("ffmpeg ", proc.stderr.replace("/usr/bin/", ""), "refused before ffmpeg ran")+ proc = script("join.py", self.src, self.mic, "-o", OUT / "j_mixed.mp4", "--json", expect_fail=True)+ self.assertIn("has no video stream", proc.stderr)+ self.assertEqual(json.loads(proc.stdout)["error"]["kind"], "input")+ # dry-run plans the audio join and writes nothing+ planned = OUT / "j_dry.wav"+ data = json.loads(script("join.py", self.mic, mp3, "-o", planned, "--dry-run", "--json").stdout)+ self.assertTrue(data["dry_run"])+ self.assertIn("acrossfade", data["commands"][0])+ self.assertFalse(planned.exists())++ def test_cut_audio_precision_is_measured(self):+ """Stream copy is packet-accurate, --accurate is sample-exact on PCM/FLAC, lossy outputs say codec_frame."""+ start, end = 1.2345, 2.3456+ want = round((end - start) * 48000) # 53333 samples+ # WAV copy: packet boundary, reported as such, within a few ms+ cw = OUT / "prec_copy.wav"+ data = json.loads(script("cut.py", self.mic, "--start", str(start), "--end", str(end), "-o", cw, "--json").stdout)+ self.assertEqual(data["precision"], "packet")+ self.assertFalse(data["reencoded"])+ self.assertLess(abs(data["duration_error_ms"]), 50)+ self.assertEqual(self._samples(cw)[0], "pcm_s16le")+ # WAV --accurate: exactly the requested number of samples+ ca = OUT / "prec_acc.wav"+ data = json.loads(script("cut.py", self.mic, "--start", str(start), "--end", str(end), "--accurate", "-o", ca, "--json").stdout)+ self.assertEqual(data["precision"], "sample")+ self.assertEqual(self._samples(ca), ("pcm_s16le", 48000, want))+ self.assertLess(abs(data["duration_error_ms"]), 0.05)+ # 44.1 kHz FLAC, --accurate: exact at its own rate+ flac = OUT / "prec_44.flac"+ sh("ffmpeg", "-y", "-hide_banner", "-loglevel", "error", "-f", "lavfi", "-i", "sine=frequency=1000:sample_rate=44100", "-t", "3", "-c:a", "flac", flac)+ fa = OUT / "prec_44_cut.flac"+ data = json.loads(script("cut.py", flac, "--start", "0.5", "--end", "1.7", "--accurate", "-o", fa, "--json").stdout)+ self.assertEqual(data["precision"], "sample")+ self.assertEqual(self._samples(fa), ("flac", 44100, round(1.2 * 44100)))+ # compressed source (AAC in mp4) decoded to PCM with --accurate: exact; to AAC: codec_frame, not "sample"+ ma = OUT / "prec_from_aac.wav"+ data = json.loads(script("cut.py", self.src, "--start", str(start), "--end", str(end), "--accurate", "-o", ma, "--json").stdout)+ self.assertEqual(data["precision"], "sample")+ self.assertEqual(self._samples(ma)[2], want)+ m4a = OUT / "prec_to_aac.m4a"+ data = json.loads(script("cut.py", self.src, "--start", str(start), "--end", str(end), "--accurate", "-o", m4a, "--json").stdout)+ self.assertEqual(data["precision"], "codec_frame")+ self.assertEqual(self._samples(m4a)[0], "aac")+ # video re-encode keeps reporting frame precision; a plain copy keeps packet+ mp4 = OUT / "prec_video.mp4"+ data = json.loads(script("cut.py", self.src, "--start", "1", "--end", "3", "--accurate", "--preset", "ultrafast", "-o", mp4, "--json").stdout)+ self.assertEqual(data["precision"], "frame")+ self.assertIsNotNone(data["probe"]["video"])++ def test_audio_typed_dynamics(self):+ """--gate / --compress / --limit map typed flags onto acompressor, alimiter, agate; ranges are enforced; the ceiling holds."""+ out = OUT / "dyn.wav"+ data = json.loads(script("audio.py", self.mic, "--gate", "--gate-threshold", "-50", "--compress", "--comp-threshold", "-20",+ "--comp-ratio", "4", "--comp-attack", "5", "--comp-release", "80", "--comp-makeup", "6",+ "--limit", "--limit-ceiling", "-3", "-o", out, "--json").stdout)+ self.assertEqual(data["dynamics"], ["agate", "acompressor", "alimiter"])+ cmd = data["commands"][0]+ self.assertIn("agate=threshold=0.00316228", cmd)+ self.assertIn("acompressor=threshold=0.1:ratio=4:attack=5:release=80:makeup=1.99526", cmd)+ self.assertIn("alimiter=limit=0.707946:level=disabled", cmd)+ peak, rms = self._peak_rms(out)+ self.assertLessEqual(peak, -3.0 + 0.1, "limiter ceiling")+ # the compressor alone on a full-scale sine: threshold -20 dB, ratio 4 settle far below 0 dB and above the threshold+ sine = OUT / "dyn_sine.wav"+ sh("ffmpeg", "-y", "-hide_banner", "-loglevel", "error", "-f", "lavfi", "-i", "sine=frequency=440:sample_rate=48000", "-t", "3", "-af", "volume=18.06dB", "-c:a", "pcm_s16le", sine)+ comp = OUT / "dyn_comp.wav"+ script("audio.py", sine, "--compress", "--comp-threshold", "-20", "--comp-ratio", "4", "--comp-attack", "5", "--comp-release", "80", "-o", comp)+ peak_c, _ = self._peak_rms(comp)+ self.assertGreater(self._peak_rms(sine)[0], -0.5)+ self.assertLess(peak_c, -3.0, "compressor reduced a 0 dBFS tone (measured -7.5 dB: ffmpeg detects RMS, knee 2.83 dB)")+ self.assertGreater(peak_c, -20.0, "compression, not a gate")+ # every flag is range-checked before ffmpeg runs+ for flags, text in ((("--compress", "--comp-ratio", "50"), "1..20"),+ (("--limit", "--limit-ceiling", "1"), "-24..0"),+ (("--gate", "--gate-attack", "0"), "0.01..9000"),+ (("--compress", "--comp-makeup", "40"), "0..36")):+ proc = script("audio.py", self.mic, *flags, "-o", OUT / "dyn_bad.wav", "--json", expect_fail=True)+ doc = json.loads(proc.stdout)+ self.assertEqual(doc["error"]["kind"], "input")+ self.assertIn(text, doc["error"]["message"])+ self.assertNotIn("$ ", proc.stderr, "refused before ffmpeg ran")+ # a parameter without its switch is an error, not silently ignored+ proc = script("audio.py", self.mic, "--comp-ratio", "4", "-o", OUT / "dyn_bad.wav", expect_fail=True)+ self.assertIn("add --compress", proc.stderr)+ # the limiter alone on a video input keeps the picture+ mp4 = OUT / "dyn_video.mp4"+ data = json.loads(script("audio.py", self.src, "--limit", "--limit-ceiling", "-1", "-o", mp4, "--json").stdout)+ self.assertIsNotNone(data["probe"]["video"])+ self.assertLessEqual(self._peak_rms(mp4)[0], -1.0 + 0.3)+def test_every_script_has_help(self):for name in sorted(p.name for p in SCRIPTS.glob("*.py") if not p.name.startswith("_")):with self.subTest(script=name):diff --git a/tests/test_contract.py b/tests/test_contract.pyindex 8b71b83..2b7e5db 100644--- a/tests/test_contract.py+++ b/tests/test_contract.py@@ -208,15 +208,18 @@ class ContractTests(unittest.TestCase):def test_visual_verification_metadata(self):picture = {"fit", "caption", "overlay", "graphics", "color", "join", "multicam", "render"}+ # join is the one picture tool that also accepts audio-only inputs (audio concat); look applies+ # to its video output only, which SKILL.md states next to "Look: not needed"+ both = {"join"}for t in self.contract["tools"]:self.assertEqual(t["requires_visual_verification"], t["name"] in picture, t["name"])if t["requires_visual_verification"]:self.assertIn("ffmpeg-skill/look", t["verification"]["tools"])- self.assertTrue(t["video_required"])- self.assertFalse(t["audio_only"])- if t["audio_only"]:+ self.assertEqual(t["video_required"], t["name"] not in both, t["name"])+ self.assertEqual(t["audio_only"], t["name"] in both, t["name"])+ if t["audio_only"] and t["name"] not in both:self.assertFalse(t["requires_visual_verification"], f"{t['name']}: audio-only tools never need look.py")- for name in ("loudness", "silence", "audio", "cut", "sync", "probe", "check"):+ for name in ("loudness", "silence", "audio", "cut", "sync", "probe", "check", "join"):self.assertTrue(self.tools[name]["audio_only"], name)# SKILL.md says the same thingskill = (ROOT / "SKILL.md").read_text(encoding="utf-8")@@ -575,5 +578,125 @@ class ContractTests(unittest.TestCase):self.assertEqual(before, after, f"{p.name} modified")+class DoctorDetectionTests(unittest.TestCase):+ """Capability detection reads every `ffmpeg -filters` layout and never confuses "unreadable" with "absent".++ FFmpeg 8 shortened the flag column of `ffmpeg -filters` from three characters (`..C`) to two+ (`T.`); ffmpeg-skill 0.9.0 anchored on the three-character column and reported every filter+ missing on FFmpeg 8. These tests drive `doctor` through a fake `ffmpeg` on PATH that prints a+ fixture from tests/fixtures/ for each listing flag.+ """++ FIX = ROOT / "tests" / "fixtures"++ def setUp(self):+ self.work = Path(tempfile.mkdtemp(prefix="doctor-"))++ def tearDown(self):+ shutil.rmtree(self.work, ignore_errors=True)++ def _doctor(self, filters, encoders="ffmpeg_encoders_6.1.txt", bsfs="ffmpeg_bsfs_6.1.txt", filters_exit=0):+ """`doctor --json` with a fake ffmpeg that prints the named fixtures (stdout cat, no shell interpolation of names)."""+ shim = self.work / "shim"+ shim.mkdir(exist_ok=True)+ script = "#!/bin/sh\ncase \"$2\" in\n"+ for flag, name, code in (("-filters", filters, filters_exit), ("-encoders", encoders, 0), ("-bsfs", bsfs, 0)):+ script += f" {flag}) cat '{self.FIX / name}'; exit {code};;\n"+ script += "esac\ncase \"$1\" in -version) echo 'ffmpeg version 8.0-fixture'; exit 0;; esac\nexit 1\n"+ (shim / "ffmpeg").write_text(script)+ (shim / "ffmpeg").chmod(0o755)+ # ffprobe stays the real one; PATH keeps the rest so python/whisper detection is unchanged+ env = dict(os.environ, PATH=f"{shim}:{os.environ['PATH']}")+ proc = sh(sys.executable, SCRIPTS / "_contract.py", "doctor", "--json", env=env, check=False)+ return json.loads(proc.stdout), proc.returncode++ # 6.1, 8.1.2 and 9.0.1 are captures (Ubuntu apt, Homebrew on the macOS runner, gyan.dev build on the Windows runner);+ # 7.1 is a constructed layout (FFmpeg 7 prints the 6.x layout, no capture at hand)+ FILTER_FIXTURES = ("ffmpeg_filters_6.1.txt", "ffmpeg_filters_7.1_constructed.txt", "ffmpeg_filters_8.1.2_macos.txt", "ffmpeg_filters_9.0.1_windows.txt")++ def test_parser_reads_ffmpeg_6_7_8_9_layouts(self):+ for name in self.FILTER_FIXTURES:+ names = _contract._parse_ff_list("-filters", (self.FIX / name).read_text())+ self.assertGreater(len(names), 450, name)+ for f in ("xfade", "loudnorm", "acompressor", "abuffer", "concat", "scale"):+ self.assertIn(f, names, f"{f} in {name}")+ self.assertNotIn("=", names, name)+ self.assertNotIn("Filters:", names, name)+ self.assertNotIn("------", names, name)+ self.assertEqual(len(names), len(set(names)), f"{name}: no row read twice")+ # the real 9.0.1 capture: two flag characters per row, a three-character legend, a separator, CRLF+ raw = (self.FIX / "ffmpeg_filters_9.0.1_windows.txt").read_bytes()+ self.assertIn(b"\r\n", raw)+ self.assertIn(b" TS aap ", raw)+ names9 = _contract._parse_ff_list("-filters", raw.decode())+ self.assertEqual(len(names9), 527)+ self.assertIn("aap", names9) # a two-flag row with a two-input io-spec (AA->A)+ # the Homebrew 8.1.2 build has no libfreetype / libass: drawtext is absent from its listing, which is+ # what doctor must report (missing), and the other three builds do carry it+ self.assertNotIn("drawtext", _contract._parse_ff_list("-filters", (self.FIX / "ffmpeg_filters_8.1.2_macos.txt").read_text()))+ for name in ("ffmpeg_filters_6.1.txt", "ffmpeg_filters_9.0.1_windows.txt"):+ self.assertIn("drawtext", _contract._parse_ff_list("-filters", (self.FIX / name).read_text()), name)+ for enc_name in ("ffmpeg_encoders_6.1.txt", "ffmpeg_encoders_8.1.2_macos.txt", "ffmpeg_encoders_9.0.1_windows.txt"):+ enc = _contract._parse_ff_list("-encoders", (self.FIX / enc_name).read_text())+ self.assertIn("libx264", enc, enc_name)+ self.assertIn("aac", enc, enc_name)+ self.assertNotIn("=", enc, enc_name)+ for bsf_name in ("ffmpeg_bsfs_6.1.txt", "ffmpeg_bsfs_8.1.2_macos.txt", "ffmpeg_bsfs_9.0.1_windows.txt"):+ self.assertIn("filter_units", _contract._parse_ff_list("-bsfs", (self.FIX / bsf_name).read_text()), bsf_name)+ self.assertEqual(_contract._parse_ff_list("-filters", (self.FIX / "ffmpeg_filters_garbage.txt").read_text()), [])++ def test_two_character_flags_do_not_hide_filters(self):+ """The FFmpeg 8 layout: every declared filter is found, nothing is reported missing or unknown."""+ absent_in_brew = {"filter:drawtext", "filter:subtitles", "filter:ass", "filter:zscale"} # not built into Homebrew's 8.1.2+ for name in self.FILTER_FIXTURES:+ d, code = self._doctor(name)+ declared = [c for c in _contract.required_capabilities()["required"] + _contract.required_capabilities()["optional"] if c.startswith("filter:")]+ self.assertTrue(declared)+ expected_missing = absent_in_brew if "8.1.2" in name else set()+ for cap in declared:+ self.assertIn(cap, d["missing"] + d["missing_optional"] if cap in expected_missing else d["available"], f"{cap} with {name}")+ self.assertEqual({c for c in d["missing"] + d["missing_optional"] if c.startswith("filter:")}, expected_missing, name)+ self.assertEqual(d["unknown"], [], name)+ self.assertEqual(d["detection"]["filters"]["status"], "parsed", name)+ self.assertEqual(d["ok"], not expected_missing, name)+ self.assertEqual(code, 1 if expected_missing else 0, name)++ def test_unparsed_listing_is_unknown_not_missing(self):+ """Output no parser understands: filters become `unknown`, `ok` is false, exit 2, and nothing is claimed available."""+ d, code = self._doctor("ffmpeg_filters_garbage.txt")+ self.assertTrue(d["unknown"])+ self.assertTrue(all(c.startswith("filter:") for c in d["unknown"]))+ self.assertEqual([c for c in d["missing"] if c.startswith("filter:")], [])+ self.assertEqual([c for c in d["available"] if c.startswith("filter:")], [])+ self.assertEqual(d["detection"]["filters"]["status"], "unparsed")+ self.assertTrue(any("filters" in e for e in d["errors"]))+ self.assertFalse(d["ok"])+ self.assertEqual(code, 2)+ # encoders came from a readable listing and are still detected+ self.assertIn("encoder:libx264", d["available"])++ def test_failed_listing_is_unknown_not_missing(self):+ """`ffmpeg -filters` exiting non-zero is a structured detection error, not a missing filter."""+ d, code = self._doctor("ffmpeg_filters_8.0_constructed.txt", filters_exit=3)+ self.assertEqual(d["detection"]["filters"]["status"], "failed")+ self.assertIn("exited 3", d["detection"]["filters"]["detail"])+ self.assertTrue(d["unknown"])+ self.assertEqual([c for c in d["missing"] if c.startswith("filter:")], [])+ self.assertFalse(d["ok"])+ self.assertEqual(code, 2)++ def test_doctor_json_keeps_its_keys(self):+ """Consumers of 0.9.0 read available / missing / missing_optional / ok; those keys and types stay."""+ d, _ = self._doctor("ffmpeg_filters_8.0_constructed.txt")+ for key in ("python", "ffmpeg", "ffprobe", "available", "missing", "missing_optional", "ok"):+ self.assertIn(key, d)+ for key in ("available", "missing", "missing_optional", "unknown", "errors"):+ self.assertIsInstance(d[key], list)+ self.assertIsInstance(d["ok"], bool)+ contract = json.loads(sh(sys.executable, SCRIPTS / "_contract.py", "--json").stdout)+ for key in ("available", "missing", "missing_optional", "unknown", "detection", "detected_by"):+ self.assertIn(key, contract["capabilities"])++if __name__ == "__main__":unittest.main(verbosity=2)