video-editor
Local video editing using FFmpeg, yt-dlp, Whisper, and PySceneDetect — download videos, cut clips, resize for social platforms, auto-caption, merge B-roll, and run full social-clip workflows without c
Files27
View on GitHubSKILL.md27-video-editor/SKILL.md
GitHubVideo Editor (Local Opus Clip Alternative)
Edit existing videos locally using simple, predictable scripts.
This skill is built around a small set of shell scripts (FFmpeg, yt-dlp, Whisper, PySceneDetect) plus a couple Python helpers for B-roll merging and text overlays.
What you can do
- Download a video from a URL (YouTube and many other sites)
- Cut a clip by timestamp
- Resize/reframe for TikTok, Reels, Shorts, Instagram square, YouTube, LinkedIn
- Auto-generate captions with Whisper and burn them into the video
- Run a full "social clip" workflow (cut + resize + caption)
- Analyze a video for scene changes and suggested B-roll insertion points
- Merge B-roll into a talking-head video while keeping the original audio continuous
Requirements
- FFmpeg installed (
ffmpegcommand) - Python 3 (for Whisper + scenedetect + the B-roll merge helper)
- Tools installed via pip:
yt-dlpscenedetectopenai-whispermoviepy(used by the B-roll merge helper)
See INSTALL.md for step-by-step setup.
File structure
27-video-editor/
├── SKILL.md
├── INSTALL.md
├── INSTRUCTIONS.md
├── EXAMPLES.md
├── CORE_UPDATES.md
├── BROLL-WORKFLOW.md
├── scripts/
│ ├── download.sh # Download a video via yt-dlp
│ ├── cut.sh # Cut a clip by start time + duration
│ ├── resize.sh # Resize/reframe for social platforms
│ ├── caption.sh # Whisper captions + burn-in
│ ├── social-clip.sh # cut + resize + caption in one command
│ ├── analyze-video.sh # Scene detection + suggested B-roll points
│ ├── extract-audio.sh # Extract audio (aac, mp3, or wav)
│ ├── merge-broll.sh # Merge B-roll into main video (calls Python helper)
│ ├── broll-workflow.sh # Guided end-to-end B-roll workflow
│ ├── broll_merge.py # Python helper used by merge-broll.sh
│ └── text-overlay.py # Optional: add a basic text overlay
└── references/
├── platform-specs.md
├── ffmpeg-vs-moviepy.md
└── kie-ai-models.md # dated snapshot, NOT authoritative (model policy: Skill 67; live catalog: Skill 74)
Quick start (most common workflow)
- Download a video.
./scripts/download.sh \
--url "https://www.youtube.com/watch?v=VIDEO_ID" \
--output input.mp4
- Turn it into a TikTok/Reels/Shorts clip (cut + resize + captions).
./scripts/social-clip.sh \
--input input.mp4 \
--start 00:00:30 \
--duration 30 \
--platform tiktok \
--output clip-captioned-vertical.mp4
- (Optional) Skip captions if you want a clean clip.
./scripts/social-clip.sh \
--input input.mp4 \
--start 00:00:30 \
--duration 30 \
--platform tiktok \
--output clip-vertical.mp4 \
--skip-caption
B-roll workflow (talking head to professional B-roll cut)
- Read
BROLL-WORKFLOW.mdfor the full, detailed SOP. - Use
./scripts/broll-workflow.shto stage a project folder, analyze the video, extract audio, and print suggested insertion points. - B-roll clips are generated through Skill 67 (
67-kie-video), which owns model choice, dispatch and QC. This skill ships no KIE client and no model or price list. Prices:python3 74-kie-live-adapter/scripts/kie_live_adapter.py price --model <id>(Skill 74). KIE rules (endpoints, rate limit, credit preflight, saving results, client's own key):07-kie-setup/references/kie-common-rules.md. Sora is prohibited by the Video department.
Merge inputs are probed before anything renders
merge-broll.sh validates every input before it does any work: each of --main
and every --broll clip must be a non-empty file that ffprobe reports a video
stream for, and every --insert-at value must be a non-negative number inside the
main video's duration. A failure exits non-zero with a named error
(AF-MERGE-INPUT-MISSING, AF-MERGE-INPUT-EMPTY, AF-MERGE-INPUT-NOT-VIDEO,
AF-MERGE-TIMESTAMP-RANGE, AF-MERGE-ARITY, AF-MERGE-PREREQ-MISSING) and
renders nothing.
broll-workflow.sh declares the expected B-roll paths in a
broll-manifest.json rather than creating empty files at them, so a clip you have
not generated yet is genuinely absent instead of being a zero-byte .mp4 the merge
would read.
Rehearse before you render:
./scripts/merge-broll.sh --main talking-head.mp4 --broll "b1.mp4,b2.mp4" \
--insert-at "12,38" --output final.mp4 --dry-run
--dry-run runs every probe and every timestamp check, prints the merge plan and
exits without rendering.
Notes about analysis output
analyze-video.sh relies on PySceneDetect.
- The number of scenes and suggested insertion points can vary depending on:
- the content
- the detection method you choose
- the PySceneDetect version
- Treat the JSON output as helpful suggestions, not a guaranteed structure for downstream automation.