A powerful Python tool that automates the generation of SEO-optimized titles for social media videos using AI. This tool processes video clips by transcribing their audio content and generating engaging titles with relevant hashtags.
- 🎥 Process single videos or entire folders
- 🗣️ Automatic audio transcription using OpenAI Whisper
- 🤖 AI-powered title generation with multiple model options
- 🌐 Multi-language support
- #️⃣ Automatic hashtag generation and optimization
- 📏 Smart title length optimization for YouTube video (max 100 characters)
- 🔄 Batch processing capabilities
- Python 3.8 or higher
- OpenAI API key
- OpenRouter API key
- FFmpeg (for audio processing)
- Clone the repository:
git clone https://github.com/yourusername/video-title-generator.git
cd video-title-generator
- Install required packages:
pip install -r requirements.txt
- Create a
.env
file in the project root and add your API keys:
OPENAI_API_KEY=your_openai_api_key_here
OPENROUTER_API_KEY=your_openrouter_api_key_here
- Run the main script:
python main.py
-
Select your preferred language (English or Italian)
-
Choose processing mode:
- Single video processing
- Folder batch processing
1. Enter the video file path
2. Provide context description
3. Review generated title
4. Confirm to rename the file
1. Enter the folder path containing videos
2. Choose between:
- Single context for all videos
- Individual context for each video
3. Review generated titles
4. Confirm to rename all files
video-title-generator/
├── languages/ # Language files
├── prompts/ # AI prompt templates
├── audio_handler.py # Audio processing
├── file_handler.py # File operations
├── language_manager.py # Language management
├── models.py # AI model selection
├── prompt_handler.py # Title generation
└── main.py # Main script
- Create a new language file in
languages/
(e.g.,fr.json
) - Add corresponding prompt template in
prompts/
(e.g.,title_generation_prompt_fr.txt
) - The system will automatically detect and include the new language
Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for Whisper API
- OpenRouter for AI model access
- MoviePy for video processing
Jacopo Luca Maria Latrofa
- GitHub: @fralapo