ffmpeg-medialisted
Install: claude install-skill HCvCH/claude-auto-kit
# ffmpeg Media
ffmpeg does the mechanical work; creative decisions stay in `video-pipeline` and Phase 8 of `project-pipeline`.
## Before running anything
1. Check that ffmpeg exists: `ffmpeg -version`. If it's missing, say so and give the install command for the user's OS (Windows: `winget install --id Gyan.FFmpeg -e`). Don't install it yourself.
2. Inspect the input first: `ffprobe -v error -show_entries format=duration:stream=codec_name,width,height,r_frame_rate -of compact INPUT`.
3. Never overwrite the input. Write to `./out/` with a descriptive name.
4. On Windows PowerShell, quote paths with spaces in double quotes and use `^`-free single-line commands.
## Recipes
| Task | Command |
|---|---|
| Trim without re-encoding (fast, cuts on keyframes) | `ffmpeg -ss 00:00:05 -to 00:00:20 -i in.mp4 -c copy out/trim.mp4` |
| Trim frame-accurate | `ffmpeg -ss 00:00:05 -to 00:00:20 -i in.mp4 -c:v libx264 -crf 18 -c:a aac out/trim.mp4` |
| Concatenate same-codec clips | write `list.txt` with `file 'a.mp4'` lines, then `ffmpeg -f concat -safe 0 -i list.txt -c copy out/joined.mp4` |
| Reframe 16:9 → 9:16 (center crop) | `ffmpeg -i in.mp4 -vf "crop=ih*9/16:ih,scale=1080:1920" -c:a copy out/vertical.mp4` |
| 9:16 with blurred background (no crop) | `ffmpeg -i in.mp4 -filter_complex "[0:v]scale=1080:1920:force_original_aspect_ratio=increase,crop=1080:1920,boxblur=20[bg];[0:v]scale=1080:-2[fg];[bg][fg]overlay=(W-w)/2:(H-h)/2" -c:a copy out/vertical-blur.mp4` |
| Burn subtitles | `ffm