Skip to content

haydarkadioglu/video-creator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎬 Automatic Story Video Generator

An advanced Python application that automatically creates a complete video story from a single topic. It supports multiple content sources, AI-generated text and images, natural-sounding voiceovers, subtitles, and background music — all combined into a polished final video.


✨ Features

  • Multiple Content Sources Create videos from:

    • Wikipedia pages
    • Custom topics written by Gemini
    • Your own text
  • Flexible Video Formats

    • YouTube Shorts (9:16 vertical)
    • Long Videos (16:9 horizontal)
  • AI-Powered Production

    • Text & Summarization (Gemini): Transforms content into a fluent voiceover script.
    • Image Generation (Gemini): Creates custom, context-aware images for each scene.
    • Natural Voiceover (OpenAI TTS): High-quality, human-like narration.
    • Multi-Language Support: Auto-generates multiple language versions with synchronized .srt subtitles.
  • Intelligent Music Selection Detects story atmosphere and picks the most fitting track from your music folder.

  • Post-Production Tools

    • Automatic Turkish Dubbing for existing videos.
    • Centralized configuration with config.json.

📂 Project Structure

Automatic-Story-Video-Generator/
│
├── main.py                # Entry point, orchestrates the workflow
├── config_handler.py      # Handles config.json creation & updates
├── ui_handler.py          # User interface interactions (menus, inputs)
├── content_handler.py     # Fetches text (Wikipedia, Gemini, custom)
├── get_wikipedia.py       # Wikipedia content fetcher with fallback
├── summarize_gemini.py    # Summarization, translation, and script writing
├── image_handler.py       # Image prompt generation & creation
├── text_to_speech_openai.py  # Voiceover generation (OpenAI TTS)
├── video_creator.py       # Combines audio, visuals & subtitles
├── dubber.py              # Turkish dubbing for existing videos
├── music_adder.py         # Intelligent background music adder
├── music/                 # Folder containing .mp3/.wav background tracks
├── requirements.txt       # Project dependencies
└── README.md              # Documentation

🚀 Setup and Usage

1. Installation

Create Virtual Environment (recommended):

python -m venv venv
source venv/bin/activate   # macOS/Linux
.\venv\Scripts\activate    # Windows

Install Dependencies:

pip install -r requirements.txt

2. Configuration

  • .env File Create a .env file in the project root with your API keys:

    GEMINI_API_KEY="AIzaSy..."
    OPENAI_API_KEY="sk-..."
  • Music Folder Add .mp3 or .wav files into a music/ folder.

  • Config File On the first run, a config.json will be generated automatically. Edit it to adjust settings (output folders, model names, voices, etc.).


3. Running the Application

Run the program with:

python main.py

Follow the on-screen menus to create your story video.


📌 Notes

  • Works with multiple languages.
  • Supports both short-form and long-form video creation.
  • Easily extensible for new AI models and video formats.

📜 License

This project is for educational and personal use. Please check licenses of APIs, images, and music before distributing generated content.

About

An advanced Python application that automatically creates a complete video story from a single topic. It supports multiple content sources, AI-generated text and images, natural-sounding voiceovers, subtitles, and background music — all combined into a polished final video.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages