Claude Skill

ffmpeg

Use this skill for local FFmpeg/FFprobe media inspection, remuxing, transcoding, filtering, evidence-bounded video review, transcript-assisted editorial plans, edit decision lists, podcast/audio cleanup, rendering, and output acceptance. It emphasizes explicit stream selection, s

LLM Mart · 0 points · 13 views 0 listing impressions 0 install-command copies
Download magnus919-agent-skills-ffmpeg-addad86.zip · 113 KB

Install

skills CLI npx skills add https://github.com/magnus919/agent-skills/tree/main/ffmpeg
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install magnus919-agent-skills@llmmart
Git git clone https://github.com/magnus919/agent-skills.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole magnus919/agent-skills collection as a plugin from our marketplace. Git is the plain clone.

README

FFmpeg Expert Skill

A practical FFmpeg skill for inspecting local media, planning reviewable video or podcast edits, rendering safely, and accepting outputs from evidence rather than command success alone.

Why Install This Skill

FFmpeg failures often happen at boundaries: the wrong stream is selected, a cut lands on an unexpected keyframe, a filter is absent from the installed build, timestamps drift, or a technically valid output fails in its real destination. Editorial work adds another risk: sparse frames, silence intervals, and imperfect transcripts can look more conclusive than they are.

This skill provides a repeatable intake-to-acceptance workflow. It separates technical measurements from editorial judgment, preserves originals, makes cuts reviewable in an edit decision list, and records what was actually checked.

What You Get

Core guidance

Path Purpose
SKILL.md Trigger boundaries, capability routing, evidence classes, and the core workflow
references/core-model-and-command-anatomy.md Containers, streams, codecs, mapping, option scope, and timestamps
references/filters-and-transformations.md Simple and complex filtergraphs, audio/video filters, and graph debugging
references/intermediate-workflows.md Trimming, concat, metadata, subtitles, scripting, pipes, and streaming
references/advanced-operations-and-safety.md Hardware, synchronization, reproducibility, and operational safety
references/command-cookbook.md Short, assumption-labeled commands
references/learning-summary.md Learning progression and consolidated mental model
references/source-inventory.md Original primary/secondary source inventory and evidence boundaries
references/local-verification.md Version- and host-specific FFmpeg 8.1.2 experiments

Media editing and evidence guidance

Path Purpose
references/media-intake-and-manifest.md Authorization, source identity, probe capture, output contracts, privacy, and preservation
references/video-inspection-and-visual-evidence.md Bounded frame/clip sampling and defensible visual claims
references/editorial-video-editing.md Transcript-assisted decisions, sequencing, treatments, and review gates
references/audio-and-podcast-editing.md Mechanical edits, signal cleanup, editorial audio decisions, and listening checks
references/ffmpeg-edit-decision-lists.md EDL semantics, validation, keyframe status, mapping, and command planning
references/media-verification-and-acceptance.md Layered probe, decode, content, editorial, and downstream acceptance evidence
references/media-failure-modes.md Diagnosis matrix, safe recovery, and stop rules
references/media-research-source-index.md Claim-to-source map for official docs, standards, experiments, and heuristics
references/editorial-workflow-example.md Reproducible synthetic intake-to-acceptance integration workflow
references/synthetic-media-fixtures.md Deterministic real-media fixture coverage and evidence boundaries

Copyable templates

Path Purpose
templates/media-intake.json Parseable source, stream, timing, contract, privacy, and assumption manifest
templates/edit-decision-list.json Parseable source ranges, evidence, confidence, treatments, mapping, and verification
templates/video-inspection-report.md Fixed-section technical and sampled-evidence report
templates/visual-review-packet.md Timestamped review samples with attribution and coverage limits
templates/vision-review-observations.json Machine-readable reviewer attribution, evidence classes, blind spots, and EDL links
templates/podcast-edit-plan.md Mechanical, signal-processing, and editorial audio plan
templates/media-acceptance-report.md Criterion-by-criterion evidence and release verdict
templates/media-acceptance-contract.json Parseable stream, format, evidence, loudness, and downstream criteria
templates/target-compatibility-manifest.json Named consumer, sourced requirements, technical limits, and authorized target lane
templates/research-experiment-record.md Versioned, reproducible command experiment record

Existing automation and evals

Path Purpose
scripts/ffmpeg-preflight Tool status, inventory counts, and named filter/encoder/hwaccel checks
scripts/test_ffmpeg_preflight.py Deterministic tests for the capability preflight
scripts/fixtures/ffmpeg-8.1.2-inventories.json Small version-labeled parser fixture
scripts/media-intake Read-only input inventory with bounded ffprobe metadata
scripts/extract-review-frames Bounded timestamp frame extraction for human or vision review
scripts/vision-review-handoff Privacy-safe bounded frame packet with provenance, limits, hashes, and pending-review manifest
scripts/import-vision-review Validate attributed observations and link them to EDL events without rendering
scripts/render-edl Validate single- or multi-source EDLs and emit non-executing concat-filter or concat-demuxer plans
scripts/audio-inspect Bounded silence, loudness, peak/clipping, transcript-candidate, and podcast-plan evidence
scripts/media-verify Evaluate output probe and review evidence against a declared acceptance contract
scripts/target-compatibility Separate technical probe conformance from one named player's/editor's/host's result
scripts/editorial-workflow-example Generate synthetic audio/video and exercise the complete workflow with durable evidence
scripts/generate-media-fixtures Generate a bounded sanitized fixture battery and versioned evidence manifest
evals/evals.json Output-quality cases for core FFmpeg, media evidence, video, podcast, EDL, safety, and acceptance behavior

