An automated system for generating engaging story videos with AI voiceovers, background videos, and subtitles. Perfect for creating YouTube Shorts and social media content.
- π€ AI Story Generation: Create unique, viral-worthy stories using Cohere AI
- π€ AI Voice Generation: Generate natural-sounding voiceovers with ElevenLabs
- π¬ Background Video Processing: Unique background videos for each story
- π Automatic Subtitles: Clean, readable subtitles for better engagement
- π Story Continuation: Continue existing stories with new parts
- π― Multiple Genres: AITA, Confessions, Horror, Malicious Compliance, Inspiring
- π± YouTube Shorts Optimized: 9:16 aspect ratio, 30-60 second duration
SUBTITLES/ CAPTIONS ARE STILL IN TESTING PHASE
pip install -r requirements.txtWindows:
- Download ImageMagick from https://imagemagick.org/script/download.php#windows
- Install with default settings
- Set environment variable in your script:
os.environ["IMAGEMAGICK_BINARY"] = r"C:\Program Files\ImageMagick-7.1.1-Q16-HDRI\magick.exe"
macOS:
brew install imagemagickLinux:
sudo apt-get install imagemagickRun the API configuration script:
python api_config.pyOr add your API keys directly:
python -c "from api_config import api_config; api_config.add_cohere_key('your-cohere-key'); api_config.add_elevenlabs_key('your-elevenlabs-key')"- Place your background video file in the project directory
- Update the path in
config.py:BACKGROUND_VIDEOS = [ "path/to/your/background/video.mp4" ]
python main.pyThen select:
- Generate single video
- Choose genre
- Wait for generation to complete
python main.pyThen select:
- Generate batch videos
- Enter number of videos (1-5)
- Choose genre
- Wait for batch generation
python main.pyThen select:
- Continue existing story
- Choose from available scripts
- Generate continuation
Edit config.py to customize:
- Video dimensions (default: 1080x1920 for Shorts)
- Maximum duration (default: 60 seconds)
- Voice settings
- Genre prompts
- Cohere: Get from https://cohere.com/
- ElevenLabs: Get from https://elevenlabs.io/
Auto AI video/
βββ main.py # Main application
βββ config.py # Configuration settings
βββ api_config.py # API key management
βββ story_generator.py # AI story generation
βββ voice_generator.py # AI voice generation
βββ background_video.py # Background video processing
βββ video_editor.py # Video creation and editing
βββ subtitle_assemblyai.py # Subtitle generation
βββ requirements.txt # Python dependencies
βββ output/ # Generated videos
βββ scripts/ # Saved story scripts
βββ temp/ # Temporary files
βββ assets/ # Background videos and assets
- Videos: Saved in
output/directory - Scripts: Saved in
scripts/directory as JSON files - Temporary files: Automatically cleaned up
- Ensure ImageMagick is installed and path is set correctly
- Check that the binary path in
subtitle_assemblyai.pymatches your installation
- Verify API keys are valid and have sufficient credits
- Check rate limits and quotas
- Use the API configuration tool to manage multiple keys
- Ensure background video file exists and is accessible
- Check available disk space for temporary files
- Verify all dependencies are installed
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is open source. Feel free to use and modify as needed.
This tool is for educational and content creation purposes. Ensure you comply with all applicable terms of service for the APIs used (Cohere, ElevenLabs) and respect copyright laws when using background videos.