
video-editor
Video editing via FFmpeg with git-like staging workflow and platform presets.Use when the user asks
by arthurbm|Open Source
Video Editor Skill
FFmpeg-based video editing with a git-like staging workflow for Claude Code.
Overview
This skill enables Claude to edit videos using FFmpeg while maintaining a safe, reviewable workflow. All operations go through a staging area where you can preview results before committing to the final output.
Features
- Git-like staging - Preview before committing, never lose original files
- Platform presets - One-command optimization for WhatsApp, Instagram, YouTube, etc.
- Operation history - Track all operations, replay on other files
- Batch processing - Apply operations to multiple files at once
- Undo/redo - Revert operations with automatic backups
- Persistent logging - All operations logged to
~/.video-editor/logs/
Supported Operations
Core Operations
| Operation | Description | Example |
|---|---|---|
info | Get video metadata | "Show info for video.mp4" |
cut | Extract a segment | "Cut from 1:30 to 2:45" |
concat | Join multiple videos | "Merge intro.mp4 and main.mp4" |
Manipulation
| Operation | Description | Example |
|---|---|---|
rotate | Rotate video | "Rotate 90° clockwise" |
resize | Change dimensions | "Resize to 720p" |
crop | Crop to aspect ratio | "Crop to 16:9" |
speed | Change playback speed | "Speed up 2x" |
compress | Reduce file size | "Compress to under 50MB" |
Audio
| Operation | Description | Example |
|---|---|---|
extract-audio | Extract audio track | "Extract audio as MP3" |
remove-audio | Remove audio | "Make it silent" |
replace-audio | Replace audio track | "Replace audio with music.mp3" |
Export
| Operation | Description | Example |
|---|---|---|
gif | Create animated GIF | "Make a GIF from 0:05 to 0:10" |
thumbnail | Extract frame | "Get thumbnail at 0:30" |
preset | Apply platform preset | "Optimize for WhatsApp" |
Platform Presets
| Platform | Specs |
|---|---|
| h264, 720p max, <16MB, high compression | |
| Instagram Reels | 9:16 aspect, 1080x1920, <90s |
| Instagram Feed | 1:1 or 4:5 aspect, <60s |
| Instagram Stories | 9:16 aspect, 1080x1920, <15s |
| YouTube | h264/AAC, 1080p or 4K |
| Twitter/X | h264, <512MB, <2:20 duration |
| Telegram | Any codec, <2GB |
| Web | h264, medium compression, broad compatibility |
Usage Examples
Basic Cut
You: "Cut video.mp4 from 1:30 to 2:45"
Claude: [stages the cut, opens preview]
You: "Approve as clip.mp4"
Platform Optimization
You: "Optimize this video for WhatsApp"
Claude: [applies WhatsApp preset, stages result]
You: "Looks good, approve"
Batch Processing
You: "Cut the first 10 seconds from all .mp4 files in this folder"
Claude: [processes all files, stages results]
You: "Approve all"
Chained Operations
You: "Cut from 0:30 to 1:30, then optimize for Instagram Reels"
Claude: [chains operations, stages final result]
History Replay
You: "Do the same thing you did to video1.mp4, but on video2.mp4"
Claude: [replays operation from history]
Configuration
Settings are stored in ~/.video-editor/config.json:
{
"player": "mpv",
"default_output_dir": ".",
"auto_preview": true,
"keep_original": true,
"log_level": "INFO",
"log_max_size_mb": 10,
"log_backup_count": 3
}
| Option | Description | Default |
|---|---|---|
player | Preview player (mpv, vlc, xdg-open) | mpv |
default_output_dir | Where to save approved files | . |
auto_preview | Auto-open preview after staging | true |
keep_original | Never overwrite source files | true |
log_level | Logging verbosity | INFO |
Directory Structure
~/.video-editor/
├── staging/{id}/ # Pending previews
│ ├── output.{ext}
│ └── metadata.json
├── backups/{id}/ # For undo/redo
│ └── original.{ext}
├── logs/
│ └── video-editor.log # Rotating log file
├── history.json # Operation history
├── undo_stack.json # Redo stack
└── config.json # User preferences
Roadmap
Layer 5: Intelligence (Future)
Planned automatic analysis capabilities:
| Feature | Description | Example |
|---|---|---|
| Silence detection | Find and remove silent parts | "Remove the silent parts" |
| Whisper transcription | Cut based on speech content | "Cut when I say 'done'" |
| Scene detection | Automatically split by scenes | "Split into scenes" |
| Cut suggestions | AI-powered edit recommendations | "Suggest where to cut" |
These features will leverage AI models for automatic content analysis, making video editing even more intuitive.
References
- operations.md - FFmpeg command patterns
- presets.md - Platform-specific encoding settings
- troubleshooting.md - Common issues and solutions
License
MIT