
Ffmpeg Patterns
This is your reference guide when you need to wrangle video or audio with FFmpeg and can't remember the exact flag incantation. It covers the common patterns: transcoding to different formats, extracting clips, resizing with proper aspect ratios, adding watermarks, normalizing audio, concatenating files, generating HLS streams, and batch processing entire directories. The examples are copy-paste ready with actual parameters instead of placeholders. Especially useful for the tricky stuff like speed adjustments with audio sync, multi-bitrate streaming setups, and hardware acceleration flags. Keep it open when you're doing media processing so you're not constantly searching Stack Overflow for the difference between setpts and atempo.
- skills.sh installs
- 342
- GitHub stars
- 2
- last updated
- Aug 21, 2026
Install
$ npx -y skills add mindmorass/reflex --skill ffmpeg-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Files
FFmpeg Patterns
Best practices for video and audio processing with FFmpeg.
Basic Operations
Transcode Video
# Convert to MP4 (H.264 + AAC)
ffmpeg -i input.mov -c:v libx264 -preset medium -crf 23 \
-c:a aac -b:a 128k output.mp4
# Convert to WebM (VP9 + Opus)
ffmpeg -i input.mp4 -c:v libvpx-vp9 -crf 30 -b:v 0 \
-c:a libopus -b:a 128k output.webm
# Convert to HLS for streaming
ffmpeg -i input.mp4 -codec: copy -start_number 0 \
-hls_time 10 -hls_list_size 0 -f hls output.m3u8
Extract Audio
# Extract audio to MP3
ffmpeg -i video.mp4 -vn -acodec mp3 -ab 192k audio.mp3
# Extract audio to WAV (uncompressed)
ffmpeg -i video.mp4 -vn -acodec pcm_s16le audio.wav
# Extract audio from specific time range
ffmpeg -i video.mp4 -ss 00:01:00 -t 00:00:30 -vn audio.mp3
Trim and Cut
# Cut from timestamp to duration
ffmpeg -i input.mp4 -ss 00:01:30 -t 00:02:00 -c copy output.mp4
# Cut from start to end timestamp
ffmpeg -i input.mp4 -ss 00:01:30 -to 00:03:30 -c copy output.mp4
# Fast seek (put -ss before -i for large files)
ffmpeg -ss 00:10:00 -i large_video.mp4 -t 00:05:00 -c copy clip.mp4
Video Filters
Sponsors
Details
- Repository
- github.com/mindmorass/reflex
- Categories
- Automation & Workflows, Generative Media, Video & Audio Editing
- First seen
- Jun 3, 2026