arthurbm avatar

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

OperationDescriptionExample
infoGet video metadata"Show info for video.mp4"
cutExtract a segment"Cut from 1:30 to 2:45"
concatJoin multiple videos"Merge intro.mp4 and main.mp4"

Manipulation

OperationDescriptionExample
rotateRotate video"Rotate 90° clockwise"
resizeChange dimensions"Resize to 720p"
cropCrop to aspect ratio"Crop to 16:9"
speedChange playback speed"Speed up 2x"
compressReduce file size"Compress to under 50MB"

Audio

OperationDescriptionExample
extract-audioExtract audio track"Extract audio as MP3"
remove-audioRemove audio"Make it silent"
replace-audioReplace audio track"Replace audio with music.mp3"

Export

OperationDescriptionExample
gifCreate animated GIF"Make a GIF from 0:05 to 0:10"
thumbnailExtract frame"Get thumbnail at 0:30"
presetApply platform preset"Optimize for WhatsApp"

Platform Presets

PlatformSpecs
WhatsApph264, 720p max, <16MB, high compression
Instagram Reels9:16 aspect, 1080x1920, <90s
Instagram Feed1:1 or 4:5 aspect, <60s
Instagram Stories9:16 aspect, 1080x1920, <15s
YouTubeh264/AAC, 1080p or 4K
Twitter/Xh264, <512MB, <2:20 duration
TelegramAny codec, <2GB
Webh264, 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
}
OptionDescriptionDefault
playerPreview player (mpv, vlc, xdg-open)mpv
default_output_dirWhere to save approved files.
auto_previewAuto-open preview after stagingtrue
keep_originalNever overwrite source filestrue
log_levelLogging verbosityINFO

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:

FeatureDescriptionExample
Silence detectionFind and remove silent parts"Remove the silent parts"
Whisper transcriptionCut based on speech content"Cut when I say 'done'"
Scene detectionAutomatically split by scenes"Split into scenes"
Cut suggestionsAI-powered edit recommendations"Suggest where to cut"

These features will leverage AI models for automatic content analysis, making video editing even more intuitive.

References

License

MIT