Communitygithub.com

edit-video

Edits vertical talking-to-camera videos: cuts silences and repeated takes, adds zoom between cuts, word-by-word subtitles in the style of your design-system.md, music and a watermark. All free with Whisper and ffmpeg. Use it when you have a recorded video to edit.

What is edit-video?

edit-video is a Claude Code agent skill that edits vertical talking-to-camera videos: cuts silences and repeated takes, adds zoom between cuts, word-by-word subtitles in the style of your design-system.md, music and a watermark. All free with Whisper and ffmpeg. Use it when you have a recorded video to edit.

Works with✓Claude Code~Codex CLI~Cursor✓Gemini CLI
npx skills add https://github.com/luisverabyte/automated-video/tree/HEAD/edit-video

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation


name: edit-video description: Edits vertical talking-to-camera videos: cuts silences and repeated takes, adds zoom between cuts, word-by-word subtitles in the style of your design-system.md, music and a watermark. All free with Whisper and ffmpeg. Use it when you have a recorded video to edit.

Edit video with subtitles

You record; this skill cuts, adds subtitles in your style, adds music and hands you the video ready to review. It runs on your computer with free tools: Whisper (transcribes) and ffmpeg (edits).

Where it works

  • Claude Code or Claude Cowork with access to a folder: it does everything on its own. This is the recommended way.
  • A chat without access to your computer (Claude.ai, ChatGPT, Gemini): it can't edit large files. It switches to guide mode: it gives you the commands to paste into your terminal, or the steps to do it in CapCut ("No terminal" section).

Before you start

  1. Your design-system.md (format design-system-v1). Read subtitles, color, typography, video, logo and the Video section. If it doesn't exist, use the defaults, say so in one line and suggest the design-system skill. If a key is missing, default plus a heads-up; never block.
  2. The script (optional, helps a lot): it's used to spell proper names right and to spot repeated lines.
  3. Tools, once. Check with ffmpeg -version and python3 --version; if something's missing, install it or explain to the person how:
    • ffmpeg: Mac brew install ffmpeg; Windows winget install ffmpeg; Linux sudo apt install ffmpeg.
    • Python 3.9 or newer, then pip install faster-whisper pyyaml numpy.
    • The first transcription downloads the Whisper model (about 500 MB for small); after that it works offline.
    • On Windows, if python opens the Microsoft Store, use py or Python's full path. If the PC has an NVIDIA card without CUDA installed, the script falls back to CPU on its own.

The scripts are in scripts/ inside this skill. Work in one folder per video (videos/<topic>/) and never overwrite the raw footage.

Steps

1. Check the raw footage

ffprobe the video: resolution, length, fps and whether it's HDR (color_transfer arib-std-b67 or smpte2084). If it's HDR, warn them: colors can look washed out on social media; the cut step converts it to a normal video, but it's better to record in SDR next time. If it's horizontal, the cut crops it to vertical from the center: say so.

2. Find what stays

python3 scripts/subtitles.py transcribe raw.mp4 -o raw.json --script script.md --language en
python3 scripts/cut.py raw.mp4 --list > segments.txt

Pass --language with the code in brand.language from the design system.

