video-editor
Video editing via FFmpeg with git-like staging workflow and platform presets.Use when the user asks to: (1) cut/trim/edit videos, (2) convert formats or codecs,(3) optimize for platforms (WhatsApp, Instagram, YouTube, Twitter, Telegram),(4) extract audio or create GIFs, (5) get video info/metadata, (6) rotate/resize/crop,(7) speed up/slow down videos, (8) compress videos, (9) concatenate multiple videos.All operations go to staging before final approval. Supports operation history,replay, batch processing, and undo/redo.
When & Why to Use This Skill
This Claude skill provides a professional-grade video editing suite powered by FFmpeg, featuring a unique git-like staging workflow for safe and precise modifications. It enables users to trim, convert, and optimize videos for major social platforms while maintaining full control through preview approvals, history tracking, and batch processing. By integrating advanced encoding presets and a robust undo/redo system, it streamlines complex multimedia tasks directly within the AI chat interface.
Use Cases
- Social Media Optimization: Quickly resizing, cropping, and re-encoding videos for platforms like Instagram, YouTube, and TikTok using optimized presets.
- Safe Batch Processing: Applying consistent edits or format conversions to multiple video files simultaneously with a staging area to review results before final approval.
- Content Repurposing: Extracting high-quality audio tracks from video clips or converting specific segments into GIFs for marketing and documentation.
- Technical Video Management: Trimming long recordings, compressing large files for easier sharing, and managing video metadata without leaving the terminal or chat environment.
- Non-Destructive Editing: Utilizing the git-like workflow to experiment with different FFmpeg filters and commands, with the ability to undo, redo, or replay operations from history.
| name | video-editor |
|---|---|
| description | | |
| Use when the user asks to | (1) cut/trim/edit videos, (2) convert formats or codecs, |
Video Editor
FFmpeg-based video editing with a git-like staging workflow. All operations generate a preview in staging that must be approved before the final file is created.
Workflow
- Execute FFmpeg with output to
~/.video-editor/staging/{id}/output.{ext} - Save metadata:
python scripts/staging_save.py {id} --original {file} --operation {op} --command "{cmd}" --params '{json}' - Open preview:
python scripts/staging_preview.py {id} - Wait for user approval
- If approved:
python scripts/staging_approve.py {id} --output {destination} - If rejected:
python scripts/staging_discard.py {id}
Staging Scripts
All scripts are in the scripts/ directory. Always use full path from skill base directory.
| Script | Purpose |
|---|---|
staging_save.py |
Save operation metadata after FFmpeg execution |
staging_approve.py |
Move staged file to final destination, record in history |
staging_discard.py |
Remove staged file and metadata |
staging_preview.py |
Open staged file in configured player (mpv/vlc) |
staging_status.py |
List all pending staged files |
History & Advanced Workflow
| Script | Purpose |
|---|---|
history.py |
List/show past operations |
history_replay.py |
Re-apply an operation to a different file |
batch_run.py |
Execute FFmpeg command on multiple files |
backup_create.py |
Create backup before destructive operation |
backup_restore.py |
Restore from backup (undo/redo) |
FFmpeg Commands
For FFmpeg command patterns and best practices, see references/operations.md.
Platform Presets
For platform-specific encoding settings (WhatsApp, Instagram, YouTube, etc.), see references/presets.md.
Troubleshooting
For common issues and solutions, see references/troubleshooting.md.
Logs
All operations are logged to ~/.video-editor/logs/video-editor.log.
Configure logging in ~/.video-editor/config.json:
{
"log_level": "INFO",
"log_max_size_mb": 10,
"log_backup_count": 3
}
Directory Structure
~/.video-editor/
├── staging/{id}/ # Preview files pending approval
│ ├── output.{ext} # The generated file
│ └── metadata.json # Operation details
├── backups/{id}/ # Backups for undo/redo
│ └── original.{ext}
├── logs/ # Operation logs
│ └── video-editor.log # Rotating log file
├── history.json # All completed operations
├── undo_stack.json # Operations available for redo
└── config.json # User preferences
Config Options
The ~/.video-editor/config.json file supports:
{
"player": "mpv", // Preview player: mpv, vlc, xdg-open
"default_output_dir": ".", // Default output directory
"auto_preview": true, // Auto-open preview after staging
"keep_original": true // Never overwrite original files
}