Skip to main content

Produce a concatenated video of clips that mention a specific word from the YouTube channel.

Project description

YT-Concat

This is a powerful command-line tool that automates the process of finding specific content within a YouTube channel. It works by searching through the captions of a channel's videos for a given keyword, extracting the relevant video segments, and merging them into a single, cohesive video.

Whether you're compiling highlights from a long lecture series, creating a supercut of a catchphrase, or just summarizing a channel's content, this tool helps you efficiently pinpoint and combine the moments that matter.


🛠 Key Features

  • Channel-Based Search: Target a specific YouTube channel using its ID.
  • Caption-Driven: The tool searches video captions for a specified keyword to find exact segments.
  • Automated Pipeline: Handles the entire process, including getting video lists, downloading captions, searching, downloading video clips, and editing the final output.
  • Concise Output: Extracts only the relevant segments, resulting in a single, focused video file.
  • Robust Logging: All actions and potential errors are logged to a dedicated file and the console, making it easy to track progress and debug.
  • File Cleanup: An optional flag allows you to automatically remove all downloaded video and caption files after the process is complete.

💻 How to Use

1. Prerequisites

Make sure you have Python 3.x installed. Then, install the required libraries by running:

pip install -r requirements.txt

2. Usage

This is a command-line tool. All interactions are done via your terminal. You must provide a channel ID and a search word.

Command Syntax:

python main.py -c <channel_id> -s <search_word> 
Short Option Long Option Description
-c --channel (Required) The YouTube channel ID to process.
-s --searchword (Required) Keyword to find matching segments in captions.
-l --limit (Optional) Maximum number of fragments to extract based on the keyword.
--cleanup (Optional) Automatically remove all downloaded files after processing.
-a --apikey (Required) Set your YouTube api key.

Examples

Basic Usage: Search the specified channel for all instances of "AI" and create a single video from the found clips.

python main.py -c UCjD_v1n9V7k-jQ8m_p3h9Jg -s "AI" -l 10 -a YOUR_API_KEY

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.

📫 Contact / Support

For questions, bug reports, or feature requests, please contact the developer at: eugenechan526@gmail.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yt_concat-0.1.7-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

Details for the file yt_concat-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: yt_concat-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 24.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for yt_concat-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 9707de80b8729ac969d4930f26cbb700016079b063b825a266da4849fa269d9e
MD5 9dd06f8377010574794651fc1677ed51
BLAKE2b-256 1ce62f067e117f793ecf51edcf1cc1c74759bc533e5ce6ba0b796c29191e4549

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page