Edit talking-head videos by removing silences with neural VAD and adding 3D swivel teaser transitions. Use when user asks to edit video, remove silences, add jump cuts, or create video teasers.
Automatically edit talking-head videos: remove silences via neural VAD, add swivel teaser preview.
./scripts/jump_cut_vad_singlepass.py - VAD silence removal./scripts/insert_3d_transition.py - Swivel teaser insertion./scripts/simple_video_edit.py - Basic FFmpeg editing# Step 1: Remove silences
python3 ./scripts/jump_cut_vad_singlepass.py input.mp4 .tmp/edited.mp4
# Step 2: Add swivel teaser
python3 ./scripts/insert_3d_transition.py .tmp/edited.mp4 output.mp4 --bg-image .tmp/bg.png
# One-liner
python3 ./scripts/jump_cut_vad_singlepass.py input.mp4 .tmp/edited.mp4 && \
python3 ./scripts/insert_3d_transition.py .tmp/edited.mp4 output.mp4 --bg-image .tmp/bg.png
| Argument | Default | Description |
|---|---|---|
--min-silence | 0.5 | Min silence duration to cut (seconds) |
--min-speech | 0.25 | Min speech duration to keep (seconds) |
--padding | 100 | Padding around speech (ms) |
--merge-gap | 0.3 | Merge segments closer than this (seconds) |
--keep-start | true | Always start from 0:00 |
| Argument | Default | Description |
|---|---|---|
--insert-at | 3 | Where to insert teaser (seconds) |
--duration | 5 | Teaser duration (seconds) |
--teaser-start | 60 | Where to sample content from (seconds) |
--bg-image | none | Background image for 3D effect |
[0-3s intro] [3-8s swivel teaser @ 100x] [8s onwards: edited content]
Audio: Original audio plays continuously
| Issue | Solution |
|---|---|
| Cuts feel abrupt | --padding 200 |
| Too much cut | --min-silence 1.0 |
| Too little cut | --min-speech 0.1 |
| Won't play in QuickTime | Ensure hvc1 codec tag |
| Swivel has blank frames | Extract 300 frames for 5s teaser |
pip install torch # For Silero VAD
brew install ffmpeg node # macOS
cd video_effects && npm install # For 3D rendering
hvc1 codec tag for QuickTime compatibility