video-edit by heygen-com/skills
npx skills add https://github.com/heygen-com/skills --skill video-edit通过直接运行 ffmpeg/ffprobe 在本地编辑视频。无需封装脚本。
安装 ffmpeg(包含 ffprobe):
# macOS
brew install ffmpeg
# Ubuntu/Debian
sudo apt update && sudo apt install -y ffmpeg
# 验证安装
ffmpeg -version && ffprobe -version
ffprobe -v quiet -print_format json -show_format -show_streams video.mp4
ffmpeg -y -ss 00:00:30 -to 00:01:45 -i video.mp4 -c copy trimmed.mp4
# 1. 创建文件列表
printf "file '%s'\n" clip1.mp4 clip2.mp4 clip3.mp4 > list.txt
# 2. 使用流复制进行合并
ffmpeg -y -f concat -safe 0 -i list.txt -c copy joined.mp4
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
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
# 2倍速
ffmpeg -y -i video.mp4 -filter:v "setpts=0.5*PTS" -filter:a "atempo=2.0" fast.mp4
# 0.5倍速(慢动作)
ffmpeg -y -i video.mp4 -filter:v "setpts=2.0*PTS" -filter:a "atempo=0.5" slow.mp4
ffmpeg -y -i video.mp4 -vn -acodec libmp3lame audio.mp3
ffmpeg -y -i video.mp4 -i audio.mp3 -c:v copy -map 0:v:0 -map 1:a:0 -shortest output.mp4
ffmpeg -y -i video.mp4 -crf 23 -preset medium -c:a copy compressed.mp4
ffmpeg -y -i video.mov output.mp4
# 将Logo放在右上角
ffmpeg -y -i video.mp4 -i logo.png \
-filter_complex "overlay=W-w-10:10" -c:a copy watermarked.mp4
| 平台 | 分辨率 | 缩放 + 填充滤镜 |
|---|---|---|
| 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 |
| 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 |
使用滤镜的命令格式:ffmpeg -y -i input.mp4 -vf "<filter>" -c:a copy output.mp4
-y 参数以在覆盖输出文件时不提示。-c copy。references/operations.md。每周安装数
286
代码仓库
GitHub 星标数
91
首次出现
8 天前
安全审计
安装于
claude-code258
cursor58
cline57
gemini-cli57
codex57
kimi-cli57
Edit videos locally by running ffmpeg/ffprobe directly. No wrapper scripts needed.
Install ffmpeg (includes ffprobe):
# macOS
brew install ffmpeg
# Ubuntu/Debian
sudo apt update && sudo apt install -y ffmpeg
# Verify
ffmpeg -version && ffprobe -version
ffprobe -v quiet -print_format json -show_format -show_streams video.mp4
ffmpeg -y -ss 00:00:30 -to 00:01:45 -i video.mp4 -c copy trimmed.mp4
# 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
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
# 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
ffmpeg -y -i video.mp4 -vn -acodec libmp3lame audio.mp3
ffmpeg -y -i video.mp4 -i audio.mp3 -c:v copy -map 0:v:0 -map 1:a:0 -shortest output.mp4
ffmpeg -y -i video.mp4 -crf 23 -preset medium -c:a copy compressed.mp4
ffmpeg -y -i video.mov output.mp4
# 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 | 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 |
| 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 |
Use the filter with: ffmpeg -y -i input.mp4 -vf "<filter>" -c:a copy output.mp4
-y to overwrite output without prompting.-c copy when you only need to cut/join (no re-encoding, very fast).references/operations.md.Weekly Installs
286
Repository
GitHub Stars
91
First Seen
8 days ago
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
claude-code258
cursor58
cline57
gemini-cli57
codex57
kimi-cli57
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
27,400 周安装
| Twitter/X | 1920 x 1080 | scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2:black |