Skip to content

serptail/CapScript-Youtube-Subtitle-Search-Tool

Repository files navigation

Support me on Ko-fi

CapScript Pro: YouTube Caption Search & Clip Tool

Python Version License Latest Release

A desktop app for searching YouTube captions, viewing transcripts, downloading clips, and rendering them into a single video.

Image Description


Table of Contents


Overview

CapScript Pro is built with Python and PySide6. It lets you search YouTube captions by channel or video ID, view transcripts with a synchronized video player, download clips around matched timestamps, and stitch those clips together into one file. It also includes a video list builder and a CLI for scripting.

Features

  • Caption Search: Search by channel ID or one or more video IDs (direct input or .txt file). Filter by keyword and language, with real-time progress and logging.
  • Transcript Viewer: Load search results or standalone transcript files. Click any timestamp to jump to that point in an embedded YouTube player.
  • Clip Downloader: Download short clips around matched timestamps using yt-dlp and ffmpeg. Both are downloaded and set up automatically if not found.
  • Video List Creator: Find videos by channel, date range, or title keyword. Drag and drop YouTube URLs to add them. Save lists for use in the Search tab.
  • Clip Renderer: Concatenate downloaded clips into a single video file using ffmpeg.
  • API Key Management: Save your YouTube Data API key locally with an option to show or hide it.
  • CLI Support: Full command-line interface for scripting and automation.
  • Organized Output: Results are saved into transcripts, transcripts/clips, and video_lists folders.

Prerequisites

For running from source only — not needed for the pre-built release.

  • Python 3.8+
  • Install dependencies:
pip install PySide6 google-api-python-client google-auth-httplib2 google-auth-oauthlib youtube-transcript-api requests

Or use the requirements file:

pip install -r requirements.txt

Installation & Usage

Method 1: Pre-built Executable

  1. Go to the Releases page and download CapScriptPro.exe.
  2. Run it from any directory.
  3. On first launch, go to the Search tab, enter your YouTube Data API key, and click "Save Key". It's stored in preferences.ini.

Method 2: Running from Source

  1. Clone the repo:
git clone https://github.com/bitArtisan1/CapScript-Pro.git
cd CapScript-Pro
  1. Install dependencies:
pip install -r requirements.txt
  1. Run:
python gui_main.py
  1. Add your API key in the Search tab.

Command-Line Interface (CLI)

python cli.py [ARGUMENTS]

Arguments:

  • --api-key YOUR_API_KEY — Provide API key directly (optional if already saved)
  • --save-api-key — Save the provided key to preferences.ini
  • --search-type {channel,video}Required
  • --keyword "YOUR_SEARCH_TERM"Required
  • --language LANG_CODE — Default: en
  • --output-dir PATH — Default: transcripts

For channel search:

  • --channel-id CHANNEL_IDRequired
  • --max-results NUMBER — Default: 10

For video search:

  • --video-ids "ID1,ID2" or path to a .txt file — Required

Examples:

Search the last 5 videos of a channel:

python cli.py --search-type channel --channel-id "UCxxxxxxxxxxxxxxxxxxxxxx" --keyword "python tutorial" --max-results 5 --api-key "YOUR_API_KEY" --save-api-key

Search specific video IDs:

python cli.py --search-type video --video-ids "dQw4w9WgXcQ,anotherVideoID" --keyword "data science"

The CLI and GUI share the same preferences.ini when run from the same directory.


Obtaining a YouTube Data API Key

  1. Go to the Google Developer Console and create a project.
  2. Go to "APIs & Services" > "Dashboard", click "+ Enable APIs and Services", search for "YouTube Data API v3", and enable it.
  3. Go to "Credentials" > "Create Credentials" > "API key".
  4. Restrict the key — recommended for security.

Finding a YouTube Channel ID

The channel ID is usually in the URL: https://www.youtube.com/channel/UCxxxxxxxxxxxxxxxxxxxxxx

If it's not there, open the page source and search for channelId or externalId.


Notes

  • preferences.ini stores your API key and UI settings.
  • yt-dlp and ffmpeg are downloaded to a local bin folder if not already present.
  • Videos without captions in the selected language are skipped.
  • Keep an eye on your YouTube Data API quota.

License

Licensed under GNU GPL v3.0 — see the LICENSE file for details.


Support Me

If you find it useful — star the repo, share it, or leave feedback.

Support me on Ko-fi

Tags

YouTube Caption Search, YouTube Transcript Viewer, YouTube Clip Downloader, Subtitle Search Tool, Timestamped Captions, Batch Video Processing, Video Keyword Search, yt-dlp GUI, ffmpeg GUI, Python YouTube Tool, Content Repurposing, Open Source Video Tools


Issues & Feature Requests

For any issues or feature requests, please open an issue on GitHub.

octodance

About

A desktop app for searching YouTube captions across channels or videos, viewing transcripts synced to a video player, downloading clips around matched timestamps, and rendering them into a single file. Also includes a CLI for scripting and automation.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages