Skip to main content

System Requirements

Backend

  • Python 3.8 or higher
  • pip package manager
  • 2GB+ free disk space
  • FFmpeg for video processing

Frontend

  • Node.js 16 or higher
  • npm or yarn
  • Modern web browser
The original project was developed for Windows. Some paths and commands may need adjustment for macOS/Linux.

Backend Installation

1. Clone the Repository

git clone https://github.com/Kamal-Nayan-Kumar/AI-Video-Gen
cd AI-Video-Gen

2. Set Up Python Virtual Environment

Navigate to the backend directory:
cd backend
Create and activate a virtual environment:
python -m venv venv
venv\Scripts\activate
You should see (venv) in your terminal prompt when the virtual environment is activated.

3. Install Python Dependencies

With your virtual environment activated, install all required packages:
pip install -r requirements.txt
This will install:
  • fastapi (0.115.0) - Web framework for the API
  • uvicorn (0.32.0) - ASGI server
  • python-dotenv (1.0.1) - Environment variable management
  • pydantic (2.9.2) - Data validation
  • google-generativeai (0.8.3) - Gemini AI SDK
  • manim (0.18.1) - Mathematical animation engine
  • moviepy (2.0.0+) - Video editing
  • requests (2.32.3) - HTTP library
  • python-multipart (0.0.12) - Form data parsing
  • Pillow (10.0.0+) - Image processing

4. Install FFmpeg

FFmpeg is required for video composition and audio processing.
# Download from https://ffmpeg.org/download.html
# Extract the archive
# Add the bin/ folder to your System PATH
Verify FFmpeg installation:
ffmpeg -version
You should see version information if FFmpeg is correctly installed.

5. Install Manim

Manim is used to generate mathematical animations for slides:
pip install manim
Manim may require additional system dependencies (LaTeX, Cairo, Pango). See the Manim installation guide if you encounter issues.

6. Configure Environment Variables

Create a .env file in the backend/ directory:
cp .env.example .env
Edit the .env file with your API keys:
# API Keys
GEMINI_API_KEY=your_gemini_api_key_here
SARVAM_API_KEY=your_sarvam_api_key_here
UNSPLASH_ACCESS_KEY=your_unsplash_access_key_here
  1. Go to Google AI Studio
  2. Sign in with your Google account
  3. Click “Create API Key”
  4. Copy the key and paste it in your .env file
  1. Visit Sarvam AI
  2. Sign up for an account
  3. Navigate to API settings
  4. Generate an API key
  5. Copy the key to your .env file
The system uses Sarvam AI’s text-to-speech service with the bulbul:v2 model for generating narration in multiple Indian languages.
  1. Go to Unsplash Developers
  2. Create an account or sign in
  3. Create a new application
  4. Copy the Access Key
  5. Paste it in your .env file

7. Verify Backend Installation

Start the FastAPI server:
python app.py
You should see output like:
INFO:     Started server process [12345]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
Test the health endpoint:
curl http://localhost:8000/health
Expected response:
{"status": "healthy"}

Frontend Installation

1. Navigate to Frontend Directory

cd frontend

2. Install Node Dependencies

npm install
This will install:
  • React (19.1.1) - UI framework
  • Vite (7.1.7) - Build tool and dev server
  • axios (1.12.2) - HTTP client for API calls
  • @hello-pangea/dnd (18.0.1) - Drag and drop functionality
  • lucide-react (0.545.0) - Icon library
  • pptxgenjs (4.0.1) - PowerPoint export
  • Tailwind CSS (4.1.14) - Styling framework

3. Start Development Server

npm run dev
The frontend will start on:
http://localhost:5173
The frontend is pre-configured to connect to the backend at http://localhost:8000. If you change the backend port, update the API configuration in frontend/src/utils/api.js.

4. Verify Frontend Installation

Open your browser and navigate to:
http://localhost:5173
You should see the AI Video Presentation Generator interface with:
  • Topic input field
  • Number of slides selector
  • Language dropdown (English, Hindi, Kannada, Telugu)
  • Tone selector (Formal, Casual, Educational)
  • Generate button

Directory Structure

After installation, your project structure should look like:
AI-VIDEO-GEN/
├── backend/
│   ├── generators/          # AI generation modules
│   ├── utils/               # Video rendering utilities
│   ├── outputs/             # Generated content (created on first run)
│   │   ├── audio/
│   │   ├── images/
│   │   ├── manim_code/
│   │   ├── manim_output/
│   │   ├── scripts/
│   │   ├── slides/
│   │   └── final/           # Final MP4 videos
│   ├── venv/                # Python virtual environment
│   ├── .env                 # Your environment variables
│   ├── app.py               # FastAPI entry point
│   └── requirements.txt
├── frontend/
│   ├── src/
│   │   ├── components/      # React components
│   │   ├── utils/           # API utilities
│   │   └── App.jsx
│   ├── package.json
│   └── vite.config.js
└── README.md
The backend/outputs/ directory and its subdirectories are automatically created by the application when you generate your first presentation (see backend/config.py:25).

Next Steps

Quickstart

Generate your first AI video presentation

Configuration

Customize Manim settings, models, and output quality

API Reference

Explore the FastAPI endpoints

Troubleshooting

Common issues and solutions

Common Installation Issues

If you encounter build errors:
  1. Install Microsoft C++ Build Tools from Visual Studio
  2. Ensure you have the latest pip: python -m pip install --upgrade pip
  3. Try installing packages individually to identify the problematic one
Manim requires system dependencies:Windows:
  • Install MiKTeX for LaTeX support
macOS:
brew install cairo pango ffmpeg
brew install --cask mactex-no-gui
Linux:
sudo apt install libcairo2-dev libpango1.0-dev ffmpeg
sudo apt install texlive texlive-latex-extra
After installing FFmpeg, verify it’s in your PATH:
ffmpeg -version
If not found:
  • Windows: Add FFmpeg’s bin folder to System Environment Variables
  • macOS/Linux: Ensure the installation completed successfully and restart your terminal
To use different ports:Backend:
uvicorn app:app --host 0.0.0.0 --port 8001
Frontend: Edit vite.config.js and set:
export default defineConfig({
  server: {
    port: 5174
  }
})
Remember to update the API URL in frontend/src/utils/api.js if you change the backend port.

Build docs developers (and LLMs) love