agentleFS
fralapofralapo/awesome-agent-skills/skills/ffmpeg/SKILL.md

ffmpeg

Skill1 starsChanged 5 days agoMITView on GitHub

Complete FFmpeg reference and toolkit, distilled from the official FFmpeg documentation (ffmpeg/ffplay/ffprobe + codecs, formats, filters, protocols, devices, libraries). Use when building or debugging FFmpeg command lines: transcoding, remuxing, stream copy, cutting/trimming, concatenation, scaling/cropping/padding, frame-rate and pixel-format conversion, audio resampling/mixing, filtergraphs (-vf/-af/-filter_complex), overlays, drawtext/subtitles burn-in, HLS/DASH segmenting, screen/webcam capture, piping, hardware accel (NVENC/QSV/VAAPI/VideoToolbox), and choosing encoder options (libx264/libx265/aac/libmp3lame/etc.). Keywords - ffmpeg, ffplay, ffprobe, transcode, remux, filtergraph, vf, af, filter_complex, map, stream specifier, codec, muxer, demuxer, hls, scale, overlay, concat, crf, bitrate, gop, pix_fmt.

25 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use awwwards-animations, explainer-video-guide and 4 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • wendymardigian-progSkill

    awwwards-animations

    Professional React animation skill for creating Awwwards/FWA-level animations using GSAP (useGSAP), Motion (Framer Motion), Anime.js, and Lenis. Use when building premium scroll experiences, custom cursors, page transitions, text animations, parallax effects, micro-interactions, or any animation that needs to be 60fps and award-worthy. Triggers on requests for smooth scroll, ScrollTrigger, magnetic effects, reveal animations, horizontal scroll, pin sections, stagger effects, useScroll, useTransform, integration with Three.js/WebGL, algorithmic art, mathematical art, generative art, fractals, L-systems, flow fields, strange attractors, sacred geometry, geometric puzzles, Dudeney dissections, tangram, tessellations, Penrose tiles, kinetic typography, glitch effects, text explosion, morphing text, circular text, brutalist design, minimalist animation, neo-brutalism, or design philosophy mixing. React-first approach with proper cleanup and hooks.

    Also in 3 projects that use this

  • wendymardigian-progSkill

    explainer-video-guide

    Explainer video production guide: scripting, voiceover, visuals, and assembly. Covers script formulas, pacing rules, scene planning, and multi-tool pipelines. Use for: product demos, how-it-works videos, onboarding videos, social explainers. Triggers: explainer video, how to make explainer, product video, demo video, video production, video script, animated explainer, product demo video, tutorial video, onboarding video, walkthrough video, video pipeline

    Also in 3 projects that use this

  • freshtechbroSkill

    animated-component-libraries

    Pre-built animated React component collections combining Magic UI (150+ TypeScript/Tailwind/Motion components) and React Bits (90+ minimal-dependency animated components). Use this skill when building landing pages, marketing sites, dashboards, or interactive UIs requiring pre-made animated components instead of hand-crafting animations. Triggers on tasks involving animated UI components, Magic UI, React Bits, shadcn/ui integration, Tailwind CSS components, or component library selection. Alternative to manually implementing animations with Framer Motion or GSAP.

    Also in 3 projects that use this

  • ncklrsSkill

    motion-designer

    Advanced motion designer with decades of After Effects and motion graphics experience, specialized in creating engaging video specifications for Remotion. Use when creating video specs, planning motion graphics, designing animations, or when asked to "create a video", "design motion graphics", "plan video content", or "spec out a video". Produces detailed scene-by-scene specifications with timing, audio, sound effects, and animation descriptions.

    Also in 3 projects that use this

  • OpenAISkill

    remotion-render

    Export a Remotion video

    Also in 3 projects that use this

  • VercelSkill

    remotion-best-practices

    Best practices for Remotion - Video creation in React

    Also in 6 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 23 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    6. -ss placement: Before -i = fast input seek (keyframe-snapped, very fast).

    line 48

“Common” is measured: kept by at least 6 in 10 of the 23 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

FFmpeg — Reference & Command Toolkit

FFmpeg is a universal media converter: it reads any number of inputs (files, pipes, network streams, capture devices), filters and transcodes them, and writes any number of outputs. This skill is a practitioner's toolkit for constructing correct command lines fast and knowing which option, codec, or filter to reach for.

The full official source text ships with this skill at reference/FFmpeg-Complete-Documentation.md (~1.9 MB). This skill extracts the structure; grep that file or the chapter files for exhaustive option lists.

How to Use This Skill

  • No arguments — load the core mental model + the cheatsheet of common commands.
  • A task — "trim without re-encoding", "burn subtitles", "capture screen" → I map it to a pattern in patterns.md / cheatsheet.md.
  • A topic — "filters", "codecs", "hls", "protocols" → I read the matching chapters/ file before answering.
  • A name — a specific filter/encoder (e.g. scale, libx264) → grep the chapter for exact options.