Quick Start

Install FFmpeg with your platform package manager and inspect the source before choosing an edit:

ffmpeg -version
ffprobe -version
ffprobe -v error -show_format -show_streams -of json input.mp4

For a media editing task:

  1. Copy templates/media-intake.json into a private task workspace and record the source and output contract.
  2. Collect only the bounded frame, clip, transcript, or signal evidence needed for the decision.
  3. Copy templates/edit-decision-list.json or templates/podcast-edit-plan.md and review consequential cuts.
  4. Render to a new path with overwrite refusal while exploring.
  5. Copy templates/media-acceptance-report.md, probe and review the result, then test the intended player, editor, service, or archive boundary.

Before using a version-sensitive recipe, inspect the local capability:

scripts/ffmpeg-preflight --filter scale --filter loudnorm --encoder libx264 --hwaccel videotoolbox

Named checks report each capability as present or absent. Exit code 1 means a required tool/probe failed; 2 means a requested capability is absent from a usable inventory. Add --json for machine-readable output.

Run the complete synthetic integration example in a new or empty task-local directory:

scripts/editorial-workflow-example /tmp/ffmpeg-editorial-example --json

The resulting acceptance report passes only the exercised component and integration checks; semantic, listening, and downstream-consumer boundaries remain explicitly unverified.

Generate the richer real-media test battery when a change needs timestamp, concat, audio, subtitle, or bounded visual evidence:

scripts/generate-media-fixtures /tmp/ffmpeg-fixtures --json

Generated media remains task-local; commit the generator and test assertions, not the binary outputs.

Produce measured audio evidence and a reviewable plan without changing the source:

scripts/audio-inspect input.wav \
  --measure-silence --silence-threshold=-45dB --silence-duration 0.7 \
  --measure-loudness --measure-clipping --json

Optional timed transcript JSON must disclose alignment quality. Detector intervals and transcript ranges remain candidates until listening review approves an edit.

Evaluate a rendered output against declared criteria:

scripts/media-verify acceptance-contract.json output-probe.json \
  --evidence review-evidence.json --json

Missing fields or review evidence remain UNVERIFIED; blocked reviews remain BLOCKED; local probe/decode success never supplies downstream compatibility evidence.

Prepare visual evidence around proposed edit boundaries without exposing the source path:

ffmpeg/scripts/vision-review-handoff private.mov --asset-id asset-017 \
  --question "Does the sampled boundary preserve title continuity?" \
  --timestamp 12.4 --neighbor-seconds 0.25 --output-dir review-packet --json

The manifest covers only its listed samples. An authorized reviewer must add attributed observations before import-vision-review can link them to an EDL; sparse frames never prove absence throughout a video.

For destination-specific delivery, evaluate a sourced target contract and preserve target evidence separately:

ffmpeg/scripts/target-compatibility target.json output-probe.json \
  --target-evidence target-result.json --json

The verdict applies only to the named target and version. A local FFmpeg decode pass does not substitute for import, playback, or ingest evidence from that consumer.

Triggers

Load this skill for:

  • Media intake, FFprobe manifests, stream/container/timestamp inspection, or output contracts
  • Remuxing, transcoding, filtering, trimming, joining, extraction, subtitles, or synchronization
  • Bounded review-frame or audio-evidence preparation from supplied/authorized local media
  • Transcript-assisted video edits, reviewable EDLs, or deterministic render plans
  • Podcast cutting, silence/noise analysis, loudness measurement, and audio cleanup
  • Build capability checks, overwrite-safe batch work, output verification, or failure diagnosis

Use another capability first for online media/transcript acquisition, semantic image interpretation, HTML-authored HyperFrames composition, platform publishing/API work, DRM, or rights clearance.

Requirements

  • ffmpeg and ffprobe on PATH for execution
  • A shell with careful filename and filter-expression quoting
  • A vision-capable or human reviewer for semantic claims about extracted images
  • Listening playback for editorial audio acceptance
  • Network access only for linked documentation or an explicitly requested network protocol
  • Hardware acceleration only with the relevant device, drivers, compiled support, and a verified end-to-end path

Skill manifest

FFmpeg Expert

Treat FFmpeg as a typed media pipeline and media editing as an evidence-driven workflow. Inspect the actual source, separate measurements from interpretations, make decisions reviewable, render to a new path, and verify at the intended boundary.

When Not to Use

  • Do not use this skill for libav API programming, opaque whole-video semantic understanding, automatic publishing, rights clearance, DRM circumvention, professional broadcast/color certification, or HyperFrames-authored compositions.
  • Route online media or transcript acquisition to the owning source skill, semantic frame interpretation to a vision-capable reviewer, and platform upload/API work to the platform skill.

Boundaries and Routing

  • Use a YouTube/transcript capability to acquire online video or transcripts; return here only for local supplied media and transcript artifacts.
  • Use HyperFrames for HTML-authored motion graphics or composition; use this skill to inspect and preprocess its media inputs or verify rendered outputs.
  • Use the named platform skill for upload, publishing, account, or API operations.
  • FFmpeg can extract bounded frames and audio segments but does not interpret their semantic content. Route visual interpretation to a vision-capable reviewer and preserve its observations as attributed evidence.
  • Do not infer rights, consent, identity, intent, or whole-program meaning from technical metadata, sparse frames, silence intervals, or an unaligned transcript.

