onlyedit.club

AI and workflow

Build your own clipping tool for long videos

A step-by-step guide to a small clipping tool: transcribe a long video with Whisper, find clip moments, cut vertical clips with ffmpeg and burn in captions.

Updated

Clipping services charge monthly for something you can run on your own computer: transcribe a long video, choose the best moments, cut them to vertical, and add captions. This guide builds a small version with free tools. You need to be comfortable running commands in a terminal; no other coding experience is assumed.

Only clip videos you own or have permission to edit. Clipping someone else’s content without permission can break copyright law and platform rules.

What you will build

  1. Transcribe the video into text with timestamps (Whisper).
  2. Pick moments, by hand or with an AI assistant reading the transcript.
  3. Cut each moment and reframe it to 9:16 (ffmpeg).
  4. Caption it by burning subtitles into the clip (ffmpeg).

Tools

  • ffmpeg: free command-line video tool. Install it from your system’s package manager (brew install ffmpeg on a Mac, winget install ffmpeg on Windows, sudo apt install ffmpeg on Ubuntu).
  • Python 3.
  • faster-whisper: an open-source speech-to-text library based on OpenAI’s Whisper model. Install with pip install faster-whisper. It runs on the CPU; a supported NVIDIA graphics card makes it much faster.

Step 1: transcribe with timestamps

Save this as transcribe.py:

import sys
from faster_whisper import WhisperModel

video = sys.argv[1]
model = WhisperModel("small", device="auto")  # "medium" or "large-v3" are more accurate but slower
segments, info = model.transcribe(video, vad_filter=True)

def ts(t):
    h, rem = divmod(t, 3600); m, s = divmod(rem, 60)
    return f"{int(h):02}:{int(m):02}:{s:06.3f}".replace(".", ",")

with open("transcript.srt", "w", encoding="utf-8") as srt, open("transcript.txt", "w", encoding="utf-8") as txt:
    for i, seg in enumerate(segments, 1):
        srt.write(f"{i}\n{ts(seg.start)} --> {ts(seg.end)}\n{seg.text.strip()}\n\n")
        txt.write(f"[{ts(seg.start)[:8]}] {seg.text.strip()}\n")
print("Wrote transcript.srt and transcript.txt")

Run it:

python transcribe.py episode.mp4

You now have transcript.txt (readable, with times) and transcript.srt (subtitles for the whole video).

Step 2: pick the moments

Read transcript.txt and note the start and end of each moment worth a clip. Good clips usually:

  • start on a strong line, not a lead-in like “so, yeah”;
  • make one point and finish it;
  • run 20 to 60 seconds.

To speed this up, paste the transcript into an AI assistant such as Claude and ask for “five self-contained moments of 20 to 60 seconds, each with start and end times and a hook line”. Then watch each one yourself: timings and judgement need a human check (more in using Claude in your editing workflow).

Write your picks into clips.txt, one per line, as start end name:

00:03:12 00:03:58 pricing-mistake
00:17:40 00:18:25 first-client-story

Step 3: cut and reframe to vertical

This command cuts from 00:03:12 to 00:03:58, crops the centre of a 16:9 video to 9:16, and scales it to 1080x1920:

ffmpeg -ss 00:03:12 -to 00:03:58 -i episode.mp4 -vf "crop=ih*9/16:ih,scale=1080:1920" -c:v libx264 -crf 20 -preset medium -c:a aac -b:a 160k pricing-mistake.mp4
  • -ss before -i seeks quickly; the cut starts at the nearest frame ffmpeg can decode, which is fine for clips.
  • crop=ih*9/16:ih keeps the full height and takes a centred slice. If the speaker sits to one side, add an offset: crop=ih*9/16:ih:x=200:y=0.
  • -crf 20 is high quality; higher numbers make smaller files.

Step 4: burn in captions

Cut the matching subtitles for the clip, then burn them in. The simplest route is to transcribe the finished clip itself, which gives captions with times that start at zero:

python transcribe.py pricing-mistake.mp4
ffmpeg -i pricing-mistake.mp4 -vf "subtitles=transcript.srt:force_style='Fontsize=14,Alignment=2,MarginV=60,Outline=2'" -c:a copy pricing-mistake-captioned.mp4

Alignment=2 places captions at the bottom centre and MarginV lifts them above the platform’s buttons. Try a few values on your phone before you settle on a style.

Step 5: do it in one go

Save this as make_clips.py to cut every line in clips.txt:

import subprocess

src = "episode.mp4"
for line in open("clips.txt", encoding="utf-8"):
    parts = line.split()
    if len(parts) != 3:
        continue
    start, end, name = parts
    out = f"{name}.mp4"
    cmd = ["ffmpeg", "-y", "-ss", start, "-to", end, "-i", src,
           "-vf", "crop=ih*9/16:ih,scale=1080:1920",
           "-c:v", "libx264", "-crf", "20", "-preset", "medium",
           "-c:a", "aac", "-b:a", "160k", out]
    print("Cutting", out)
    subprocess.run(cmd, check=True)

The script passes arguments as a list, never through a shell, so names in clips.txt cannot run unexpected commands.

Where to take it next

  • Face tracking to follow the speaker instead of a fixed crop (OpenCV or MediaPipe can find faces per frame).
  • Word-by-word captions: faster-whisper can return word timestamps (word_timestamps=True).
  • Loudness: normalise audio for phones with ffmpeg’s loudnorm filter.
  • A simple interface: wrap the scripts in a small web page or a desktop app.

A tool like this does the mechanical half of clipping. Choosing the moments, the first frame and the caption style is the skill clients pay for. If you offer clipping as a service, list it on your 99editors profile.

Get hired at your price

On 99editors, clients see your reel and your starting price before they message you. The profile is free and there is no commission on your work.

Create a free editor profile