AI-Youtube-Shorts-Generator is a Python tool designed to generate engaging YouTube shorts from long-form videos. By leveraging the power of GPT-4 and Whisper, it extracts the most interesting highlights, detects speakers, and crops the content vertically for shorts. This tool is currently in version 0.1 and might have some bugs.
- Video Download: Given a YouTube URL, the tool downloads the video.
- Transcription: Uses Whisper to transcribe the video.
- Highlight Extraction: Utilizes OpenAI's GPT-4 to identify the most engaging parts of the video.
- Speaker Detection: Detects speakers in the video.
- Vertical Cropping: Crops the highlighted sections vertically, making them perfect for shorts.
- Python 3.7 or higher
- FFmpeg
- OpenCV
-
Clone the repository:
git clone https://github.com/SamurAIGPT/AI-Youtube-Shorts-Generator.git cd AI-Youtube-Shorts-Generator
-
Install the required Python packages:
pip install -r requirements.txt
-
Set up the environment variables. Create a
.env
file in the project root directory and add your OpenAI API key:OPENAI_API=your_openai_api_key_here
- Ensure your
.env
file is correctly set up with your OpenAI API key. - Run the main script and enter the desired YouTube URL when prompted:
python main.py
Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under the MIT License.
This is a v0.1 release and might have some bugs. Please report any issues on the GitHub Repository.