Developed for Hack-Nation's 2nd ever Global AI Hackathon.
Transform your images into captivating video stories with AI-powered generation. Upload 1-2 images, describe your story, and watch as AI creates a complete video narrative with script, scenes, voiceover, and final assembly.
- Image Upload: Drag & drop 1-2 images for style reference
- AI Script Generation: GPT-4o-mini creates compelling story scripts
- Scene Breakdown: Automatic scene planning with detailed prompts
- Video Generation: RunwayML Gen-2 creates individual scene clips
- Voice Synthesis: ElevenLabs generates high-quality narration
- Video Assembly: FFmpeg concatenates clips with audio and captions
- Style Customization: Choose from 6 different video styles
- Real-time Preview: See generated script and scene breakdown
- Download Ready: Get your final video in MP4 format
- Backend: FastAPI, Python 3.8+
- Frontend: Next.js, React, Framer Motion, Tailwind CSS
- AI Services: OpenAI GPT-4o-mini, RunwayML Gen-2, ElevenLabs
- Video Processing: FFmpeg
- Styling: Tailwind CSS
- Python 3.8 or higher
- Node.js 16 or higher
- FFmpeg installed on your system
- API keys for OpenAI, RunwayML, and ElevenLabs
-
Clone the repository
git clone <repository-url> cd Vireo
-
Install FFmpeg
# Ubuntu/Debian sudo apt update && sudo apt install ffmpeg # macOS brew install ffmpeg # Windows # Download from https://ffmpeg.org/download.html
-
Backend Setup
cd backend pip install -r requirements.txt cp .env.example .env # Edit .env with your API keys
-
Frontend Setup
cd frontend npm install -
Start the Services
# Terminal 1 - Backend cd backend uvicorn app.main:app --reload --host 0.0.0.0 --port 8000 # Terminal 2 - Frontend cd frontend npm run dev
-
Open the Application
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
-
OpenAI API Key
- Visit https://platform.openai.com/api-keys
- Create a new API key
- Add to
.env:OPENAI_API_KEY=your_key_here
-
RunwayML API Key
- Visit https://runwayml.com/
- Sign up and get your API key
- Add to
.env:RUNWAYML_API_KEY=your_key_here
-
ElevenLabs API Key
- Visit https://elevenlabs.io/
- Create an account and get your API key
- Add to
.env:ELEVENLABS_API_KEY=your_key_here
- Upload Images: Drag & drop 1-2 images for style reference
- Write Prompt: Describe what your video should be about
- Choose Style: Select from 6 different video styles
- Generate: Click "Generate Story Video" and wait for processing
- Review: See the generated script and scene breakdown
- Download: Get your final video in MP4 format
- Cinematic: Movie-like dramatic style
- Animation: Animated cartoon style
- Futuristic: Sci-fi futuristic style
- Documentary: Realistic documentary style
- Artistic: Creative artistic style
- Minimalist: Clean minimalist style
Vireo/
├── backend/
│ ├── app/
│ │ ├── main.py # FastAPI application
│ │ └── services/
│ │ ├── openai_client.py # Script & scene generation
│ │ ├── runway_client.py # Video generation
│ │ ├── elevenlabs_client.py # Voice synthesis
│ │ └── video_assembler.py # Video assembly
│ ├── public/videos/ # Generated videos
│ ├── temp/ # Temporary files
│ └── requirements.txt
├── frontend/
│ ├── components/
│ │ ├── ImageUpload.jsx # Image upload component
│ │ ├── StyleSelector.jsx # Style selection
│ │ └── StoryGenerator.jsx # Results display
│ ├── pages/
│ │ └── index.js # Main application page
│ └── package.json
└── README.md
POST /generate-story: Generate a complete story videoGET /story/{story_id}: Get story generation statusGET /styles: Get available video stylesGET /public/videos/{filename}: Download generated videos
cd backend
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000cd frontend
npm run dev# Backend tests
cd backend
python -m pytest
# Frontend tests
cd frontend
npm test-
FFmpeg not found
- Ensure FFmpeg is installed and in your PATH
- Test with:
ffmpeg -version
-
API Key Errors
- Verify all API keys are correctly set in
.env - Check API key permissions and quotas
- Verify all API keys are correctly set in
-
Video Generation Fails
- The system will use placeholder clips if RunwayML fails
- Check API quotas and network connectivity
-
Voice Synthesis Fails
- ElevenLabs API key may be invalid or quota exceeded
- Videos will be generated without voiceover
- Use smaller images (max 2MB each) for faster processing
- Keep prompts concise but descriptive
- Monitor API usage to avoid rate limits