With the transcript and the segments:

  • If a line is repeated, the last take stays (it's almost always the good one). Remove the earlier ones from segments.txt.
  • Cut by audio energy (the segments from cut.py), not by Whisper's timestamps: Whisper marks the end of a word before the real audio ends and invents words in noise.
  • Remove what the person said outside the script if it sounds like a mistake ("wait, again").
  • Respect the cuts the person already made while recording.
  • Never cut right against a word: leave at least 0.15 s of breathing room.
  • If something said changes the meaning of the script or a key line is missing, don't cover it up: say what to re-record.

3. Cut

python3 scripts/cut.py raw.mp4 -o cut.mp4 --segments segments.txt

It removes long pauses, sets the video to 1080x1920 and alternates the framing between 100% and 110% on each cut (the jump feels like a camera change). Adjust to video.pace: slow → --pause 0.9 --zoom 1.06; fast → --pause 0.4 --zoom 1.12. With --zoom 1 there's no zoom.

4. Transcribe the cut video and correct it

python3 scripts/subtitles.py transcribe cut.mp4 -o transcript.json --script script.md --language en

Open transcript.json and compare each word with the script. Fix the spelling of names, brands, numbers and terms (change only the "w" text, never the "s" and "e" timestamps). What was actually said goes on screen: if they said something different from the script, keep what was said. Always do this, Whisper gets proper names wrong.

5. Subtitles

python3 scripts/subtitles.py burn cut.mp4 transcript.json -o subtitled.mp4 --ds design-system.md

It reads the subtitles section: font (or typography.headings), weight, size, color, color of the word being spoken (highlight), outline, box, position, words per line, lines and uppercase. It tries to download the font from Google Fonts; if it isn't there, ask for the .ttf and pass it with --fonts folder/. They always stay inside video.safe_zone, away from the TikTok, Reels and Shorts buttons.

It also leaves subtitled.srt: upload it as captions on YouTube or LinkedIn if the person prefers subtitles that can be turned off.

If subtitles.enabled is false, skip this step.

6. Level 2 (optional): overlays, B-roll and sound effects

If the person wants more than cuts and subtitles, or video.broll and video.sound_effects call for it, read pro-style.md before planning: continuity between the person and the graphics, kinds of support per sequence, zooms, sound effects and full quality control. Make the asset plan, a 3-second sample and then the render. It's composited on top of cut.mp4 and before step 5 (burn the subtitles again on the result), so the subtitles sit on top and nothing covers them. Overlays don't change the timing, so transcript.json still works.

7. Music (if video.music isn't none)

Suggest 3 royalty-free songs cleared for social media that fit the tone (YouTube Audio Library, Mixkit, Pixabay Music) and wait for them to pick. Never copyrighted music, and no AI-generated music unless the person asks.

python3 scripts/music.py subtitled.mp4 song.mp3 -o final.mp4 --volume -20

The music ducks on its own when there's voice. soft → --volume -22; featured → --volume -14.

8. Watermark (if logo.watermark has something)

Text, in the headings font and bottom right inside the safe zone:

ffmpeg -i final.mp4 -vf "drawtext=text='@username':fontfile=fonts/Font.ttf:fontsize=34:[email protected]:x=960-tw:y=1250-th" -c:a copy final-watermark.mp4

If it's a PNG logo: -i logo.png -filter_complex "[1]format=rgba,colorchannelmixer=aa=0.35,scale=140:-1[l];[0][l]overlay=960-w:1250-h". Use logo.watermark_opacity.

9. Check before delivering

  • Grab a frame at each cut and at 3 moments with subtitles (ffmpeg -ss <t> -i final.mp4 -frames:v 1 f.png) and look at them: no text outside the safe zone or covering the face.
  • Listen to the cuts: no clipped words.
  • Loudness: ffmpeg -i final.mp4 -af loudnorm=print_format=summary -f null -. For social media, between -16 and -14 LUFS integrated; if it's too quiet, normalize with loudnorm=I=-14:TP=-1.5:LRA=11.
  • The subtitles say the same as the audio, word for word.

10. Deliver

The video goes as a file in the project folder (or as a download if the AI allows it); if you're in Claude with artifacts, you can add a page with the video so they can watch it on their phone. Short message with the final video, what was cut (repeated takes, pauses), which words you corrected in the subtitles and which song made it in. Never publish or schedule anything unless the person explicitly asks.

No terminal: CapCut (free)

If the person can't run the scripts:

  1. Import the video and use Text > Auto captions in the video's language.
  2. Correct it word by word against the script.
  3. Apply the design system style: font, size, color, outline, position and word highlight color (if their version allows it).
  4. Use Remove pauses or cut by hand, leaving breathing room.
  5. Export at 1080x1920, 30 fps.

A paid alternative: OpusClip, which does subtitles and auto-trimming; load the design system's font and colors there as a brand template.

Hard rules

  1. Review before publishing: deliver the MP4 and wait for the go-ahead. Never publish or schedule without a "publish it".
  2. Mistakes in the raw footage: a one-off gets patched in the subtitle with an asterisk ("word*"). If there are several (a word that changes the meaning, missing lines, a different ending), don't cover them up: report the list, the patch and what to re-record.
  3. Edit copies; the raw footage stays untouched and you don't delete the person's files.
  4. Safe zone: everything meant to be read goes inside video.safe_zone (by default x 120 to 960, y 270 to 1250 at 1080x1920). Outside it, images only. Check these measurements against each platform's current interface.
  5. On screen, what was actually said. Respect the cuts the person made while recording.
  6. Nothing AI-generated (images, voices, music, video) without approval, and nothing copyrighted.
  7. Quality: everything in SDR bt709; if the raw footage is 1080p, warn that it's the quality ceiling. Details in pro-style.md.
  8. Respect the design system's Limits section.

Original kit "My videos, automated in 3 steps" by Luis Vera (@luisverabyte) · https://luisverabyte.com · MIT License: you can use and adapt it as long as you keep this credit.

Individual skills in this repo

This repo contains 2 individual skills — each has its own dedicated page.

Related Skills