FFmpeg fundamentals for video/audio manipulation. Covers common operations (trim, concat, convert, extract), codec selection, filter chains, and performance optimization. Use when planning or executing video processing tasks.
View on GitHubFebruary 5, 2026
Select agents to install to:
npx add-skill https://github.com/MadAppGang/claude-code/blob/main/plugins/video-editing/skills/ffmpeg-core/SKILL.md -a claude-code --skill ffmpeg-coreInstallation paths:
.claude/skills/ffmpeg-core/plugin: video-editing updated: 2026-01-20 # FFmpeg Core Operations Production-ready patterns for video and audio manipulation using FFmpeg. ## System Requirements - **FFmpeg** (5.0+ recommended) - Verify installation: `ffmpeg -version` - For hardware acceleration: check `ffmpeg -hwaccels` ### Cross-Platform Installation **macOS:** ```bash brew install ffmpeg ``` **Linux (Ubuntu/Debian):** ```bash sudo apt update && sudo apt install ffmpeg ``` **Linux (Fedora/RHEL):** ```bash sudo dnf install ffmpeg ``` **Windows:** ```bash # Using Chocolatey choco install ffmpeg # Or download from https://ffmpeg.org/download.html ``` ## Common Operations Reference ### 1. Video Information Extract metadata and stream information: ```bash # Get full metadata ffprobe -v quiet -print_format json -show_format -show_streams "input.mp4" # Get duration only ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "input.mp4" # Get resolution ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=s=x:p=0 "input.mp4" ``` ### 2. Trimming and Cutting ```bash # Trim by time (fast, no re-encoding) ffmpeg -ss 00:01:30 -i input.mp4 -to 00:02:45 -c copy output.mp4 # Trim with re-encoding (frame-accurate) ffmpeg -ss 00:01:30 -i input.mp4 -to 00:02:45 -c:v libx264 -c:a aac output.mp4 # Extract specific segment by frames ffmpeg -i input.mp4 -vf "select=between(n\,100\,500)" -vsync vfr output.mp4 ``` ### 3. Concatenation ```bash # Using concat demuxer (same codecs required) # First create file list: # file 'clip1.mp4' # file 'clip2.mp4' # file 'clip3.mp4' ffmpeg -f concat -safe 0 -i filelist.txt -c copy output.mp4 # Using concat filter (different codecs, re-encodes) ffmpeg -i clip1.mp4 -i clip2.mp4 -filter_complex "[0:v][0:a][1:v][1:a]concat=n=2:v=1:a=1" output.mp4 ``` ### 4. Format Conversion ```bash # MP4 to MOV (ProRes for FCP) ffmpeg -i input.mp4 -c:v prores_ks -profile:v 3 -c:a pcm_s16le output.mov # Any to H.264 MP4 (w