Skip to content

gooseworks-ai/goose-skills / skills/video/stitch-videos-ffmpeg

stitch-videos-ffmpeg

Verified

Stitch video segments with ffmpeg concat, xfade, overlay, audio mux, and export settings, and trim a source into named clips at exact windows (trim_clips.py). Ships montage.py, a free montage assembler (python3 + ffmpeg, no keys). It takes a JSON EDL of clips and stills, normalizes them and hard-cuts them in order, burns captions from an SRT, a cue list or word timings, and lays a VO over a music bed that ducks under it, mastered to -14 LUFS.

FileKindSize
SKILL.mdskill md13.4 KB
scripts/composite.pyexecutablescript4.8 KB
scripts/composite_final.pyexecutablescript3.5 KB
scripts/composite_final.shexecutablescript295 B
scripts/montage.pyexecutablescript49.3 KB
scripts/normalize_clip.shexecutablescript668 B
scripts/trim_clips.pyexecutablescript7.1 KB
scripts/voiceless/composite.pyscript4.5 KB
skill.meta.jsonconfig190 B
tests/expected-output.mdmarkdown300 B
tests/human-test.mdmarkdown853 B
tests/sample-input.mdmarkdown568 B
tests/smoke-test.mdmarkdown642 B
tests/test_stitch_montage.pyscript18.1 KB
tests/test_trim_clips.pyscript2.2 KB

scripts/normalize_clip.sh

View on GitHub
#!/usr/bin/env bash
# Normalize a clip to 1080x1920, 25fps, target duration via setpts retime.
# Usage: normalize_clip.sh <in> <out> <target_duration_seconds>
set -euo pipefail

IN="$1"; OUT="$2"; DUR="$3"

INPUT_DUR=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "$IN")
PTS_RATIO=$(echo "scale=4; $DUR / $INPUT_DUR" | bc)

ffmpeg -y -loglevel error -i "$IN" \
  -vf "scale=1080:1920:force_original_aspect_ratio=increase,crop=1080:1920,setsar=1,setpts=${PTS_RATIO}*PTS,fps=25" \
  -t "$DUR" -an -c:v libx264 -crf 18 -preset fast -pix_fmt yuv420p "$OUT"

echo "Normalized $IN ($INPUT_DUR s) → $OUT ($DUR s, ratio=$PTS_RATIO)"
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall