Back to list
leobrival

video-processing

by leobrival

Serum plugin for Claude Code

0🍴 0📅 Jan 20, 2026

SKILL.md


name: video-processing description: Smart video processing for compress, convert, trim, and audio extraction with batch support. Use when users ask to compress videos, convert to MP4/WebM, extract video clips, trim videos, remove audio, extract audio tracks, or batch process video files. Supports modern codecs and social media presets.

Video Processing

Smart video processor with automatic single-file and batch operation detection, modern codec support, and platform-specific presets.

Quick Start

Process videos with optimal defaults:

cd ~/.claude/scripts/media-tools
bun run video video.mov --Resolution 1080p --Format mp4

Intelligent Behavior

Automatically detects input type and adjusts processing:

InputBehavior
Single file (video.mp4)Process that file
Directory (./videos/)Process all videos in directory
Glob pattern (*.mov)Process matching files
Multiple filesProcess each file

CLI Options

OptionDefaultOptionsDescription
Resolutionoriginaloriginal, 4K, 1440p, 1080p, 720p, 480p, customTarget resolution
Formatmp4original, mp4, webm, mov, gifOutput format
Qualitymediumhigh, medium, low, webQuality preset
FPSoriginaloriginal, 60, 30, 24, 15Target frame rate
Trimfullfull, customTrim video to clip
Audiokeepkeep, remove, extractAudio handling
Outputsamesame, subfolder, customOutput location

Features

Format Support:

  • MP4/H.264 - Universal compatibility (recommended)
  • WebM/VP9 - Better compression, web-optimized
  • MOV - Apple ecosystem
  • GIF - Animated preview

Smart Processing:

  • Preserves original files (creates new output)
  • Auto-selects optimal codec settings
  • Handles batch operations with progress tracking
  • Shows estimated output size before processing

Supported Input Formats: mp4, mov, avi, mkv, webm, m4v, flv, wmv, mts

Usage Examples

Single file - compress

bun run video video.mov --Resolution 1080p --Format mp4 --Quality medium

Single file - convert to web format

bun run video video.mov --Format webm --Quality web

Single file - extract clip

bun run video video.mp4 --Trim custom --Resolution 720p

Prompts for timing:

Enter start time (HH:MM:SS or seconds): 00:01:30
Enter duration (HH:MM:SS or seconds, or 'end' for rest): 00:00:30

Single file - create GIF preview

bun run video video.mp4 --Format gif --Resolution 480p --FPS 15

Batch - compress folder

bun run video ./raw/ --Resolution 1080p --Format mp4 --Output subfolder

Shows preview before processing:

Found 8 videos to process:
- intro.mov (1:24, 4K, 2.1 GB)
- clip1.mp4 (0:45, 1080p, 340 MB)
- clip2.mp4 (2:10, 1080p, 890 MB)
- ... and 5 more

Total duration: 12:34
Total size: 5.8 GB

Settings:
- Resolution: 1080p
- Format: mp4 (H.264)
- Quality: medium (CRF 23)
- FPS: original
- Audio: keep

Estimated output: ~1.2 GB (80% smaller)

Proceed? [Yes/No]

Batch - convert all MOV to MP4

bun run video "*.mov" --Format mp4 --Quality medium

Remove audio from videos

bun run video ./videos/ --Audio remove --Format mp4

Extract audio tracks

bun run video ./videos/ --Audio extract

Outputs .m4a files alongside videos.

Platform Presets

PlatformResolutionFormatQualityFPSUse Case
YouTube upload1080pmp4highoriginalHigh quality
Twitter/X720pmp4medium30Short clips
Instagram Reel1080pmp4medium30Vertical video
TikTok1080pmp4medium30Short form
Web background720pwebmlow24Hero videos
Email attachment480pmp4low24Small size
GIF preview480pgif-15Animated preview
Archivaloriginalmp4highoriginalPreservation

Quality Settings

Maps quality presets to codec parameters:

QualityH.264 CRFVP9 CRFDescription
high1824Archival, minimal loss
medium2330Balanced (default)
low2836Smaller files
web3038Streaming optimized

CRF (Constant Rate Factor): Lower = better quality, larger file

Resolution Mapping

PresetWidthHeightAspect Ratio
4K3840216016:9
1440p2560144016:9
1080p1920108016:9
720p128072016:9
480p85448016:9

Processing Commands

MP4 (H.264) - Standard

ffmpeg -i input.mov \
  -vf "scale=1920:-2" \
  -c:v libx264 \
  -crf 23 \
  -preset medium \
  -c:a aac -b:a 128k \
  output.mp4

WebM (VP9) - Web Optimized

ffmpeg -i input.mov \
  -vf "scale=1920:-2" \
  -c:v libvpx-vp9 \
  -crf 30 -b:v 0 \
  -c:a libopus -b:a 128k \
  output.webm

With Trim

ffmpeg -ss 00:01:30 -t 00:00:30 -i input.mp4 \
  -vf "scale=1920:-2" \
  -c:v libx264 \
  -crf 23 \
  -preset medium \
  -c:a aac -b:a 128k \
  output.mp4

Remove Audio

ffmpeg -i input.mp4 -an \
  -vf "scale=1920:-2" \
  -c:v libx264 \
  -crf 23 \
  output.mp4

Extract Audio Only

ffmpeg -i input.mp4 \
  -vn \
  -c:a aac \
  -b:a 192k \
  output.m4a

Processing Results

Shows real-time progress for each file:

[1/8] intro.mov → intro.mp4
      4K → 1080p | 2.1 GB → 245 MB (88% smaller)
      ████████████████████████████░░ 90% | ETA: 0:15

[2/8] clip1.mp4 → clip1_compressed.mp4
      1080p → 1080p | 340 MB → 89 MB (74% smaller)
...

✓ Processed 8 videos

Summary:
- Total input:  5.8 GB
- Total output: 1.1 GB
- Compression:  81% smaller
- Time:         4m 32s

Output: ./processed/

Best Practices

  1. Use MP4/H.264 - Universal compatibility across all devices
  2. Quality "medium" - Best balance for most use cases
  3. Keep originals - Tool never modifies source files
  4. Test on sample - Process one file first to verify settings
  5. Trim before compressing - Reduces processing time
  6. Match platform specs - Use presets for target platform
  7. Audio bitrate 128k - Sufficient for most speech/music

Audio Handling

OptionBehaviorUse Case
keepPreserve audio trackStandard videos
removeStrip audio completelySilent background videos
extractSave audio as separate fileAudio-only content

Requirements

  • FFmpeg - With libx264, libvpx-vp9, libopus codecs
  • Install: brew install ffmpeg

Verify codecs:

ffmpeg -codecs | grep -E "h264|vp9|opus"
  • Command: plugins/media-tools/commands/video.md
  • Media Processor: plugins/media-tools/skills/media-processor/
  • GIF Creation: plugins/media-tools/skills/gif-creation/
  • Image Processing: plugins/media-tools/skills/image-processing/

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon