Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Video/audio/image processing with FFmpeg and ImageMagick. Tools: FFmpeg (video/audio), ImageMagick (images). Capabilities: format conversion, encoding (H.264/H.265/VP9/AV1), streaming (HLS/DASH), filters, effects, thumbnails, watermarks, batch processing, hardware acceleration (NVENC/QSV). Actions: convert, encode, resize, crop, compress, extract, merge, stream, transcode media. Keywords: FFmpeg, ImageMagick, video encoding, audio extraction, image resize, thumbnail, watermark, HLS, DASH, H.264,
.claude/skills/nicepkg-media-processing/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 232% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 161% | 0% |
| case-18 | ✓→✓ | = Same ✓ | 177% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 172% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 337% | 0% |
Process video, audio, and images using FFmpeg and ImageMagick command-line tools for conversion, optimization, streaming, and manipulation tasks.
Use when:
Use FFmpeg for:
Use ImageMagick for:
| Task | Tool | Why | |------|------|-----| | Video encoding | FFmpeg | Native video codec support | | Audio extraction | FFmpeg | Direct stream manipulation | | Image resize | ImageMagick | Optimized for still images | | Batch images | ImageMagick | mogrify for in-place edits | | Video thumbnails | FFmpeg | Frame extraction built-in | | GIF creation | FFmpeg or ImageMagick | FFmpeg for video source, ImageMagick for images | | Streaming | FFmpeg | Live streaming protocols | | Image effects | ImageMagick | Rich filter library |
bashbrew install ffmpeg imagemagick
bashsudo apt-get install ffmpeg imagemagick
bash# Using winget winget install ffmpeg winget install ImageMagick.ImageMagick # Or download binaries # FFmpeg: https://ffmpeg.org/download.html # ImageMagick: https://imagemagick.org/script/download.php
bashffmpeg -version ffprobe -version magick -version # or convert -version
bash# Convert format (copy streams, fast) ffmpeg -i input.mkv -c copy output.mp4 # Re-encode with H.264 ffmpeg -i input.avi -c:v libx264 -crf 22 -c:a aac output.mp4 # Resize video to 720p ffmpeg -i input.mp4 -vf scale=-1:720 -c:a copy output.mp4
bash# Extract audio (no re-encoding) ffmpeg -i video.mp4 -vn -c:a copy audio.m4a # Convert to MP3 ffmpeg -i video.mp4 -vn -q:a 0 audio.mp3
bash# Convert format magick input.png output.jpg # Resize maintaining aspect ratio magick input.jpg -resize 800x600 output.jpg # Create square thumbnail magick input.jpg -resize 200x200^ -gravity center -extent 200x200 thumb.jpg
bash# Resize all JPEGs to 800px width mogrify -resize 800x -quality 85 *.jpg # Output to separate directory mogrify -path ./output -resize 800x600 *.jpg
bash# Extract frame at 5 seconds ffmpeg -ss 00:00:05 -i video.mp4 -vframes 1 -vf scale=320:-1 thumb.jpg
bash# Generate HLS playlist ffmpeg -i input.mp4 \ -c:v libx264 -preset fast -crf 22 -g 48 \ -c:a aac -b:a 128k \ -f hls -hls_time 6 -hls_playlist_type vod \ playlist.m3u8
bash# Add watermark to corner magick input.jpg watermark.png -gravity southeast \ -geometry +10+10 -composite output.jpg
bash# H.264 with good compression ffmpeg -i input.mp4 \ -c:v libx264 -preset slow -crf 23 \ -c:a aac -b:a 128k \ -movflags +faststart \ output.mp4
bash# Generate multiple sizes for size in 320 640 1024 1920; do magick input.jpg -resize ${size}x -quality 85 "output-${size}w.jpg" done
bash# From 1:30 to 3:00 (re-encode for precision) ffmpeg -i input.mp4 -ss 00:01:30 -to 00:03:00 \ -c:v libx264 -c:a aac output.mp4
bash# Convert PNG to optimized JPEG mogrify -path ./optimized -format jpg -quality 85 -strip *.png
bash# High quality GIF with palette ffmpeg -i input.mp4 -vf "fps=15,scale=640:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" output.gif
bash# Gaussian blur magick input.jpg -gaussian-blur 0x8 output.jpg
bash# Pass 1 (analysis) ffmpeg -y -i input.mkv -c:v libx264 -b:v 2600k -pass 1 -an -f null /dev/null # Pass 2 (encoding) ffmpeg -i input.mkv -c:v libx264 -b:v 2600k -pass 2 -c:a aac output.mp4
bash# NVIDIA NVENC ffmpeg -hwaccel cuda -i input.mp4 -c:v h264_nvenc -preset fast -crf 22 output.mp4 # Intel QuickSync ffmpeg -hwaccel qsv -c:v h264_qsv -i input.mp4 -c:v h264_qsv output.mp4
bash# Resize, crop, border, adjust magick input.jpg \ -resize 1000x1000^ \ -gravity center \ -crop 1000x1000+0+0 +repage \ -bordercolor black -border 5x5 \ -brightness-contrast 5x10 \ -quality 90 \ output.jpg
bash# Scale, denoise, watermark ffmpeg -i video.mp4 -i logo.png \ -filter_complex "[0:v]scale=1280:720,hqdn3d[v];[v][1:v]overlay=10:10" \ -c:a copy output.mp4
bash# Create with delay magick -delay 100 -loop 0 frame*.png animated.gif # Optimize size magick animated.gif -fuzz 5% -layers Optimize optimized.gif
bash# Detailed JSON output ffprobe -v quiet -print_format json -show_format -show_streams input.mp4 # Get resolution ffprobe -v error -select_streams v:0 \ -show_entries stream=width,height \ -of csv=s=x:p=0 input.mp4
bash# Basic info identify image.jpg # Detailed format identify -verbose image.jpg # Custom format identify -format "%f: %wx%h %b\n" image.jpg
-c copy-strip-interlace PlaneDetailed guides in references/:
-c:v - Video codec (libx264, libx265, libvpx-vp9)-crf - Quality (0-51, lower=better, 23=default)-preset - Speed/compression (ultrafast to veryslow)-b:v - Video bitrate (e.g., 2M, 2500k)-vf - Video filters-c:a - Audio codec (aac, mp3, opus)-b:a - Audio bitrate (e.g., 128k, 192k)-ar - Sample rate (44100, 48000)800x600 - Fit within (maintains aspect)800x600! - Force exact size800x600^ - Fill (may crop)800x - Width onlyx600 - Height only50% - Scale percentageFFmpeg "Unknown encoder"
bash# Check available encoders ffmpeg -encoders | grep h264 # Install codec libraries sudo apt-get install libx264-dev libx265-dev
ImageMagick "not authorized"
bash# Edit policy file sudo nano /etc/ImageMagick-7/policy.xml # Change <policy domain="coder" rights="none" pattern="PDF" /> # to <policy domain="coder" rights="read|write" pattern="PDF" />
Memory errors
bash# Limit memory usage ffmpeg -threads 4 input.mp4 output.mp4 magick -limit memory 2GB -limit map 4GB input.jpg output.jpg
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-18 | pass→pass | 9,319 | 7,117 | -24% | 1 | 1 | 0% | 1,474 | 4,086 | +177% | 0 | 0 | — |
case-01 | pass→pass | 8,406 | 7,631 | -9% | 1 | 1 | 0% | 1,580 | 4,299 | +172% | 0 | 0 | — |
case-02 | pass→pass | 5,161 | 3,790 | -27% | 1 | 1 | 0% | 804 | 3,514 | +337% | 0 | 0 | — |
case-03 | pass→pass | 3,526 | 2,171 | -38% | 1 | 1 | 0% | 553 | 3,264 | +490% | 0 | 0 | — |
case-04 | pass→pass | 5,195 | 5,515 | +6% | 1 | 1 | 0% | 963 | 4,011 | +317% | 0 | 0 | — |
case-05 | pass→pass | 12,202 | 8,224 | -33% | 1 | 1 | 0% | 2,138 | 4,439 | +108% | 0 | 0 | — |
case-06 | pass→pass | 8,150 | 5,443 | -33% | 1 | 1 | 0% | 1,398 | 3,938 | +182% | 0 | 0 | — |
case-07 | fail→pass | 7,482 | 7,487 | +0% | 1 | 1 | 0% | 1,325 | 4,397 | +232% | 0 | 0 | — |
case-08 | pass→pass | 5,405 | 4,327 | -20% | 1 | 1 | 0% | 883 | 3,650 | +313% | 0 | 0 | — |
case-09 | fail→fail | 7,142 | 4,176 | -42% | 1 | 1 | 0% | 1,121 | 3,648 | +225% | 0 | 0 | — |
case-10 | pass→pass | 4,136 | 3,246 | -22% | 1 | 1 | 0% | 736 | 3,460 | +370% | 0 | 0 | — |
case-11 | fail→pass | 14,557 | 4,890 | -66% | 1 | 1 | 0% | 1,454 | 3,791 | +161% | 0 | 0 | — |
case-12 | pass→pass | 2,851 | 3,127 | +10% | 1 | 1 | 0% | 437 | 3,364 | +670% | 0 | 0 | — |
case-13 | pass→pass | 3,707 | 3,132 | -16% | 1 | 1 | 0% | 601 | 3,431 | +471% | 0 | 0 | — |
case-14 | pass→pass | 3,912 | 3,432 | -12% | 1 | 1 | 0% | 651 | 3,495 | +437% | 0 | 0 | — |
case-15 | pass→pass | 3,610 | 3,186 | -12% | 1 | 1 | 0% | 645 | 3,468 | +438% | 0 | 0 | — |
case-16 | pass→pass | 9,221 | 4,024 | -56% | 1 | 1 | 0% | 1,462 | 3,601 | +146% | 0 | 0 | — |
case-17 | pass→pass | 8,948 | 6,297 | -30% | 1 | 1 | 0% | 1,382 | 3,955 | +186% | 0 | 0 | — |
case-19 | pass→pass | 4,023 | 2,447 | -39% | 1 | 1 | 0% | 614 | 3,343 | +444% | 0 | 0 | — |
case-20 | pass→pass | 3,392 | 3,163 | -7% | 1 | 1 | 0% | 657 | 3,532 | +438% | 0 | 0 | — |
case-21 | pass→pass | 5,851 | 4,839 | -17% | 1 | 1 | 0% | 1,062 | 3,766 | +255% | 0 | 0 | — |
case-22 | pass→pass | 8,940 | 7,180 | -20% | 1 | 1 | 0% | 1,765 | 4,330 | +145% | 0 | 0 | — |
case-23 | pass→pass | 7,427 | 6,737 | -9% | 1 | 1 | 0% | 1,339 | 4,138 | +209% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +9 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.