QuoteReels is a powerful Flask application that automates the creation of short-form video content. It fetches random or custom quotes, analyzes them using the Gemini AI API, downloads relevant background videos from Coverr, Pexels, or Pixabay, and generates a professional video output with AI voiceover.
- 🔄 Automated Quote Fetching: Get daily random quotes or use your own custom quotes
- 🧠 AI-Powered Analysis: Uses Gemini AI to categorize and analyze quotes for best video match
- 🎥 Smart Video Selection: Downloads relevant background videos from Coverr, Pexels, or Pixabay
- 🗣️ AI Voiceover: Choose from dozens of realistic voices for text-to-speech narration
- 🎬 Professional Video Generation: Creates social media-ready vertical videos (9:16)
- ⚡ Fast & Memory-Efficient: Optimized video processing with MoviePy
- 🚀 API & Web UI: User-friendly web interface and REST API endpoints
- 📥 Download & Preview: Instantly preview and download your generated videos
-
Clone the repository:
git clone https://github.com/sudipnext/QuoteReels.git
-
Navigate to the project directory:
cd QuoteReels -
Create and activate a virtual environment (recommended):
python -m venv env source env/bin/activate # On Windows: env\Scripts\activate
-
Install the required dependencies:
pip install -r requirements.txt
-
Set up environment variables: Create a
.envfile in the root directory with the following variables:GEMINI_API_KEY=your_gemini_api_key COVERR_API_KEY=your_coverr_api_key PEXELS_API_KEY=your_pexels_api_key PIXABAY_API_KEY=your_pixabay_api_key
To start the application, execute:
python app.pyThis will:
- Serve a web UI at
http://localhost:5000 - Allow you to generate videos from random or custom quotes
- Let you choose the video provider (Coverr, Pexels, Pixabay) and AI voice
- Preview and download your generated videos
GET /get-random-quote— Fetch a random quotePOST /generate-video— Generate a video from a quote (random or custom)POST /generate-video-custom— Generate a video from a custom quoteGET /list/voices— List available AI voicesGET /api/videos— List generated videosGET /api/videos/<filename>— Stream a generated videoGET /api/download/<filename>— Download a generated video
- Custom Quotes: Enter your own quote and author in the web UI
- Voice Selection: Choose from a wide range of AI voices (male/female, multiple languages)
- Video Provider: Select between Coverr, Pexels, or Pixabay for background video matching
Run the test suite to ensure everything is working correctly:
pytestOr run individual test modules:
pytest tests/test_analyzer.pyWe welcome contributions to QuoteReels! Here's how you can help:
- Fork the repository on GitHub
- Create a new branch for your feature or bugfix
git checkout -b feature/amazing-feature
- Make your changes and commit them
git commit -m 'Add an amazing feature' - Push to your branch
git push origin feature/amazing-feature
- Open a Pull Request
- Follow the existing code style and conventions
- Add/update tests for any new functionality
- Make sure your code passes all tests
- Keep pull requests focused on a single topic
- Document any new functions, classes or modules
- Update the README if necessary
This project is licensed under the MIT License - see the LICENSE file for details.