Clipper X is a local desktop tool for finding and cutting short-form clips from long videos. It can use YouTube subtitles, local subtitle files, or WhisperX-generated captions, then asks a local GGUF model through llama-server to identify self-contained YouTube Shorts/TikTok moments.
The app is currently implemented in main.py with a Tkinter UI.
Clipper X runs this pipeline:
- Load a YouTube URL or local video file.
- Download or locate subtitles, or generate fresh captions with WhisperX.
- Parse captions into timestamped transcript blocks.
- Chunk the transcript into overlapping analysis windows.
- Start
llama-serverwith the selected GGUF model. - Ask the model to find viral, self-contained short-form moments.
- Expand candidate timestamps into complete clips.
- Let you manually choose candidates from a review window.
- Cut selected clips with FFmpeg.
- Write a
manifest.txtwith hook, context, reason, score, and file path.
- Windows
- Python 3.12
- FFmpeg in
PATH - yt-dlp in
PATH requests- llama.cpp
llama-server.exe - A GGUF chat/instruct model
- Optional: WhisperX for better captions
The current script expects paths to llama-server.exe and a model folder defined near the top of main.py. Edit those variables to match your local setup before running.
Use Python 3.12:
py -3.12 main.pyThere is also a run.bat file in the project folder.
YouTube URL: downloads the video and subtitle files withyt-dlp.Local Video File: uses a video already on disk.
For local video mode, Clipper X looks for a matching .srt or .vtt next to the video.
Auto (SRT then WhisperX): use existing/downloaded subtitles first; use WhisperX only if no subtitle file exists.Existing SRT only: require an existing subtitle file.WhisperX: ignore existing subtitles and generate fresh captions.
Choose WhisperX when YouTube auto-captions are messy, repetitive, or poorly timed.
WhisperX Model:smallis a good first test.mediumis more accurate but slow on CPU.Device: usecpuon Windows with an AMD GPU.
The app extracts a 16 kHz mono WAV with FFmpeg before calling WhisperX. Generated captions are saved in:
{output folder}\whisperx_captions
Max Clips: maximum clips you can select/export.Max Chunks: transcript chunks to analyze.0means all chunks.Min Clip Seconds: minimum final clip length.Max Clip Seconds: maximum final clip length.
For quick testing, use a small chunk count like 1 or 2. For a full run, use 0.
The model is asked to return JSON objects with:
{
"start_time": 0.0,
"end_time": 30.0,
"context": "one sentence describing what happens at this moment",
"reason": "one sentence why a viewer would stop scrolling for this",
"hook": "2-3 word thumbnail title for this clip",
"score": 8
}Only moments scoring 6 or higher are accepted.
Clipper X writes:
{output folder}\clips\
{output folder}\manifest.txt
Clip filenames look like:
clip_01_score8.mp4
The manifest includes the hook, context, reason, score, timestamps, and output file path.
Clipper X saves UI settings to:
clipharvester_settings.json
It remembers paths, caption mode, WhisperX settings, model path, clip limits, and source mode between runs.
Delete that file to reset remembered settings.
Install WhisperX with:
py -3.12 -m pip install whisperxOr from a local wheel:
py -3.12 -m pip install "path\to\whisperx.whl"If imports fail after install, repair missing packages with:
py -3.12 -m pip install --force-reinstall pandas scipy scikit-learn
py -3.12 -m pip checkOn Windows with an AMD GPU, use WhisperX with:
Device: cpu
Compute type: int8
The normal WhisperX GPU path uses CUDA, which is for NVIDIA GPUs. AMD acceleration is not cleanly supported by this Windows Python setup.
WhisperX is not installed in the Python environment running the app.
py -3.12 -m pip install whisperxRepair the broken dependency:
py -3.12 -m pip install --force-reinstall pandas scipy scikit-learnThis warning may appear from pyannote. Clipper X passes WhisperX an extracted WAV instead of the original MP4, which avoids many video/audio decoding issues.
The first run may download a model from Hugging Face. medium on CPU can be slow. Test with small first.
Candidates must pass validation:
- score must be at least
6 - final expanded duration must fit your min/max clip settings
- timestamps must be valid
Try increasing Max Clip Seconds or lowering Min Clip Seconds.
main.py Main Tkinter app and pipeline
run.bat Convenience launcher
test_api.py Manual llama-server API smoke test
test_llama.py Manual llama-cpp-python smoke test
models\ Local GGUF models and llama logs
- Hard-coded local paths still need a proper settings UI.
- WhisperX word-level timestamps are not yet used for caption burn-in or cleanup editing.
- Clips are cut with FFmpeg stream copy, so cuts may land near keyframes rather than exact frames.
- Reframing to 9:16, burned captions, thumbnail generation, and final render presets are planned but not implemented yet.