Evidence Classes

Label consequential claims so unlike evidence is not blended:

  • Technical contract — behavior documented by an official FFmpeg or standards source.
  • Observed artifact — probe output, measured signal result, extracted frame, listened segment, or downstream test from this source/output.
  • Reproducible experiment — exact version, input identity/generator, command, result, and limits.
  • Editorial heuristic — a reversible judgment that requires human review, not a fact established by FFmpeg.
  • User requirement — the requested output contract, preservation policy, and acceptance threshold.

Media Editing Loop

  1. Intake. Confirm authorization and privacy boundaries; identify every source; use a private workspace copy of templates/media-intake.json to record probe evidence, timing, the output contract, preservation policy, and unresolved assumptions. Keep raw probe output and media in the restricted task workspace, and minimize any shareable derivative.
  2. Inspect. Probe streams and format. Check required local capabilities with inventories or scripts/ffmpeg-preflight; never assume a filter, encoder, or hardware backend exists.
  3. Collect bounded evidence. Extract only the frames, clips, waveform/signal measurements, or transcript spans needed for the decision. Record sample timestamps, count, byte/size limits, and the statement that samples cover sampled times only.
  4. Plan before rendering. For editorial changes, write a reviewable EDL or podcast edit plan. Every consequential cut needs a source range, reason, evidence, confidence, treatment, mapping, and verification state. Leave ambiguous decisions unresolved rather than improvising.
  5. Render safely. Make stream mapping explicit; prefer -n and a new output path; avoid untrusted shell concatenation. Distinguish keyframe-limited stream copy from decoded/re-encoded precise cuts.
  6. Verify in layers. Check exit status, decodeability, output probe, stream/timing contract, bounded frame/audio evidence, editorial review, and the actual downstream consumer as applicable. Treat probe/decode success and destination acceptance as separate gates; a local file can pass the former and fail the latter.
  7. Accept or stop. Use a private workspace copy of templates/media-acceptance-report.md to record pass/fail/blocked per criterion. A valid container or successful command alone is not acceptance.

Start technical inspection with:

ffprobe -v error -show_format -show_streams -of json INPUT

For shipped helper workflows, run the helper from the skill root with explicit output paths and limits; treat its JSON result as a report to verify, not as acceptance by itself. When using extract-review-frames, pass timestamps as separate values (--timestamps 0 5 9), not one comma-separated value.

Route to the Focused Reference

Evidence-driven media work

  • Read references/media-intake-and-manifest.md before handling supplied/generated media, sensitive material, multiple sources, or a defined delivery contract.
  • Read references/video-inspection-and-visual-evidence.md when extracting or reviewing frames/clips, choosing samples, or making visual claims.
  • Read references/editorial-video-editing.md for transcript-assisted selection, sequencing, pacing, transitions, overlays, and reviewable editorial decisions.
  • Read references/audio-and-podcast-editing.md for podcast cuts, signal cleanup, silence/noise analysis, loudness measurement, and listening gates.
  • Read references/ffmpeg-edit-decision-lists.md before creating, validating, or turning an EDL into a command plan.
  • Read references/media-verification-and-acceptance.md before declaring an output complete or compatible.
  • Read references/media-failure-modes.md when evidence is contradictory, a cut drifts, a filter is missing, review samples are sparse, or a workflow repeatedly fails.
  • Read references/media-research-source-index.md when supporting claims, refreshing version-sensitive guidance, or recording a technical experiment.
  • Read references/editorial-workflow-example.md when proving that intake, evidence, EDL, rendering, and acceptance artifacts compose end to end on a synthetic fixture.
  • Read references/synthetic-media-fixtures.md when a change needs bounded real-media fixtures for cuts, cadence, concat, audio, subtitles, or visual-boundary sampling.

Core FFmpeg work

  • Read references/core-model-and-command-anatomy.md for containers, streams, codecs, option scope, mapping, copy/transcode, and timestamps.
  • Read references/filters-and-transformations.md for filtergraphs, labels, audio/video processing, and incremental graph debugging.
  • Read references/intermediate-workflows.md for seeking, trimming, concat, metadata, subtitles, batching, pipes, and streaming.
  • Read references/advanced-operations-and-safety.md for hardware acceleration, synchronization, reproducibility, network safety, and failure boundaries.
  • Read references/command-cookbook.md only after inspection and capability checks; every recipe is conditional.
  • Read references/learning-summary.md for the newcomer-first mental model.
  • Read references/source-inventory.md for the original FFmpeg source survey and references/local-verification.md only for its explicitly host-specific FFmpeg 8.1.2 observations.

Templates

  • templates/media-intake.json — source identities, probes, contract, privacy, preservation, assumptions
  • templates/edit-decision-list.json — reviewable source ranges and treatments
  • templates/video-inspection-report.md — technical inspection and bounded evidence ledger
  • templates/visual-review-packet.md — attributed frame/clip observations and coverage limits
  • templates/vision-review-observations.json — parseable attributed observation block for a prepared packet
  • templates/podcast-edit-plan.md — mechanical, signal, and editorial audio decisions
  • templates/media-acceptance-report.md — layered verification and criterion verdicts
  • templates/media-acceptance-contract.json — machine-readable stream, format, evidence, loudness, and downstream requirements
  • templates/target-compatibility-manifest.json — one named target, sourced requirements, technical constraints, and downstream lane
  • templates/research-experiment-record.md — reproducible version/command/result record

