Skip to content

πŸŽ₯ Fully automated YouTube Shorts generator using Python, AI scripting, 11Labs voice, and Minecraft parkour background.

Notifications You must be signed in to change notification settings

GONAASK/Youtube-Short-Automation

Repository files navigation

Auto AI Video Generator

An automated system for generating engaging story videos with AI voiceovers, background videos, and subtitles. Perfect for creating YouTube Shorts and social media content.

Features

  • πŸ€– 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

Setup

1. Install Dependencies

pip install -r requirements.txt

2. Install ImageMagick (Required for Subtitles)

Windows:

  1. Download ImageMagick from https://imagemagick.org/script/download.php#windows
  2. Install with default settings
  3. 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 imagemagick

Linux:

sudo apt-get install imagemagick

3. Configure API Keys

Run the API configuration script:

python api_config.py

Or 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')"

4. Add Background Video

  1. Place your background video file in the project directory
  2. Update the path in config.py:
    BACKGROUND_VIDEOS = [
        "path/to/your/background/video.mp4"
    ]

Usage

Generate a Single Video

python main.py

Then select:

  1. Generate single video
  2. Choose genre
  3. Wait for generation to complete

Generate Multiple Videos

python main.py

Then select:

  1. Generate batch videos
  2. Enter number of videos (1-5)
  3. Choose genre
  4. Wait for batch generation

Continue Existing Story

python main.py

Then select:

  1. Continue existing story
  2. Choose from available scripts
  3. Generate continuation

Configuration

Video Settings

Edit config.py to customize:

  • Video dimensions (default: 1080x1920 for Shorts)
  • Maximum duration (default: 60 seconds)
  • Voice settings
  • Genre prompts

API Keys

File Structure

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

Output

  • Videos: Saved in output/ directory
  • Scripts: Saved in scripts/ directory as JSON files
  • Temporary files: Automatically cleaned up

Troubleshooting

Subtitles Not Showing

  • Ensure ImageMagick is installed and path is set correctly
  • Check that the binary path in subtitle_assemblyai.py matches your installation

API Errors

  • Verify API keys are valid and have sufficient credits
  • Check rate limits and quotas
  • Use the API configuration tool to manage multiple keys

Video Generation Issues

  • Ensure background video file exists and is accessible
  • Check available disk space for temporary files
  • Verify all dependencies are installed

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

License

This project is open source. Feel free to use and modify as needed.

Disclaimer

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.

About

πŸŽ₯ Fully automated YouTube Shorts generator using Python, AI scripting, 11Labs voice, and Minecraft parkour background.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages