Turn real-time news into short, shareable news videos — fully automated with AI.
This project takes a current news headline and:
- Generates a professional video script using an LLM.
- Adds catchy, attention-grabbing lines.
- Converts the script to audio using Azure TTS.
- Generates a short video with dynamic overlays.
All of this happens in a single click — and runs on an Microsoft Azure Virtual Machine server or your own Local Machine.
- 🔍 Real-time news scraping
- 🧠 LLM-generated script and catchy one-liners
- 🎤 Azure-based text-to-speech synthesis
- 🎬 Dynamic video generation with MoviePy
- 🌐 Python Flask web interface
- Python
- Flask (Web Framework)
- Azure Cognitive Services (Text-to-Speech)
- MoviePy (Video generation)
- LLM APIs (DeepSeek, LM Studio, or OpenAI compatible)
- Bootstrap + HTML (Frontend)
video_generation_tool/
│
├── app.py # Main Flask app
├── news_scraping.py # Fetches latest news
├── generate_script.py # Script generation using LLM
├── generate_catchy_lines.py # One-liner generation
├── convert_text_to_speech.py # Azure TTS integration
├── video_generation.py # Video creation logic
├── templates/
│ ├── index.html
│ └── video.html
├── static/
│ └── videos/
├── .env # Stores API keys (not pushed)
|── assets/ # Handles images stored in Readme.md file
└── requirements.txt # List of all dependencies of the project
git clone https://github.com/akshatkhatri/video_generation_tool.git
cd video_generation_tool
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
Create a .env
file in the root with your keys:
API_KEY=your_news_api_key
SPEECH_KEY=your_azure_speech_key
SERVICE_REGION=your_azure_region
python app.py
Visit http://127.0.0.1:5000
in your browser.
The app uses a local or hosted LLM to generate scripts. You can:
- Connect it to LM Studio, OpenRouter, or DeepSeek API
- Set your LLM endpoint inside relevant script generation files
- News video with voiceover and animated text overlay
- Stored in
static/videos/final_video_with_generated_text_overlay.mp4
- Category-based video templates
- Support for multiple languages
- User-uploaded custom text
PRs and suggestions are welcome!
Just fork, commit your changes, and open a pull request.