Automate the creation of YouTube Shorts locally, simply by providing a video topic to talk about.
YoutubeShortCreator
requires Python 3.11 to run effectively. If you don't have Python installed, you can download it from here.
After you finished installing Python, you can install YoutubeShortCreator
by following the steps below:
git clone https://github.com/avonx/YoutubeShortCreator.git
cd YoutubeShortCreator
# Install requirements
pip install -r requirements.txt
# Copy .env.example and fill out values
cp .env.example .env
# Run the python program
python generate_video.py
# Alternatively, run this to upload videos to youtube automatically.
python upload_video.py
See .env.example
for the required environment variables.
- Copy the
.env.example
file to.env
and fill in the required values - Run this command
python generate_video.py
- Enter a topic to talk about
- Wait for the video to be generated
- The video's location is
output/<タイトルは自動的に生成されます>.mp4
To use Style-Bert-VITS2 for voice synthesis, follow these steps:
-
Deploy
Style-Bert-VITS2
as an API server. Documentation here. -
In your
.env
file, specify the API endpoint:TTS_API_URL=http://your-api-server-address/voice
-
Adjust parameters in
src/text2voice.py
as needed to match the API's requirements.
To use this feature, you need to:
-
Create a project inside your Google Cloud Platform -> GCP.
-
Obtain
client_secret.json
from the project and add it to the Backend/ directory. -
Enable the YouTube v3 API in your project -> GCP-API-Library
-
Create an
OAuth consent screen
and add yourself (the account of your YouTube channel) to the testers. -
Enable the following scopes in the
OAuth consent screen
for your project:'https://www.googleapis.com/auth/youtube.upload'
See LICENSE
file for more information.