Automated short motivational video generator with YouTube integration.
This project automatically creates short motivational videos using AI-generated stories, stock footage, text overlays, voice narration, and background music. Videos are then automatically uploaded to YouTube using an n8n workflow, with email notifications upon completion.
- Generates a motivational story with 6–8 scenes, including title, description, and tags using Mistral.
- Searches for matching stock videos from Pexels API.
- Converts story text into voice narration using ElevenLabs TTS.
- Adds subtitles and background music using MoviePy.
- Automatically uploads final video to YouTube via n8n.
- Sends email notifications once the video is uploaded.
- Handles temporary files cleanup automatically.
- Python (MoviePy, Requests)
- ImageMagick
- ElevenLabs Text-to-Speech API
- Pexels Video API
- OpenRouter API (mistral-7b-instruct)
- n8n for workflow automation
- Gmail API for notifications
-
Install ImageMagick (make sure it’s added to PATH):
-
Clone the repository:
git clone https://github.com/ThangakumarC/vdo-gen.git
cd vdo-gen
- Install dependencies:
pip install -r requirements.txt
-
Set up API keys in .env:
PEXELS_API_KEY
ELEVENLABS_API_KEY
OPENROUTER_API_KEY
python app.py
Temporary files are created for each scene and audio, then cleaned automatically. Final video and metadata are saved in C:/n8n_temp for n8n workflow.
The n8n workflow (VdoGen) triggers the script, uploads the video to YouTube, and sends an email notification.
Workflow handles reading metadata and video files, merging them, uploading, and cleaning up temporary files.
Import VdoGen.json into your n8n instance. It automates:
-
Running the Python script
-
Reading generated video + metadata
-
Uploading to YouTube with captions and tags
-
Sending notification email
-
Cleaning temp files
Final Generated video: https://github.com/user-attachments/assets/170feb77-951b-49d4-b036-7ecba023d301

