guyronnen/openmontage

video-edit

Edit videos locally using ffmpeg.

查看源码
仓库原始内容

按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。

Video Edit

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

Prerequisites

Install ffmpeg (includes ffprobe):

bash
# macOS
brew install ffmpeg

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

# Verify
ffmpeg -version && ffprobe -version

Quick Reference

Get video info

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

Trim

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

Concatenate clips

bash
# 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

bash
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

bash
# 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

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

Replace audio

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

Compress

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

Convert format

bash
ffmpeg -y -i video.mov output.mp4

Add image overlay

bash
# 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

PlatformResolutionScale + pad filter
TikTok1080 x 1920scale=1080:1920:force_original_aspect_ratio=decrease,pad=1080:1920:(ow-iw)/2:(oh-ih)/2:black
YouTube1920 x 1080scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2:black
Instagram1080 x 1350scale=1080:1350:force_original_aspect_ratio=decrease,pad=1080:1350:(ow-iw)/2:(oh-ih)/2:black
Square1080 x 1080scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2:black
Twitter/X1920 x 1080scale=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.
来自同一仓库

更多 Skills

全部 Skills
guyronnen
社区

acestep

AI music generation with ACE-Step 1.5 — background music, vocal tracks, covers, stem extraction for video production. Use when generating music, soundtracks, jingles, or working with audio stems. Triggers include background music, soundtrack, jingle, music generation, stem extraction, cover, style transfer, or musical composition tasks.

安装量
2
GitHub Stars
2
最近更新
4月12日
guyronnen
社区

agents

Build voice AI agents with ElevenLabs. Use when creating voice assistants, customer service bots, interactive voice characters, or any real-time voice conversation experience.

安装量
2
GitHub Stars
2
最近更新
4月12日
guyronnen
社区

ai-video-gen

Generate AI videos from text prompts using multiple provider gateways. Use when: (1) Generating videos from text descriptions, (2) Creating AI-generated video clips for content production, (3) Image-to-video generation with a reference image, (4) Choosing between video generation providers (VEO, Kling, Sora, Runway, Seedance, MiniMax). Supports two gateways: HeyGen API and fal.ai API.

安装量
2
GitHub Stars
2
最近更新
4月12日
guyronnen
社区

avatar-video

Create AI avatar videos with precise control over avatars, voices, scripts, scenes, and backgrounds using HeyGen's v2 API. Use when: (1) Choosing a specific avatar and voice for a video, (2) Writing exact scripts for an avatar to speak, (3) Building multi-scene videos with different backgrounds per scene, (4) Creating transparent WebM videos for compositing, (5) Using talking photos as video presenters, (6) Integrating HeyGen avatars with Remotion, (7) Batch video generation with exact specs, (8) Brand-consistent production videos with precise control.

安装量
2
GitHub Stars
2
最近更新
4月12日