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.3.tar.gz (12.3 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.3-py3-none-any.whl (23.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yt_concat-0.1.3.tar.gz
  • Upload date:
  • Size: 12.3 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.3.tar.gz
Algorithm Hash digest
SHA256 c74bea591619914a628544535d61d7a19910f20dd4f388680dc450b63433532a
MD5 51138a58106a320ae79e25f197be5628
BLAKE2b-256 51b882311db84d39aa6ab6dcf30f536d68e417305bcf0aa42d739d698b17cd72

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yt_concat-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 23.7 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 15eb6073303ac1ce852c2ff1b24c8026209fcd3cab7bfad200e726991b2d7ad7
MD5 41f3c546d21e8f7227b220214523fd65
BLAKE2b-256 a6b7c668fbe96da768c72547ac6eaac149fb210c5df6117f2bd7662fff730753

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