File size: 3,653 Bytes
44cb2cf | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | ---
title: AI Video Editor V2
emoji: π€
colorFrom: purple
colorTo: blue
sdk: docker
pinned: false
license: mit
---
# π€ AI Video Editor V2
Transform any reference reel into your personalized video using AI-powered code generation.
## π¬ How It Works
1. **Upload** your reference video and photos
2. **AI Analysis** - Gemini analyzes video structure, transitions, and timing
3. **Generate** - Review each 3-second segment with human-in-the-loop
4. **Download** - Get your final professional video
## π Getting Started
### 1. Get Your Free Gemini API Key
Visit: [https://aistudio.google.com/apikey](https://aistudio.google.com/apikey)
**Free Tier Limits:**
- β
10 requests/minute
- β
250 requests/day
- β
250K tokens/minute
- β
Completely FREE - No credit card required
### 2. Use the App
1. Enter your API key in the sidebar
2. Upload a reference video (10-60 seconds)
3. Upload 5-20 photos
4. Let AI analyze and generate segments
5. Approve or regenerate each segment
6. Download your final video
## β¨ Features
- π₯ **Video Analysis**: AI understands transitions, effects, timing
- π€ **Code Generation**: Gemini writes MoviePy code for each segment
- π€ **Human-in-the-Loop**: Review and approve each 3-second segment
- π **Iterative Refinement**: Provide feedback to regenerate
- πΉ **Professional Output**: 1080x1920 (9:16) portrait videos
## π οΈ Tech Stack
- **Frontend**: Streamlit
- **AI Model**: Google Gemini 2.5 Flash
- **Video Processing**: MoviePy
- **Image Processing**: Pillow, OpenCV
## π API Usage
With 250 requests/day on free tier:
- Video analysis: ~5-10 requests
- Segment generation: ~20-30 segments
- Regenerations: ~10-15 retries
- **Total: ~50-70 requests per video**
- **Can create 3-4 complete videos per day**
## π‘ Tips
- Use high-quality photos (1080x1920 ideal)
- Keep reference videos under 60 seconds
- Provide specific feedback for better regenerations
- Approve segments progressively to save API calls
## π Privacy
- Your API key is never stored
- All processing happens in your session
- Files are temporary and auto-deleted
## π License
MIT License - Free to use and modify!
## π€ Support
Having issues? Check that:
- Your API key is valid
- Reference video is under 100MB
- Photos are in JPG/PNG format
- You're within the free tier limits
## π¦ File Structure
```
velocity-video-editor-v2/
βββ app.py # Main Streamlit application
βββ ai_video_analyzer.py # Video analysis with Gemini
βββ code_generator.py # AI code generation
βββ video_executor.py # Safe code execution
βββ requirements.txt # Python dependencies
βββ Dockerfile # Container configuration
βββ README.md # This file
βββ .streamlit/
βββ config.toml # Streamlit configuration
```
## π Local Development
```bash
# Install dependencies
pip install -r requirements.txt
# Run the app
streamlit run app.py
# Open browser at http://localhost:8501
```
## π³ Docker Deployment
```bash
# Build Docker image
docker build -t ai-video-editor .
# Run container
docker run -p 7860:7860 ai-video-editor
```
## π Hugging Face Spaces Deployment
1. Create new Space with Docker SDK
2. Upload all files
3. HF automatically builds and deploys
4. Share with users!
---
Made with β€οΈ using Gemini 2.5 Flash
**Creator**: PPV Productions
**Version**: 2.0
**Last Updated**: February 2026
|