Agent skill
media-processing
[AI & Tools] Use when processing multimedia files with FFmpeg (video/audio encoding, conversion, streaming), ImageMagick (image manipulation, batch processing), or RMBG (AI background removal). Covers format conversion, resizing, filtering, thumbnails, and media pipelines.
Install this agent skill to your Project
npx add-skill https://github.com/duc01226/EasyPlatform/tree/main/.claude/skills/media-processing
SKILL.md
[IMPORTANT] Use
TaskCreateto break ALL work into small tasks BEFORE starting — including tasks for each file read. This prevents context loss from long files. For simple tasks, AI MUST ask user whether to skip.
Quick Summary
Goal: Process multimedia files using FFmpeg for video/audio encoding, conversion, streaming, and filtering.
Workflow:
- Identify -- Match input to correct FFmpeg operation (convert, trim, merge, compress)
- Execute -- Run FFmpeg command with appropriate codec and quality settings
- Verify -- Check output file integrity and quality
Key Rules:
- Use tool selection table to pick correct FFmpeg operation
- Prefer hardware-accelerated encoding when available
- Always verify output file exists and is playable
Be skeptical. Apply critical thinking, sequential thinking. Every claim needs traced proof, confidence percentages (Idea should be more than 80%).
Media Processing Skill
Process video, audio, and images using FFmpeg, ImageMagick, and RMBG CLI tools.
Tool Selection
| Task | Tool | Reason |
|---|---|---|
| Video encoding/conversion | FFmpeg | Native codec support, streaming |
| Audio extraction/conversion | FFmpeg | Direct stream manipulation |
| Image resize/effects | ImageMagick | Optimized for still images |
| Background removal | RMBG | AI-powered, local processing |
| Batch images | ImageMagick | mogrify for in-place edits |
| Video thumbnails | FFmpeg | Frame extraction built-in |
| GIF creation | FFmpeg/ImageMagick | FFmpeg for video, ImageMagick for images |
Installation
# macOS
brew install ffmpeg imagemagick
npm install -g rmbg-cli
# Ubuntu/Debian
sudo apt-get install ffmpeg imagemagick
npm install -g rmbg-cli
# Verify
ffmpeg -version && magick -version && rmbg --version
Essential Commands
# Video: Convert/re-encode
ffmpeg -i input.mkv -c copy output.mp4
ffmpeg -i input.avi -c:v libx264 -crf 22 -c:a aac output.mp4
# Video: Extract audio
ffmpeg -i video.mp4 -vn -c:a copy audio.m4a
# Image: Convert/resize
magick input.png output.jpg
magick input.jpg -resize 800x600 output.jpg
# Image: Batch resize
mogrify -resize 800x -quality 85 *.jpg
# Background removal
rmbg input.jpg # Basic (modnet)
rmbg input.jpg -m briaai -o output.png # High quality
rmbg input.jpg -m u2netp -o output.png # Fast
Key Parameters
FFmpeg:
-c:v libx264- H.264 codec-crf 22- Quality (0-51, lower=better)-preset slow- Speed/compression balance-c:a aac- Audio codec
ImageMagick:
800x600- Fit within (maintains aspect)800x600^- Fill (may crop)-quality 85- JPEG quality-strip- Remove metadata
RMBG:
-m briaai- High quality model-m u2netp- Fast model-r 4096- Max resolution
References
Detailed guides in references/:
ffmpeg-encoding.md- Codecs, quality, hardware accelerationffmpeg-streaming.md- HLS/DASH, live streamingffmpeg-filters.md- Filters, complex filtergraphsimagemagick-editing.md- Effects, transformationsimagemagick-batch.md- Batch processing, parallel opsrmbg-background-removal.md- AI models, CLI usagecommon-workflows.md- Video optimization, responsive images, GIF creationtroubleshooting.md- Error fixes, performance tipsformat-compatibility.md- Format support, codec recommendations
Closing Reminders
- MUST break work into small todo tasks using
TaskCreateBEFORE starting - MUST search codebase for 3+ similar patterns before creating new code
- MUST cite
file:lineevidence for every claim (confidence >80% to act) - MUST add a final review todo task to verify work quality
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
fix-parallel
[Implementation] Analyze & fix issues with parallel fullstack-developer agents
ask
[Utilities] Answer technical and architectural questions.
claude-code
[Utilities] Claude Code CLI setup, configuration, troubleshooting, and feature guidance. Triggers on claude code setup, hook not firing, MCP connection, context limit, skill creation, slash command setup.
workflow-deployment
[Workflow] Trigger Deployment & Infrastructure workflow — CI/CD pipelines, Docker, Kubernetes setup and deployment.
workflow-idea-to-pbi
[Workflow] Trigger Idea to PBI workflow — po/ba workflow: capture idea, refine to pbi, create stories, prioritize.
easy-claude-help
[Utilities] Configuration guide for the easy-claude framework — explain settings, guide users through configuring .ck.json.
Didn't find tool you were looking for?