This project produces videos for YoutubeShorts fully-automatic!
No video compilation or editiing skills are needed. Everything is automatically generated.
- Automatically fetch video from Pexels
- Generate voice-over, subtitle using AI, auto compile to one video using
moviepy
main.py
The main scriptscripts/text_to-speech.py
Generate voiceover based on your content using ElevenLabsscripts/video-downloader.py
Fetch videos from Pexels as background videosscripts/generate_subtitle.py
Generate transcript and subtitle for the audio using AssemblyAIscripts/edit_video.py
Edit the videos using moviepy
requirements.txt
Essential Python packages- An ElevenLabs API key
- AssemblyAI API key
- 'ImageMagick' and 'ffmpeg'
-
Clone this project!
-
Setup .csv file: The file should include a 'title' and 'body' data for the script to work
-
Fill in
config.py
: Include API keys inconfig.py
-
Installing dependencies:
Window users:
pip install -r requirements.txt
- Install 'ImageMagik' and 'ffmpeg'
Forffmpeg
refer to this guide
Mac users:
pip install -r requirements.txt
- Install HomeBrew
- Run these 2 commands in the terminal:
brew intsall ffmpeg
brew intsall imagemagick
- Execute script:
Run
main.py
and wait until the program finishes ✅
9-with-subtitle.mp4
Exported files are included in results/
folder of this project
March 26, 2024:
- Refactor codes
- Re-organize files
- Migrate to ElevenLabs for TTS
- Add a custom-built library for getting portrait videos from Pexels
- Add instructions for Mac users
May 9, 2023:
- Add the
config.py
file
April 14, 2023:
- Initial release