/Auto-YouTube-Shorts-Maker

Automatically generate youtube shorts easily with this simple script!

Primary LanguagePython

Auto Youtube-Shorts

🤖 Automatically generate YouTube shorts simply by running the script!

📝 Table of Contents

  1. About
  2. Demo
  3. How it works
  4. Getting Started
  5. Usage
  6. Built Using
  7. Note

🧐 About

From creation to editing and voiceover too for a YouTube short, this script automates it all. No more tedious tasks, endless hours, this script has you covered!

Absolutely free!

🎥 Demo

Working

  • NOTE : This video is trimmed but it shouldn't take more than 1 minute to generate your video.

💭 How it works

#1 Content

The script starts by taking the video name and asking if the user wants to generate content using AI (which can be edited later).

#2 Text-to-Speech

After the content is generated / entered by the user, it generates Text-to-Speech and saves the file as `speech.mp3`.

#3 Editing

The editing starts by selecting a gameplay, trimming a random part of it and adding speech on top of it. Next, it resizes the video to 9:16 aspect ratio and saves the final video.

🏁 Getting Started

Follow the instructions given below to get this script up and running on your device.

Prerequisites

  1. OpenAI API Key - Get it from the Open AI Website. It provides $18 of free credits by default and they are more than enough. [OPTIONAL]
  2. OpenAI - pip install openai
  3. gTTS - pip install gtts
  4. MoviePY - pip install moviepy
  5. Dotenv - pip install python-dotenv

Installing

  1. Download this repository as zip file / using git.
  2. Open the folder.
  3. Make sure the above mentioned modules are installed. (pip install -r requirements.txt)
  4. Add your OpenAI API key to .env.example file (OPENAI_API=<key>) and rename it to just .env [OPTIONAL]
  5. Now, download both the gameplay videos from Google Drive (as they were too large to upload to Github)
  6. Put both the videos in a folder named "gameplay" in the directory with shorts.py file.
  7. Run the shorts.py python file.

🎈 Usage

To use this script,

  1. Run the shorts.py python file.
  2. Enter the name of the video.
  3. Let AI generate video content for you / enter it yourself.
  • NOTE : (Make sure you have added your OpenAI API key in .env file if using AI to generate content)
  1. And that's it! Everything else will be handled automatically!
  2. You can find your video in generated/ directory.

<sup>Beep boop, boop beep. I am a script. If there are any issues, contact my Creator - BedrockGranny#8331 and/or bedrockgranny on Discord </sup>

⛏️ Built Using

  1. OpenAI API - For generating video content.
  2. gTTS - For Text-to-Speech.
  3. MoviePY - For video editing.

🗒️ Note

Note that this script is very basic as of now and does not generate any graphics like images or even subtitles. These are some things that I MAY add in the future. If you want to contribute, you are free to do so and you may even fork and improve this repository.

Due to school, exams and irl stuff I don't get much time to work on this project. When I do, I would like to add the above mentioned features. Maybe even a REDDIT video maker but not sure yet.