Run scripts/editorial-workflow-example in a new or empty task-local directory when a reproducible synthetic integration proof is required. Its PASS_WITH_UNVERIFIED_BOUNDARIES result is deliberately narrower than editorial or destination acceptance.

Run scripts/generate-media-fixtures when tests need deterministic non-personal media. Keep its generated binaries and manifest in the task workspace; commit the generator and assertions, not the outputs.

Use scripts/render-edl for a non-executing single- or multi-source plan. Default to decoded concat-filter assembly; select concat-demuxer stream copy only with matching probe-derived signatures and verified packet/keyframe boundaries. Unsupported transitions must remain explicit errors.

Use scripts/audio-inspect for bounded silence, EBU R128, peak/clipping, and transcript-alignment evidence. Request each measurement explicitly, preserve unavailable filters as UNAVAILABLE, and treat every interval or transcript range as a listening-review candidate. Its optional report output refuses overwrite.

Use scripts/media-verify with a declared acceptance contract, output FFprobe JSON, and optional evidence JSON. It reports every criterion independently as PASS, FAIL, BLOCKED, UNVERIFIED, or NOT_APPLICABLE; only a report with no failed or missing required evidence is an overall pass.

Use scripts/target-compatibility when acceptance names a real player, editor, host, archive, or service. Keep sourced technical requirements and local probe results separate from evidence produced by that exact consumer; a pass applies only to the named target/version.

Use scripts/vision-review-handoff to prepare bounded, privacy-safe frame packets for an authorized human or vision reviewer. Import only attributed reviewed observations with scripts/import-vision-review; treat proposed editorial consequences as evidence for review, never automatic decisions.

Copy a template into the task workspace and replace its placeholder/example values. Do not put private paths, media, transcripts, or review evidence in the public skill repository.

Non-Negotiable Checks

  • Make stream selection explicit whenever multiple inputs/tracks or a complex graph are involved.
  • Treat option order as significant: options generally apply to the next input or output.
  • Do not call silence useless; silencedetect reports threshold crossings, not editorial value.
  • Claim loudness, clipping, timing, or keyframe status only from an available measurement method and retain its output.
  • A transcript is evidence only for its text and supplied timing quality; spot-check alignment against media before frame-accurate edits.
  • Stop for review when evidence is sparse, ambiguity could remove meaningful content, an optional tool/filter is absent, privacy/authorization is unclear, or two materially different approaches fail.

Completion

Finish only when the requested artifact exists at a new path, required probes and bounded reviews are recorded, the output has been exercised at the relevant downstream boundary, and every acceptance criterion is passed or explicitly blocked. Report untested claims and remaining assumptions instead of filling gaps with plausible output.

