Agent Skillscalesthio/OpenMontage › video-edit

video-edit

GitHub

提供基于 ffmpeg/ffprobe 的本地视频编辑能力,涵盖裁剪、拼接、缩放、变速、音频提取替换、压缩、格式转换及添加水印等核心功能,并附带主流社交平台分辨率预设。

.claude/skills/video-edit/SKILL.md calesthio/OpenMontage

Trigger Scenarios

需要裁剪或切割视频片段 需要将多个视频片段拼接在一起 需要调整视频尺寸以适配社交媒体平台 需要提取或替换视频中的音频 需要对视频进行压缩或格式转换

Install

npx skills add calesthio/OpenMontage --skill video-edit -g -y
More Options

Non-standard path

npx skills add https://github.com/calesthio/OpenMontage/tree/main/.claude/skills/video-edit -g -y

Use without installing

npx skills use calesthio/OpenMontage@video-edit

指定 Agent (Claude Code)

npx skills add calesthio/OpenMontage --skill video-edit -a claude-code -g -y

安装 repo 全部 skill

npx skills add calesthio/OpenMontage --all -g -y

预览 repo 内 skill

npx skills add calesthio/OpenMontage --list

SKILL.md

Frontmatter
{
    "name": "video-edit",
    "description": "Edit videos locally using ffmpeg. Trim, concat, resize, speed, overlay, extract audio, compress, and convert.\nUse when: (1) Trimming or cutting video segments, (2) Concatenating multiple clips, (3) Resizing video for social platforms,\n(4) Extracting or replacing audio, (5) Compressing video, (6) Converting video formats, (7) Getting video info."
}

Video Edit

Edit videos locally by running ffmpeg/ffprobe directly. No wrapper scripts needed.

Prerequisites

Install ffmpeg (includes ffprobe):

# macOS
brew install ffmpeg

# Ubuntu/Debian
sudo apt update && sudo apt install -y ffmpeg

# Verify
ffmpeg -version && ffprobe -version

Quick Reference

Get video info

ffprobe -v quiet -print_format json -show_format -show_streams video.mp4

Trim

ffmpeg -y -ss 00:00:30 -to 00:01:45 -i video.mp4 -c copy trimmed.mp4

Concatenate clips

# 1. Create a file list
printf "file '%s'\n" clip1.mp4 clip2.mp4 clip3.mp4 > list.txt

# 2. Concat with stream copy
ffmpeg -y -f concat -safe 0 -i list.txt -c copy joined.mp4

Resize for platform

ffmpeg -y -i video.mp4 \
  -vf "scale=1080:1920:force_original_aspect_ratio=decrease,pad=1080:1920:(ow-iw)/2:(oh-ih)/2:black" \
  -c:a copy tiktok.mp4

Change speed

# 2x faster
ffmpeg -y -i video.mp4 -filter:v "setpts=0.5*PTS" -filter:a "atempo=2.0" fast.mp4

# 0.5x (slow motion)
ffmpeg -y -i video.mp4 -filter:v "setpts=2.0*PTS" -filter:a "atempo=0.5" slow.mp4

Extract audio

ffmpeg -y -i video.mp4 -vn -acodec libmp3lame audio.mp3

Replace audio

ffmpeg -y -i video.mp4 -i audio.mp3 -c:v copy -map 0:v:0 -map 1:a:0 -shortest output.mp4

Compress

ffmpeg -y -i video.mp4 -crf 23 -preset medium -c:a copy compressed.mp4

Convert format

ffmpeg -y -i video.mov output.mp4

Add image overlay

# Logo in top-right corner
ffmpeg -y -i video.mp4 -i logo.png \
  -filter_complex "overlay=W-w-10:10" -c:a copy watermarked.mp4

Platform Presets

Platform Resolution Scale + pad filter
TikTok 1080 x 1920 scale=1080:1920:force_original_aspect_ratio=decrease,pad=1080:1920:(ow-iw)/2:(oh-ih)/2:black
YouTube 1920 x 1080 scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2:black
Instagram 1080 x 1350 scale=1080:1350:force_original_aspect_ratio=decrease,pad=1080:1350:(ow-iw)/2:(oh-ih)/2:black
Square 1080 x 1080 scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2:black
Twitter/X 1920 x 1080 scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2:black

Use the filter with: ffmpeg -y -i input.mp4 -vf "<filter>" -c:a copy output.mp4

Tips

  • Always use -y to overwrite output without prompting.
  • Use -c copy when you only need to cut/join (no re-encoding, very fast).
  • Lower CRF = better quality, larger file. Range 18-28 is typical; 23 is the default.
  • For detailed recipes and flag explanations, see references/operations.md.

Version History

  • 0af32ce Current 2026-07-24 22:26

Same Skill Collection

.agents/skills/3d-asset-generation/SKILL.md
.agents/skills/acestep/SKILL.md
.agents/skills/agents/SKILL.md
.agents/skills/ai-video-gen/SKILL.md
.agents/skills/atlas-cloud/SKILL.md
.agents/skills/azure-speech-to-text/SKILL.md
.agents/skills/azure-text-to-speech/SKILL.md
.agents/skills/beautiful-mermaid/SKILL.md
.agents/skills/character-animation-qa/SKILL.md
.agents/skills/comfyui/SKILL.md
.agents/skills/create-video/SKILL.md
.agents/skills/d3-viz/SKILL.md
.agents/skills/dashscope/SKILL.md
.agents/skills/doubao-tts/SKILL.md
.agents/skills/elevenlabs/SKILL.md
.agents/skills/faceswap/SKILL.md
.agents/skills/ffmpeg/SKILL.md
.agents/skills/fish-audio-tts/SKILL.md
.agents/skills/flux-best-practices/SKILL.md
.agents/skills/framer-motion/SKILL.md
.agents/skills/grok-media/SKILL.md
.agents/skills/gsap-frameworks/SKILL.md
.agents/skills/gsap-performance/SKILL.md
.agents/skills/gsap-plugins/SKILL.md
.agents/skills/gsap-react/SKILL.md
.agents/skills/gsap-scrolltrigger/SKILL.md
.agents/skills/gsap-timeline/SKILL.md
.agents/skills/gsap-utils/SKILL.md
.agents/skills/heygen/SKILL.md
.agents/skills/hyperframes-cli/SKILL.md
.agents/skills/hyperframes-core/SKILL.md
.agents/skills/hyperframes-creative/SKILL.md
.agents/skills/hyperframes-registry/SKILL.md
.agents/skills/kling-official/SKILL.md
.agents/skills/lottie-bodymovin/SKILL.md
.agents/skills/ltx2/SKILL.md
.agents/skills/lyria/SKILL.md
.agents/skills/media-use/SKILL.md
.agents/skills/minimax-h3/SKILL.md
.agents/skills/music/SKILL.md
.agents/skills/playwright-recording/SKILL.md
.agents/skills/pose-library-design/SKILL.md
.agents/skills/remotion-best-practices/SKILL.md
.agents/skills/remotion/SKILL.md
.agents/skills/seedance-2-5/SKILL.md
.agents/skills/setup-api-key/SKILL.md
.agents/skills/sound-effects/SKILL.md
.agents/skills/speech-to-text/SKILL.md
.agents/skills/svg-character-animation/SKILL.md
.agents/skills/synthetic-screen-recording/SKILL.md

Metadata

Files
0
Version
cd9f3c1
Hash
25a8a985
Indexed
2026-07-24 22:26

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-27 23:19
浙ICP备14020137号-1 $bản đồ khách truy cập$