mindmorass avatar

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-code

Installs 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

More from mindmorass/reflex

All 3
1rysweet avatarlearning-path-builderrysweet/amplihackCreates personalized learning paths for technologies, frameworks, or concepts. Use for user-interactive session only for onboarding new technologies, hackathon 342skills.sh installs
2sharpdeveye avatarfortifysharpdeveye/maestroUse when the workflow lacks error handling, has been failing in production, or needs retry logic, fallback strategies, and circuit breakers.342skills.sh installs
3sharpdeveye avatariteratesharpdeveye/maestroUse when the workflow needs to self-correct, improve over time, or establish feedback loops and evaluation cycles.341skills.sh installs
4szeyu avatarexam-prepszeyu/vibe-study-skillsComprehensive exam preparation strategies and materials. Creates study schedules, review sheets, practice tests, and identifies weak areas. Use when preparing f341skills.sh installs
5jezweb avatarcloudflare-queuesjezweb/claude-skillsBuild async message queues with Cloudflare Queues for background processing. Use when: handling async tasks, batch processing, implementing retries, configuring339skills.sh installs
6pedronauck avatardrizzle-safe-migrationspedronauck/skillsProduction-safe Drizzle migration workflow for schema changes that require data backfills or constraint tightening. Use when changing enums/check constraints/de339skills.sh installs