media-processing
Original:🇺🇸 English
Not Translated
9 scripts
[AI & Tools] Process multimedia files with FFmpeg (video/audio encoding, conversion, streaming, filtering, hardware acceleration), ImageMagick (image manipulation, format conversion, batch processing, effects, composition), and RMBG (AI-powered background removal). Use when converting media formats, encoding videos with specific codecs (H.264, H.265, VP9), resizing/cropping images, removing backgrounds from images, extracting audio from video, applying filters and effects, optimizing file sizes, creating streaming manifests (HLS/DASH), generating thumbnails, batch processing images, creating composite images, or implementing media processing pipelines. Supports 100+ formats, hardware acceleration (NVENC, QSV), and complex filtergraphs.
1installs
Sourceduc01226/easyplatform
Added on
NPX Install
npx skill4agent add duc01226/easyplatform media-processingSKILL.md Content
[IMPORTANT] Useto 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.TaskCreate
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
bash
# 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 --versionEssential Commands
bash
# 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 # FastKey Parameters
FFmpeg:
- - H.264 codec
-c:v libx264 - - Quality (0-51, lower=better)
-crf 22 - - Speed/compression balance
-preset slow - - Audio codec
-c:a aac
ImageMagick:
- - Fit within (maintains aspect)
800x600 - - Fill (may crop)
800x600^ - - JPEG quality
-quality 85 - - Remove metadata
-strip
RMBG:
- - High quality model
-m briaai - - Fast model
-m u2netp - - Max resolution
-r 4096
References
Detailed guides in :
references/- - Codecs, quality, hardware acceleration
ffmpeg-encoding.md - - HLS/DASH, live streaming
ffmpeg-streaming.md - - Filters, complex filtergraphs
ffmpeg-filters.md - - Effects, transformations
imagemagick-editing.md - - Batch processing, parallel ops
imagemagick-batch.md - - AI models, CLI usage
rmbg-background-removal.md - - Video optimization, responsive images, GIF creation
common-workflows.md - - Error fixes, performance tips
troubleshooting.md - - Format support, codec recommendations
format-compatibility.md
IMPORTANT Task Planning Notes (MUST FOLLOW)
- Always plan and break work into many small todo tasks
- Always add a final review todo task to verify work quality and identify fixes/enhancements