Files (agent-skills)
  • evals
    • evals.json 14.9 KB
      Loading…
  • references
    • advanced-operations-and-safety.md 5.4 KB
      Loading…
    • audio-and-podcast-editing.md 5.7 KB
      Loading…
    • command-cookbook.md 1.9 KB
      Loading…
    • core-model-and-command-anatomy.md 3.8 KB
      Loading…
    • editorial-video-editing.md 4.9 KB
      Loading…
    • editorial-workflow-example.md 2.7 KB
      Loading…
    • ffmpeg-edit-decision-lists.md 5.8 KB
      Loading…
    • filters-and-transformations.md 3.6 KB
      Loading…
    • intermediate-workflows.md 6.1 KB
      Loading…
    • learning-summary.md 3.4 KB
      Loading…
    • local-verification.md 3.1 KB
      Loading…
    • media-failure-modes.md 5.8 KB
      Loading…
    • media-intake-and-manifest.md 4.6 KB
      Loading…
    • media-research-source-index.md 5.4 KB
      Loading…
    • media-verification-and-acceptance.md 7 KB
      Loading…
    • source-inventory.md 6.2 KB
      Loading…
    • synthetic-media-fixtures.md 2.4 KB
      Loading…
    • video-inspection-and-visual-evidence.md 6.8 KB
      Loading…
  • scripts
    • fixtures
      • ffmpeg-8.1.2-inventories.json 1.3 KB
        Loading…
    • audio-inspect 16.8 KB · in bundle
    • editorial-workflow-example 14.8 KB · in bundle
    • extract-review-frames 11.6 KB · in bundle
    • ffmpeg-preflight 10.6 KB · in bundle
    • generate-media-fixtures 23.7 KB · in bundle
    • import-vision-review 3.6 KB · in bundle
    • media-intake 8.1 KB · in bundle
    • media-verify 16.5 KB · in bundle
    • render-edl 18.4 KB · in bundle
    • target-compatibility 8.4 KB · in bundle
    • test_ffmpeg_preflight.py 12.1 KB
      Loading…
    • test_media_workflows.py 41.1 KB
      Loading…
    • vision-review-handoff 12.1 KB · in bundle
  • templates
    • edit-decision-list.json 1.1 KB
      Loading…
    • media-acceptance-contract.json 1 KB
      Loading…
    • media-acceptance-report.md 1.1 KB
      Loading…
    • media-intake.json 856 B
      Loading…
    • podcast-edit-plan.md 961 B
      Loading…
    • research-experiment-record.md 433 B
      Loading…
    • target-compatibility-manifest.json 1.5 KB
      Loading…
    • video-inspection-report.md 806 B
      Loading…
    • vision-review-observations.json 634 B
      Loading…
    • visual-review-packet.md 1.2 KB
      Loading…
  • README.md 10.5 KB
    # FFmpeg Expert Skill
    
    A practical FFmpeg skill for inspecting local media, planning reviewable video or podcast edits, rendering safely, and accepting outputs from evidence rather than command success alone.
    
    ## Why Install This Skill
    
    FFmpeg failures often happen at boundaries: the wrong stream is selected, a cut lands on an unexpected keyframe, a filter is absent from the installed build, timestamps drift, or a technically valid output fails in its real destination. Editorial work adds another risk: sparse frames, silence intervals, and imperfect transcripts can look more conclusive than they are.
    
    This skill provides a repeatable intake-to-acceptance workflow. It separates technical measurements from editorial judgment, preserves originals, makes cuts reviewable in an edit decision list, and records what was actually checked.
    
    ## What You Get
    
    ### Core guidance
    
    | Path | Purpose |
    |---|---|
    | `SKILL.md` | Trigger boundaries, capability routing, evidence classes, and the core workflow |
    | `references/core-model-and-command-anatomy.md` | Containers, streams, codecs, mapping, option scope, and timestamps |
    | `references/filters-and-transformations.md` | Simple and complex filtergraphs, audio/video filters, and graph debugging |
    | `references/intermediate-workflows.md` | Trimming, concat, metadata, subtitles, scripting, pipes, and streaming |
    | `references/advanced-operations-and-safety.md` | Hardware, synchronization, reproducibility, and operational safety |
    | `references/command-cookbook.md` | Short, assumption-labeled commands |
    | `references/learning-summary.md` | Learning progression and consolidated mental model |
    | `references/source-inventory.md` | Original primary/secondary source inventory and evidence boundaries |
    | `references/local-verification.md` | Version- and host-specific FFmpeg 8.1.2 experiments |
    
    ### Media editing and evidence guidance
    
    | Path | Purpose |
    |---|---|
    | `references/media-intake-and-manifest.md` | Authorization, source identity, probe capture, output contracts, privacy, and preservation |
    | `references/video-inspection-and-visual-evidence.md` | Bounded frame/clip sampling and defensible visual claims |
    | `references/editorial-video-editing.md` | Transcript-assisted decisions, sequencing, treatments, and review gates |
    | `references/audio-and-podcast-editing.md` | Mechanical edits, signal cleanup, editorial audio decisions, and listening checks |
    | `references/ffmpeg-edit-decision-lists.md` | EDL semantics, validation, keyframe status, mapping, and command planning |
    | `references/media-verification-and-acceptance.md` | Layered probe, decode, content, editorial, and downstream acceptance evidence |
    | `references/media-failure-modes.md` | Diagnosis matrix, safe recovery, and stop rules |
    | `references/media-research-source-index.md` | Claim-to-source map for official docs, standards, experiments, and heuristics |
    | `references/editorial-workflow-example.md` | Reproducible synthetic intake-to-acceptance integration workflow |
    | `references/synthetic-media-fixtures.md` | Deterministic real-media fixture coverage and evidence boundaries |
    
    ### Copyable templates
    
    | Path | Purpose |
    |---|---|
    | `templates/media-intake.json` | Parseable source, stream, timing, contract, privacy, and assumption manifest |
    | `templates/edit-decision-list.json` | Parseable source ranges, evidence, confidence, treatments, mapping, and verification |
    | `templates/video-inspection-report.md` | Fixed-section technical and sampled-evidence report |
    | `templates/visual-review-packet.md` | Timestamped review samples with attribution and coverage limits |
    | `templates/vision-review-observations.json` | Machine-readable reviewer attribution, evidence classes, blind spots, and EDL links |
    | `templates/podcast-edit-plan.md` | Mechanical, signal-processing, and editorial audio plan |
    | `templates/media-acceptance-report.md` | Criterion-by-criterion evidence and release verdict |
    | `templates/media-acceptance-contract.json` | Parseable stream, format, evidence, loudness, and downstream criteria |
    | `templates/target-compatibility-manifest.json` | Named consumer, sourced requirements, technical limits, and authorized target lane |
    | `templates/research-experiment-record.md` | Versioned, reproducible command experiment record |
    
    ### Existing automation and evals
    
    | Path | Purpose |
    |---|---|
    | `scripts/ffmpeg-preflight` | Tool status, inventory counts, and named filter/encoder/hwaccel checks |
    | `scripts/test_ffmpeg_preflight.py` | Deterministic tests for the capability preflight |
    | `scripts/fixtures/ffmpeg-8.1.2-inventories.json` | Small version-labeled parser fixture |
    | `scripts/media-intake` | Read-only input inventory with bounded `ffprobe` metadata |
    | `scripts/extract-review-frames` | Bounded timestamp frame extraction for human or vision review |
    | `scripts/vision-review-handoff` | Privacy-safe bounded frame packet with provenance, limits, hashes, and pending-review manifest |
    | `scripts/import-vision-review` | Validate attributed observations and link them to EDL events without rendering |
    | `scripts/render-edl` | Validate single- or multi-source EDLs and emit non-executing concat-filter or concat-demuxer plans |
    | `scripts/audio-inspect` | Bounded silence, loudness, peak/clipping, transcript-candidate, and podcast-plan evidence |
    | `scripts/media-verify` | Evaluate output probe and review evidence against a declared acceptance contract |
    | `scripts/target-compatibility` | Separate technical probe conformance from one named player's/editor's/host's result |
    | `scripts/editorial-workflow-example` | Generate synthetic audio/video and exercise the complete workflow with durable evidence |
    | `scripts/generate-media-fixtures` | Generate a bounded sanitized fixture battery and versioned evidence manifest |
    | `evals/evals.json` | Output-quality cases for core FFmpeg, media evidence, video, podcast, EDL, safety, and acceptance behavior |
    
    ## Quick Start
    
    Install FFmpeg with your platform package manager and inspect the source before choosing an edit:
    
    ```sh
    ffmpeg -version
    ffprobe -version
    ffprobe -v error -show_format -show_streams -of json input.mp4
    ```
    
    For a media editing task:
    
    1. Copy `templates/media-intake.json` into a private task workspace and record the source and output contract.
    2. Collect only the bounded frame, clip, transcript, or signal evidence needed for the decision.
    3. Copy `templates/edit-decision-list.json` or `templates/podcast-edit-plan.md` and review consequential cuts.
    4. Render to a new path with overwrite refusal while exploring.
    5. Copy `templates/media-acceptance-report.md`, probe and review the result, then test the intended player, editor, service, or archive boundary.
    
    Before using a version-sensitive recipe, inspect the local capability:
    
    ```sh
    scripts/ffmpeg-preflight --filter scale --filter loudnorm --encoder libx264 --hwaccel videotoolbox
    ```
    
    Named checks report each capability as present or absent. Exit code `1` means a required tool/probe failed; `2` means a requested capability is absent from a usable inventory. Add `--json` for machine-readable output.
    
    Run the complete synthetic integration example in a new or empty task-local directory:
    
    ```sh
    scripts/editorial-workflow-example /tmp/ffmpeg-editorial-example --json
    ```
    
    The resulting acceptance report passes only the exercised component and integration checks; semantic, listening, and downstream-consumer boundaries remain explicitly unverified.
    
    Generate the richer real-media test battery when a change needs timestamp, concat, audio, subtitle, or bounded visual evidence:
    
    ```sh
    scripts/generate-media-fixtures /tmp/ffmpeg-fixtures --json
    ```
    
    Generated media remains task-local; commit the generator and test assertions, not the binary outputs.
    
    Produce measured audio evidence and a reviewable plan without changing the source:
    
    ```sh
    scripts/audio-inspect input.wav \
      --measure-silence --silence-threshold=-45dB --silence-duration 0.7 \
      --measure-loudness --measure-clipping --json
    ```
    
    Optional timed transcript JSON must disclose alignment quality. Detector intervals and transcript ranges remain candidates until listening review approves an edit.
    
    Evaluate a rendered output against declared criteria:
    
    ```sh
    scripts/media-verify acceptance-contract.json output-probe.json \
      --evidence review-evidence.json --json
    ```
    
    Missing fields or review evidence remain `UNVERIFIED`; blocked reviews remain `BLOCKED`; local probe/decode success never supplies downstream compatibility evidence.
    
    Prepare visual evidence around proposed edit boundaries without exposing the source path:
    
    ```sh
    ffmpeg/scripts/vision-review-handoff private.mov --asset-id asset-017 \
      --question "Does the sampled boundary preserve title continuity?" \
      --timestamp 12.4 --neighbor-seconds 0.25 --output-dir review-packet --json
    ```
    
    The manifest covers only its listed samples. An authorized reviewer must add attributed observations before `import-vision-review` can link them to an EDL; sparse frames never prove absence throughout a video.
    
    For destination-specific delivery, evaluate a sourced target contract and preserve target evidence separately:
    
    ```sh
    ffmpeg/scripts/target-compatibility target.json output-probe.json \
      --target-evidence target-result.json --json
    ```
    
    The verdict applies only to the named target and version. A local FFmpeg decode pass does not substitute for import, playback, or ingest evidence from that consumer.
    
    ## Triggers
    
    Load this skill for:
    
    - Media intake, FFprobe manifests, stream/container/timestamp inspection, or output contracts
    - Remuxing, transcoding, filtering, trimming, joining, extraction, subtitles, or synchronization
    - Bounded review-frame or audio-evidence preparation from supplied/authorized local media
    - Transcript-assisted video edits, reviewable EDLs, or deterministic render plans
    - Podcast cutting, silence/noise analysis, loudness measurement, and audio cleanup
    - Build capability checks, overwrite-safe batch work, output verification, or failure diagnosis
    
    Use another capability first for online media/transcript acquisition, semantic image interpretation, HTML-authored HyperFrames composition, platform publishing/API work, DRM, or rights clearance.
    
    ## Requirements
    
    - `ffmpeg` and `ffprobe` on `PATH` for execution
    - A shell with careful filename and filter-expression quoting
    - A vision-capable or human reviewer for semantic claims about extracted images
    - Listening playback for editorial audio acceptance
    - Network access only for linked documentation or an explicitly requested network protocol
    - Hardware acceleration only with the relevant device, drivers, compiled support, and a verified end-to-end path
    
  • SKILL.md 11.7 KB
    ---
    name: ffmpeg
    description: >-
      Use this skill for local FFmpeg/FFprobe media inspection, remuxing, transcoding,
      filtering, evidence-bounded video review, transcript-assisted editorial plans,
      edit decision lists, podcast/audio cleanup, rendering, and output acceptance.
      It emphasizes explicit stream selection, source preservation, build-aware commands,
      bounded evidence, and verified new outputs. Do not use it for libav API programming,
      opaque whole-video understanding, automatic publishing, rights clearance, DRM
      circumvention, professional broadcast/color certification, or HyperFrames-authored
      compositions; route those tasks to their owning capabilities.
    license: MIT
    compatibility: Requires ffmpeg and ffprobe for execution; exact filters, codecs, protocols, and hardware backends vary by build and version.
    ---
    
    # FFmpeg Expert
    
    Treat FFmpeg as a typed media pipeline and media editing as an evidence-driven workflow. Inspect the actual source, separate measurements from interpretations, make decisions reviewable, render to a new path, and verify at the intended boundary.
    
    ## When Not to Use
    
    - Do not use this skill for libav API programming, opaque whole-video semantic understanding, automatic publishing, rights clearance, DRM circumvention, professional broadcast/color certification, or HyperFrames-authored compositions.
    - Route online media or transcript acquisition to the owning source skill, semantic frame interpretation to a vision-capable reviewer, and platform upload/API work to the platform skill.
    
    ## Boundaries and Routing
    
    - Use a YouTube/transcript capability to acquire online video or transcripts; return here only for local supplied media and transcript artifacts.
    - Use HyperFrames for HTML-authored motion graphics or composition; use this skill to inspect and preprocess its media inputs or verify rendered outputs.
    - Use the named platform skill for upload, publishing, account, or API operations.
    - FFmpeg can extract bounded frames and audio segments but does not interpret their semantic content. Route visual interpretation to a vision-capable reviewer and preserve its observations as attributed evidence.
    - Do not infer rights, consent, identity, intent, or whole-program meaning from technical metadata, sparse frames, silence intervals, or an unaligned transcript.
    
    ## Evidence Classes
    
    Label consequential claims so unlike evidence is not blended:
    
    - **Technical contract** — behavior documented by an official FFmpeg or standards source.
    - **Observed artifact** — probe output, measured signal result, extracted frame, listened segment, or downstream test from this source/output.
    - **Reproducible experiment** — exact version, input identity/generator, command, result, and limits.
    - **Editorial heuristic** — a reversible judgment that requires human review, not a fact established by FFmpeg.
    - **User requirement** — the requested output contract, preservation policy, and acceptance threshold.
    
    ## Media Editing Loop
    
    1. **Intake.** Confirm authorization and privacy boundaries; identify every source; use a private workspace copy of `templates/media-intake.json` to record probe evidence, timing, the output contract, preservation policy, and unresolved assumptions. Keep raw probe output and media in the restricted task workspace, and minimize any shareable derivative.
    2. **Inspect.** Probe streams and format. Check required local capabilities with inventories or `scripts/ffmpeg-preflight`; never assume a filter, encoder, or hardware backend exists.
    3. **Collect bounded evidence.** Extract only the frames, clips, waveform/signal measurements, or transcript spans needed for the decision. Record sample timestamps, count, byte/size limits, and the statement that samples cover sampled times only.
    4. **Plan before rendering.** For editorial changes, write a reviewable EDL or podcast edit plan. Every consequential cut needs a source range, reason, evidence, confidence, treatment, mapping, and verification state. Leave ambiguous decisions unresolved rather than improvising.
    5. **Render safely.** Make stream mapping explicit; prefer `-n` and a new output path; avoid untrusted shell concatenation. Distinguish keyframe-limited stream copy from decoded/re-encoded precise cuts.
    6. **Verify in layers.** Check exit status, decodeability, output probe, stream/timing contract, bounded frame/audio evidence, editorial review, and the actual downstream consumer as applicable. Treat probe/decode success and destination acceptance as separate gates; a local file can pass the former and fail the latter.
    7. **Accept or stop.** Use a private workspace copy of `templates/media-acceptance-report.md` to record pass/fail/blocked per criterion. A valid container or successful command alone is not acceptance.
    
    Start technical inspection with:
    
    ```sh
    ffprobe -v error -show_format -show_streams -of json INPUT
    ```
    
    For shipped helper workflows, run the helper from the skill root with explicit output paths and limits; treat its JSON result as a report to verify, not as acceptance by itself. When using `extract-review-frames`, pass timestamps as separate values (`--timestamps 0 5 9`), not one comma-separated value.
    
    ## Route to the Focused Reference
    
    ### Evidence-driven media work
    
    - Read `references/media-intake-and-manifest.md` before handling supplied/generated media, sensitive material, multiple sources, or a defined delivery contract.
    - Read `references/video-inspection-and-visual-evidence.md` when extracting or reviewing frames/clips, choosing samples, or making visual claims.
    - Read `references/editorial-video-editing.md` for transcript-assisted selection, sequencing, pacing, transitions, overlays, and reviewable editorial decisions.
    - Read `references/audio-and-podcast-editing.md` for podcast cuts, signal cleanup, silence/noise analysis, loudness measurement, and listening gates.
    - Read `references/ffmpeg-edit-decision-lists.md` before creating, validating, or turning an EDL into a command plan.
    - Read `references/media-verification-and-acceptance.md` before declaring an output complete or compatible.
    - Read `references/media-failure-modes.md` when evidence is contradictory, a cut drifts, a filter is missing, review samples are sparse, or a workflow repeatedly fails.
    - Read `references/media-research-source-index.md` when supporting claims, refreshing version-sensitive guidance, or recording a technical experiment.
    - Read `references/editorial-workflow-example.md` when proving that intake, evidence, EDL, rendering, and acceptance artifacts compose end to end on a synthetic fixture.
    - Read `references/synthetic-media-fixtures.md` when a change needs bounded real-media fixtures for cuts, cadence, concat, audio, subtitles, or visual-boundary sampling.
    
    ### Core FFmpeg work
    
    - Read `references/core-model-and-command-anatomy.md` for containers, streams, codecs, option scope, mapping, copy/transcode, and timestamps.
    - Read `references/filters-and-transformations.md` for filtergraphs, labels, audio/video processing, and incremental graph debugging.
    - Read `references/intermediate-workflows.md` for seeking, trimming, concat, metadata, subtitles, batching, pipes, and streaming.
    - Read `references/advanced-operations-and-safety.md` for hardware acceleration, synchronization, reproducibility, network safety, and failure boundaries.
    - Read `references/command-cookbook.md` only after inspection and capability checks; every recipe is conditional.
    - Read `references/learning-summary.md` for the newcomer-first mental model.
    - Read `references/source-inventory.md` for the original FFmpeg source survey and `references/local-verification.md` only for its explicitly host-specific FFmpeg 8.1.2 observations.
    
    ## Templates
    
    - `templates/media-intake.json` — source identities, probes, contract, privacy, preservation, assumptions
    - `templates/edit-decision-list.json` — reviewable source ranges and treatments
    - `templates/video-inspection-report.md` — technical inspection and bounded evidence ledger
    - `templates/visual-review-packet.md` — attributed frame/clip observations and coverage limits
    - `templates/vision-review-observations.json` — parseable attributed observation block for a prepared packet
    - `templates/podcast-edit-plan.md` — mechanical, signal, and editorial audio decisions
    - `templates/media-acceptance-report.md` — layered verification and criterion verdicts
    - `templates/media-acceptance-contract.json` — machine-readable stream, format, evidence, loudness, and downstream requirements
    - `templates/target-compatibility-manifest.json` — one named target, sourced requirements, technical constraints, and downstream lane
    - `templates/research-experiment-record.md` — reproducible version/command/result record
    
    Run `scripts/editorial-workflow-example` in a new or empty task-local directory when a reproducible synthetic integration proof is required. Its `PASS_WITH_UNVERIFIED_BOUNDARIES` result is deliberately narrower than editorial or destination acceptance.
    
    Run `scripts/generate-media-fixtures` when tests need deterministic non-personal media. Keep its generated binaries and manifest in the task workspace; commit the generator and assertions, not the outputs.
    
    Use `scripts/render-edl` for a non-executing single- or multi-source plan. Default to decoded concat-filter assembly; select concat-demuxer stream copy only with matching probe-derived signatures and verified packet/keyframe boundaries. Unsupported transitions must remain explicit errors.
    
    Use `scripts/audio-inspect` for bounded silence, EBU R128, peak/clipping, and transcript-alignment evidence. Request each measurement explicitly, preserve unavailable filters as `UNAVAILABLE`, and treat every interval or transcript range as a listening-review candidate. Its optional report output refuses overwrite.
    
    Use `scripts/media-verify` with a declared acceptance contract, output FFprobe JSON, and optional evidence JSON. It reports every criterion independently as `PASS`, `FAIL`, `BLOCKED`, `UNVERIFIED`, or `NOT_APPLICABLE`; only a report with no failed or missing required evidence is an overall pass.
    
    Use `scripts/target-compatibility` when acceptance names a real player, editor, host, archive, or service. Keep sourced technical requirements and local probe results separate from evidence produced by that exact consumer; a pass applies only to the named target/version.
    
    Use `scripts/vision-review-handoff` to prepare bounded, privacy-safe frame packets for an authorized human or vision reviewer. Import only attributed reviewed observations with `scripts/import-vision-review`; treat proposed editorial consequences as evidence for review, never automatic decisions.
    
    Copy a template into the task workspace and replace its placeholder/example values. Do not put private paths, media, transcripts, or review evidence in the public skill repository.
    
    ## Non-Negotiable Checks
    
    - Make stream selection explicit whenever multiple inputs/tracks or a complex graph are involved.
    - Treat option order as significant: options generally apply to the next input or output.
    - Do not call silence useless; `silencedetect` reports threshold crossings, not editorial value.
    - Claim loudness, clipping, timing, or keyframe status only from an available measurement method and retain its output.
    - A transcript is evidence only for its text and supplied timing quality; spot-check alignment against media before frame-accurate edits.
    - Stop for review when evidence is sparse, ambiguity could remove meaningful content, an optional tool/filter is absent, privacy/authorization is unclear, or two materially different approaches fail.
    
    ## Completion
    
    Finish only when the requested artifact exists at a new path, required probes and bounded reviews are recorded, the output has been exercised at the relevant downstream boundary, and every acceptance criterion is passed or explicitly blocked. Report untested claims and remaining assumptions instead of filling gaps with plausible output.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.