CapScript Pro, GUI Based YouTube Transcript Search Tool
CapScript Pro is a Windows desktop application for searching YouTube captions at scale, then turning those findings into usable media outputs.
This repository includes:
- A modern Qt/C++ desktop app.
- An embedded Python engine for yt-dlp transcript fetching and search logic.
- A standalone Python CLI for headless/automation workflows.
- Overview
- Desktop App Features
- How the Embedded Python Engine Works
- Tech Stack and Dependencies
- Project Structure
- Desktop App Setup
- Build and Run (Qt App)
- CLI Guide
- CLI Setup and Requirements
- CLI Usage
- CLI Examples
- Troubleshooting
- License
CapScript Pro solves a practical workflow:
- Find subtitle matches for a keyword across videos.
- Review exact timestamps inside the built-in viewer.
- Extract clips from the matched moments.
- Render clips into a final output video.
- Build reusable video ID lists for future runs.
The UI is native Qt (C++), while core YouTube logic is powered by Python.
v2.5 — No more YouTube Data API. The app no longer uses the YouTube Data API at all. It was too restrictive, had an embarrassingly low quota, and broke constantly — sometimes for no apparent reason. Everything now runs through yt-dlp directly, which is faster, more reliable, and doesn't require you to register an API key, manage credentials, or hit an arbitrary daily limit. Good riddance.
- Search Page: Handles flexible search queries for videos or channels. Includes advanced network settings (proxy, cookies), language selection, and encrypted credential persistence.
- Viewer Page: Displays structured transcripts with clickable timestamps and supports in-app video playback. Allows users to export or import transcript files.
- Clip Downloader: Parses transcripts to identify specific clips for download. Supports various formats (mp4, mkv, webm, mp3), quality controls, and uses worker threads for efficient background processing.
- Renderer Page: Merges downloaded clips into a single final video using FFmpeg. Auto-detects formats and utilizes stream copying for fast, lossless concatenation.
- List Creator: Fetches channel videos based on date ranges or keywords. Provides a selectable list with thumbnail previews and options to export video IDs.
- System & Support: Includes an integrated update checker that stages updates automatically.
The desktop app starts a bundled Python runtime and imports capscript_engine.py through a C++ bridge.
High-level flow:
- The app resolves Python runtime paths near the executable.
- PythonBridge initializes Python with controlled module search paths.
- C++ invokes Python functions for:
- Proxy settings storage/loading.
- Channel resolution and video lookups.
- Transcript search execution.
- Search progress is sent back into C++ via callback trampolines and displayed in UI/CLI.
This split keeps the UI native and fast while preserving Python ecosystem advantages for YouTube-related operations.
- C++17
- Qt 6 modules:
- Core, Gui, Widgets, Network, Concurrent, Svg
- Optional: Multimedia, MultimediaWidgets
- Optional: Quick, Qml, QuickWidgets, WebView, WebViewQuick
- Python 3 interpreter + development libs for embedding
- Windows WebView2 runtime/SDK (optional but recommended for in-app player)
From python/requirements.txt:
- yt-dlp
- cryptography
- rich
Required for clip download/render features:
- yt-dlp
- ffmpeg
- ffprobe (normally included with ffmpeg)
The app looks for tools in:
- app/bin/
- app root
- system PATH
Cloudflare Worker (TypeScript) for feedback delivery and basic rate limiting.
- src/: Qt C++ application and workers
- python/: capscript_engine.py + cli.py + Python requirements
- scripts/: utility scripts (including embedded runtime bundling)
- qml/: QML resources for web player integrations
- assets/: app fonts, icons, resources
- cloudflare-worker/: optional feedback backend
- docs/: web documentation assets
- third_party/webview2/: WebView2 SDK assets
- Windows 10/11
- CMake 3.21+
- Qt 6 (matching your compiler toolchain)
- Python 3 with headers/libs discoverable by CMake
- Optional but recommended: WebView2 runtime installed
- Optional for clip/render workflow: yt-dlp and ffmpeg available
Use the provided script to package embeddable Python + pip dependencies into a target python folder:
python scripts/bundle_python.py 3.11.9 .\python .\python\requirements.txtExample CMake flow (Visual Studio generator):
cmake -S . -B build -G "Visual Studio 17 2022" -A x64
cmake --build build --config ReleaseRun the desktop app from build output after ensuring python/ runtime assets are present near the executable.
The repository includes a full command-line interface in python/cli.py for non-GUI usage.
Use CLI when you need:
- Automation (batch jobs, scripting, CI-like tasks).
- Remote/headless execution.
- Fast one-off searches without opening the desktop app.
Recommended: Python 3.10+.
cd python
python -m pip install -r requirements.txtNo API key is required. CapScript Pro runs entirely through yt-dlp.
For authenticated requests (age-restricted content, private playlists, etc.) pass cookies directly from your browser — no manual export needed:
--cookies-from-browser chrome|firefox|edge|braveLegacy API-key CLI flags are accepted as no-ops for compatibility with older scripts.
- Cookies file (Netscape/Mozilla format):
--cookies path\to\cookies.txt - Cookies from browser (new):
--cookies-from-browser chrome|firefox|edge|brave - Proxy modes:
--proxy-type websharewith username/password--proxy-type genericwith proxy URL
- Persist proxy settings with
--save-proxy - Clear saved proxy with
--clear-proxy
python cli.py --search-type channel --channel "@mkbhd" --keyword "sponsors" --max-results 20--search-typechannel or video--keyword"your search term"- For channel mode:
--channel - For video mode:
--video-ids
--language en--output-dir transcripts--cookies FILE--cookies-from-browser chrome|firefox|edge|brave--proxy-type,--proxy-username,--proxy-password,--proxy-url--save-proxy,--clear-proxy
python cli.py --search-type channel --channel "@mkbhd" --keyword "sponsors" --max-results 20python cli.py --search-type video --video-ids "https://youtu.be/dQw4w9WgXcQ,abc123XYZ00" --keyword "never gonna"python cli.py --search-type channel --channel "@mkbhd" --keyword "AI" --cookies-from-browser chromepython cli.py --search-type channel --channel "UCxxxxxx" --keyword "AI" --proxy-type webshare --proxy-username USER --proxy-password PASS --cookies cookies.txtpython cli.py --proxy-type generic --proxy-url "http://1.2.3.4:8080" --save-proxy
python cli.py --search-type video --video-ids abc123 --keyword test- Python engine fails to initialize in app: Ensure python/ exists near the executable and contains runtime artifacts (Lib, python3xx zip, required modules).
- No transcript results: Try
--cookies-from-browseror a cookies.txt file, and verify the language code is available for each video. - Clip download/render not working: Confirm yt-dlp and ffmpeg are installed and discoverable. Check app logs for tool path and process errors.
- Rate limiting or access errors: Use
--cookies-from-browserto pass your browser session. Reduce parallel activity and retry later.
Please report bugs by opening an issue on GitHub.
This project is licensed under the MIT License + Commons Clause v1.0.
You are free to use, modify, and distribute this software for free, but you may not sell it or offer it as a paid/SaaS service.
See the LICENSE file for the full text.