How rendi-api/ffmpeg-cheatsheet works
1. Repo type and boundary
- This is a documentation-first FFmpeg knowledge base, not an application or service.
- The architectural boundary is a curated set of Markdown assets that teach and standardize media-processing command patterns for humans and LLMs.
2. Top-level entry point
- README.md is the main landing page and acts like the product overview.
- It contains the full cheat sheet: concepts, categorized examples, caveats, and links to upstream FFmpeg references.
- For architecture purposes, treat this as the primary “index” into the knowledge system.
3. Skill module layout
- skills/ffmpeg/SKILL.md is a domain-specific skill package.
- The skills/ffmpeg folder indicates the repo is organized for agent consumption: a skill description plus supporting references.
- This suggests a clear separation between the broad cheat sheet and reusable skill-oriented guidance.
4. Reference layer
- skills/ffmpeg/references/command-patterns.md is a supporting reference artifact.
- Its role is likely to hold reusable command templates or canonical patterns, complementing the narrative examples in the README.
- This is the closest thing in the repo to a “shared library” of FFmpeg usage patterns.
5. Functional content domains
- The README is organized into major media-processing subsystems:
- simple editing and remuxing
- resizing, padding, and aspect-ratio management
- audio extraction, replacement, mixing, and fading
- advanced time-based editing and jump cuts
- overlays, subtitles, and compositing
- asset generation like thumbnails, GIFs, storyboards, and slideshows
- encoding settings and GPU acceleration
- These are not code modules, but they are the architectural domains of the knowledge base.
6. Core data flow model
- Most examples follow the same pipeline shape:
- one or more input media assets
- FFmpeg filters / filter graphs
- optional stream mapping
- encoding or stream copy
- a generated output file in a target container/codec
- Multi-input compositions use filter_complex and often split into parallel branches before recombining.
7. External dependencies and execution environment
- The repo assumes a local or scripted environment with the FFmpeg CLI and sometimes ffprobe.
- Sample commands reference remote assets on storage.rendi.dev, so the examples depend on network-accessible media.
- Some commands also depend on local assets like fonts, subtitle files, and images when using fontfile=, textfile=, or burned subtitles.
8. Key technical boundaries
- The README emphasizes the difference between stream copy/remuxing and re-encoding.
- It also distinguishes input seeking vs. output seeking, and when -c copy is safe or unsafe.
- These are important architectural boundaries because they determine whether a command is a low-cost container transform or a CPU-heavy transcoding pipeline.
9. Output and delivery concerns
- The examples cover production-oriented media outputs: MP4, MKV, MOV, WEBM, GIF, PNG/JPG thumbnails, and subtitle-bearing files.
- Encoding settings such as CRF, preset, yuv420p, faststart, and GPU encoders materially affect compatibility, startup behavior, and file size.
- In diagram form, these are the “delivery/packaging” concerns at the end of the media pipeline.
10. Audience and usage pattern
- The repo is designed for copy/paste execution and LLM-assisted exploration.
- Users are expected to browse the Markdown, search for a pattern, adapt a command, and run it locally.
- That makes the repo a knowledge repository with a strong “recipe” structure rather than a program with runtime control flow.
11. Operational style
- There is no evidence of build tooling, tests, or deployment infrastructure in the tree.
- The architecture is therefore intentionally lightweight: documentation, references, and executable command examples.
- The primary integration points are external FFmpeg docs, community references, and downloadable sample media, not internal services.
12. Best diagram framing
- Draw it as a documentation/skill system with:
- a root cheat sheet entry point
- a skill-specific FFmpeg module
- a small reference appendix
- external dependencies on FFmpeg, sample media hosts, and upstream documentation
- The main flow is “reference content -> adapted FFmpeg command -> local execution -> media output.”
Main entry points: README.md README · SKILL.md FFmpeg Skill · command-patterns.md Command Patterns
Components 16
Documentation
Top-level cheat sheet and human-readable guidance
- README · Primary landing page with concepts, categorized examples, and caveats.
README.md - Edit & Remux · Low-cost trimming, stream copy, and simple container edits.
- Resize & Pad · Sizing, padding, and aspect-ratio management.
- Audio Ops · Extraction, replacement, mixing, fading, and audio-focused transforms.
- Timeline FX · Advanced time-based editing, jump cuts, and multi-branch filter graphs.
- Overlays & Subs · Overlaying images, subtitles, and other layered compositing tasks.
- Assets · Thumbnails, GIFs, storyboards, slideshows, and other generated assets.
- Encoding & GPU · Codec settings, CRF, presets, faststart, pixel format, and hardware acceleration.
Skill Module
Agent-oriented FFmpeg skill package
- FFmpeg Skill · Domain-specific skill guidance for agent consumption.
skills/ffmpeg/SKILL.md
References
Reusable command patterns and canonical examples
- Command Patterns · Reusable FFmpeg command templates and canonical usage patterns.
skills/ffmpeg/references/command-patterns.md
External Dependencies
Tools, media sources, and upstream documentation used by the examples
- FFmpeg CLI · Core command-line tool used to transcode, remux, filter, and generate media.
- ffprobe · Auxiliary CLI used to inspect streams and media properties.
- Sample Media · Remote example inputs referenced by the cheat sheet commands.
- Local Assets · Fonts, subtitle files, and images required by some overlay and burn-in examples.
- Upstream Docs · Official FFmpeg documentation and related external references.
Media Outputs
Common delivery artifacts produced by the commands
- Media Files · Produced MP4, MKV, MOV, WEBM, GIF, and image outputs.
Connections 24
- README → FFmpeg Skill: complements · The cheat sheet and the skill package reinforce each other.
- FFmpeg Skill → Command Patterns: uses · Skill guidance draws on reusable command templates.
- README → Edit & Remux: covers · Documentation section for trimming and remuxing.
- README → Resize & Pad: covers · Documentation section for sizing and aspect ratio handling.
- README → Audio Ops: covers · Documentation section for audio extraction, mixing, and replacement.
- README → Timeline FX: covers · Documentation section for time-based edits and multi-input filtering.
- README → Overlays & Subs: covers · Documentation section for overlays, subtitles, and compositing.
- README → Assets: covers · Documentation section for generated media assets.
- README → Encoding & GPU: covers · Documentation section for codec and compatibility settings.
- Command Patterns → FFmpeg CLI: targets · Patterns are meant to be executed with the FFmpeg CLI.
- README → FFmpeg CLI: examples use · Commands in the cheat sheet assume FFmpeg is installed locally.
- README → ffprobe: inspects with · Some workflows rely on media inspection before editing or encoding.
- README → Sample Media: references · Examples pull inputs from remote sample media hosts.
- README → Local Assets: depends on · Certain overlays and burn-ins require local fonts, subtitles, or images.
- README → Upstream Docs: links to · The cheat sheet points to official FFmpeg references.
- Edit & Remux → FFmpeg CLI: executes via · Simple remux/edit commands run through the CLI.
- Resize & Pad → FFmpeg CLI: executes via · Frame and aspect transforms are applied through FFmpeg filters.
- Audio Ops → FFmpeg CLI: executes via · Audio processing uses FFmpeg stream selection and filters.
- Timeline FX → FFmpeg CLI: executes via · Complex edits are implemented with filter graphs and mapping.
- Overlays & Subs → FFmpeg CLI: executes via · Compositing workflows are encoded as filter chains.
- Assets → FFmpeg CLI: executes via · Derived assets are produced by FFmpeg rendering and encoding.
- Encoding & GPU → FFmpeg CLI: controls · Encoding settings configure the final media pipeline.
- Edit & Remux → Media Files: produces · Remuxing and editing create packaged media files.
- Encoding & GPU → Media Files: delivers · Codec choices and container settings determine final deliverables.