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.

Examples

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

Adding a Clip Limit and Cleanup: Find up to 10 clips containing the word "Python" and delete all temporary files after the final video is created.

python main.py -c UCjD_v1n9V7k-jQ8m_p3h9Jg -s "Python" -l 10 --cleanup

📄 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 Distribution

yt_concat-0.1.1.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

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

yt_concat-0.1.1-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file yt_concat-0.1.1.tar.gz.

File metadata

  • Download URL: yt_concat-0.1.1.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for yt_concat-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3d9d32c187623cc466c312fba96dc58e10cb65bbe66fe0906d3a36e5fba576e1
MD5 902de0948f180296aa1724539a71f020
BLAKE2b-256 a45a6c7977e11dc5e4e5a5735284156238e6743873df27706614bf71d0557d12

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yt_concat-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 68ecc62c78d13f0db5f32dd9ea558f276344a3230634bf529f6e4ab9572a6561
MD5 23f02ddc4e3238e79c1b0d46847b3668
BLAKE2b-256 75134785bf9565f77178009534bbb82ef919740ce59ba0cf93f0420299cbc8c7

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