This repository was archived by the owner on Sep 27, 2026. It is now read-only.
Repository navigation
Home
Dineth Dilshan Gunawardana edited this page Nov 28, 2025
·
1 revision
Below are all recommended pages. I’ll give you each page’s full content.
⸻
📄 1. Home
VideoGen AI is an open source tool that converts plain text prompts into fully animated educational videos.
It uses Google Gemini to generate Manim animation code and ElevenLabs to create natural voice overs, then merges everything into a finished video using FFmpeg.
This wiki will help you install, configure, and contribute to the project.
- Generate Manim animations from text
- Produce AI voice overs automatically
- Sync video + audio using FFmpeg
- Provide an easy web interface to create and browse videos
- Offer an API for automation and integrations
- Install dependencies
- Set up Gemini + ElevenLabs API keys
- Run
python app.py - Access the Web UI at
http://127.0.0.1:5000
- Installation
- Configuration
- Usage Guide
- API Reference
- Project Structure
- Ruleset
- Troubleshooting
- Contributing
If you enjoy this project or want to help its development, support us here:
https://buymeacoffee.com/apilageai
⸻
📄 2. Installation
This page explains how to install and run VideoGen AI locally.
You need the following installed:
- Python 3.8 or newer
- FFmpeg
- Google Gemini API key
- ElevenLabs API key
brew install ffmpeg
Ubuntu / Debian
sudo apt update
sudo apt install ffmpeg
Windows
Download from https://ffmpeg.org/download.html and add to PATH.
⸻
🛠️ Setup
1. Clone the repository
git clone <your repo url>
cd videogen_ai
2. Create a virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
3. Install dependencies
pip install -r requirements.txt
4. Configure API keys
Open utils.py and set:
genai.configure(api_key="YOUR_GEMINI_API_KEY")
elevenlabs = ElevenLabs(api_key="YOUR_ELEVENLABS_API_KEY")
⸻
▶️ Running the app
python app.py
Open:
http://127.0.0.1:5000
---
# 📄 **3. Configuration**
```markdown
# Configuration
This page explains how to configure Gemini, ElevenLabs, and voice settings.
---
## 🔑 Google Gemini API Setup
1. Go to https://makersuite.google.com/app/apikey
2. Create a key
3. Replace the placeholder in `utils.py`
---
## 🎙️ ElevenLabs API Setup
1. Go to https://elevenlabs.io/app/profile
2. Copy your API key
3. Paste it in `utils.py`
---
## 🎤 Voice Settings
Default voice:
- ID: `JBFqnCBsd6RMkjVDRZzb`
- Model: `eleven_multilingual_v2`
- Format: MP3 44.1kHz
You can change these in `utils.py`.
---
## 📂 File Storage
media/videos/ → Final rendered videos
media/images/ → Manim temp files
videos.json → Metadata for gallery
---
## ⚙️ Customizing Manim Settings
Edit the generation code inside `utils.py` to:
- change resolution
- update FPS
- change background
- enable/disable preview
⸻
📄 4. Usage Guide
# Usage Guide
Here you will learn how to create videos through the web interface.
---
## 🖥️ Web Interface
### 1. Video Creator
1. Enter your topic
2. Choose difficulty level
3. Click Generate Video
4. Wait while AI creates animation + voice
5. Your video appears in the gallery
---
## 📺 Gallery
- Browse all generated videos
- Click a video to play it
- Download is available
- Subtitles are automatically included
---
## 📝 Recommended Prompts
Try:
- "Explain Newton third law using animations"
- "A circle that scales up and down with text Welcome"
- "Quadratic formula with step by step explanation"
- "Geometric shapes moving in rhythm"
---
## 🔁 Refreshing Videos
If a video fails:
- Check logs
- Verify Manim and FFmpeg installation
- Re run generation with a simpler prompt
⸻
📄 5. API Reference
# API Reference
VideoGen AI comes with a simple REST API.
---
## ▶️ Generate Video
### POST `/generate`
Example:
```bash
curl -X POST http://127.0.0.1:5000/generate \
-H "Content-Type: application/json" \
-d '{"text": "Explain momentum conservation"}'
Response:
{
"video_url": "/videos/GeneratedScene.mp4"
}
⸻
📄 List Videos
GET /videos
Example:
curl http://127.0.0.1:5000/videos
⸻
🗂️ Response Format
[
{
"title": "Example",
"filename": "GeneratedScene.mp4",
"url": "/videos/GeneratedScene.mp4"
}
]
---
# 📄 **6. Project Structure**
```markdown
# Project Structure
videogen_ai/
├── app.py # Flask server
├── utils.py # AI + video pipeline
├── requirements.txt # Dependencies
├── videos.json # Metadata
├── templates/
│ └── index.html # Front end
├── media/
│ ├── videos/ # Rendered output
│ └── images/ # Manim temp files
Each folder has a purpose and should not be removed.
---
## 📦 Key Files
### `app.py`
Routes, API endpoints, web interface logic.
### `utils.py`
- Gemini integration
- Manim code generator
- Voice over generator
- FFmpeg merger
⸻
📄 7. Ruleset
I’ll reuse the ruleset you already approved.
# Ruleset
VideoGen AI usage rules…
(Already created in previous message — paste that version here.)
⸻
📄 8. Troubleshooting
# Troubleshooting
Common issues and solutions.
---
## ❌ Audio not generating
- Check ElevenLabs API key
- Make sure you have credits
---
## ❌ Manim render failed
- Confirm Manim installed
- Check syntax of generated code
- Reduce complexity of prompt
---
## ❌ FFmpeg merge failed
- FFmpeg missing or not in PATH
- Wrong file names
- Corrupted Manim output
---
## ❌ Blank or broken video
- Gemini generated invalid Manim script
- Try a simpler prompt
- Check terminal for errors
---
## 💬 Logs
Watch the Flask console for:
- Code generation
- Voice generation
- Render steps
- Error details
⸻
📄 9. Contributing
# Contributing
We welcome contributions of all kinds.
---
## 🛠️ How to contribute
1. Fork the repo
2. Create a branch
```bash
git checkout -b feature-name
3. Make your changes
4. Commit
git commit -am "Add feature"
5. Push
6. Open a Pull Request
⸻
✔️ Requirements
• Keep code clean
• Include comments
• Test before submitting
• Update docs if needed
• Follow the Ruleset