Core Mental Model (read this first)

1. Command anatomy — order matters.

ffmpeg [global_opts] {[input_opts] -i INPUT}... {[output_opts] OUTPUT}...

Options apply to the next file specified. Put input options (e.g. -ss, -f, -r, -framerate) before the -i they modify; output options before the output URL. Global options (e.g. -y, -loglevel) go first. Anything not parsed as an option is treated as an output URL.

2. Indices & stream specifiers. Inputs/streams are 0-based. -map 0:v:0 = first video stream of input 0. Stream specifier forms: :v :a :s (type), :0 (index), :v:0, :m:language:eng (metadata), :p:1 (program). Used by -map, -c:, -b:, -metadata:, etc.

3. The fundamental choice: stream copy vs transcode.

  • -c copy → remux/cut with no re-encode (instant, lossless, but cuts land on keyframes only).
  • omit / -c:v libx264 -c:a aac → re-encode (slow, lossy, frame-accurate, enables filters).
  • You cannot apply filters to a copied stream.

4. Quality knobs (re-encoding).

  • CRF (constant quality, 1-pass): -crf 23 for x264/x265 (lower = better, ~18–28 sane). Preferred default.
  • Bitrate (target size): -b:v 4M; add -maxrate/-bufsize for caps; 2-pass for streaming targets.
  • Preset: -preset slow trades CPU for compression (x264/x265: ultrafast…placebo).

5. Filtering.

  • -vf / -af = simple linear filtergraph (one input→one output, single stream).
  • -filter_complex = multi-input/multi-output graphs; reference pads with [label]. Required for overlay, concat of differing streams, mixing, split.
  • Graph syntax: filter=arg=val:arg2=val2, next. Chains separated by ,; parallel chains by ;.

6. -ss placement. Before -i = fast input seek (keyframe-snapped, very fast). After -i (output opt) = slow decode-then-discard but exact. With -c copy, cuts snap to keyframes regardless.

7. Diagnose with ffprobe. ffprobe -v error -show_streams -show_format in.mp4. Add -of json/-of csv for machine output. ffplay for quick visual check (ffplay -vf ... in).


Chapter Index

#FileCovers
01ch01-cli-toolsffmpeg/ffplay/ffprobe invocation, option ordering, loglevel
02ch02-stream-selection-mappingstream specifiers, automatic selection, -map
03ch03-options-referencemain/video/audio/subtitle/advanced options
04ch04-codecsencoders/decoders, libx264/265, NVENC, aac, mp3 options
05ch05-formatsmuxers/demuxers: mp4, matroska, hls, dash, segment, concat, image2
06ch06-filtersfiltergraph syntax, key video/audio filters, hw filters
07ch07-protocolsfile, pipe, http(s), tcp/udp, rtmp, rtp, srt, tee
08ch08-devicescapture/output: gdigrab, dshow, x11grab, v4l2, avfoundation
09ch09-utils-scaler-resamplersyntax (time/eval/color), swscale, swresample options
10ch10-libraries-generallibav* overview, supported formats, platform notes, FAQ

Topic Index

  • trim / cut / seek → ch01, ch03, patterns
  • stream copy / remux → ch02, ch04, cheatsheet
  • map / stream selection → ch02
  • CRF / bitrate / 2-pass / preset → ch04
  • x264 / x265 / hevc / NVENC / QSV / VAAPI → ch04, ch06
  • aac / mp3 / opus / audio bitrate → ch04
  • scale / crop / pad / fps / pix_fmt / format → ch06
  • overlay / concat / split / xfade / hstack → ch06, patterns
  • drawtext / subtitles / burn-in → ch06, patterns
  • amix / amerge / pan / volume / loudnorm → ch06
  • HLS / DASH / segment / live streaming → ch05, ch07, patterns
  • rtmp / srt / udp / tee / piping → ch07, patterns
  • screen capture / webcam / record → ch08, patterns
  • images ↔ video / thumbnails / gif → ch05, ch06, patterns
  • ffprobe / inspect / metadata → ch01, ch03

Supporting Files

  • cheatsheet.md — copy-paste commands for the 90% cases
  • patterns.md — task recipes with the why and trade-offs
  • glossary.md — terms, options, and acronyms

Scope & Limits

Distilled from the official docs; for the exhaustive per-filter / per-encoder option list, grep the chapter files or the bundled reference/FFmpeg-Complete-Documentation.md. Option availability depends on how the local FFmpeg build was compiled (ffmpeg -encoders, -filters, -protocols, -buildconf to verify). Hardware-accel paths depend on drivers/OS.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.