Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

YouTube Shorts Caption Generator

Generate professional YouTube Shorts with perfectly synchronized speech captions from any video.

Features

  • YouTube Shorts with Synchronized Captions: Convert any video into YouTube Shorts format with perfectly timed captions that only appear when people are talking
  • Speech Detection: Advanced algorithm detects when people are speaking and only shows captions during those moments
  • Multiple Shorts Generation: Automatically extracts the most engaging segments from longer videos
  • Professional Formatting: Captions are placed with proper timing, fading, and formatting for maximum engagement

Requirements

  • Python 3.8+
  • Flask
  • OpenCV
  • MoviePy
  • SpeechRecognition
  • ImageMagick (for text rendering)
  • FFmpeg (recommended)
  • yt-dlp (for YouTube video downloads)

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/youtube-shorts-caption-generator.git
cd youtube-shorts-caption-generator
  1. Install the required packages:
pip install -r requirements.txt
  1. Install external dependencies:

Usage

  1. Start the Flask application:
python run.py
  1. Open your web browser and go to http://127.0.0.1:5000

  2. Either:

    • Enter a YouTube URL in the input field
    • Upload a video file using the file picker
  3. Click "Generate Captioned Shorts" and wait for processing to complete

  4. View and download your captioned shorts!

How it Works

  1. Video Input: Process YouTube videos or uploaded files
  2. Speech Detection: Analyze audio to detect when people are talking
  3. Segment Extraction: Identify and extract the most engaging segments
  4. Caption Generation: Transcribe speech and generate precisely timed captions
  5. Shorts Formatting: Convert to vertical 9:16 format with professional caption styling
  6. Output Generation: Create downloadable MP4 files ready for YouTube Shorts

Configuration

You can modify various settings in the .env file:

  • UPLOAD_FOLDER: Where processed videos are stored
  • TEMP_FOLDER: For temporary processing files
  • YOUTUBE_API_KEY: Optional YouTube Data API key for enhanced features

License

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

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages