Skip to content

TerzicScript/shorts-flow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎬 Shorts Flow v1.0.0

An automated Python pipeline that transforms Reddit stories into high-quality TikTok, Reels, and YouTube Shorts using AI.

Download SourceReport BugRequest Feature

🎯 Overview

Shorts Flow is a professional-grade content creation tool. It automates the tedious process of syncing AI-generated voiceovers, transcribing subtitles with high accuracy, and overlaying them onto background gameplay footage.

The script handles the "hook" namecard (Title/Username) at the start and intelligently splits long stories into multiple parts so you can upload them as a series.


📝 Quick Notice: Example Run

To see exactly how the script performs, I have provided the assets used for a test run and the final results.

Inputs Used:

  • Hook Title: "I have matured so much, and instead of just waiting for my boyfriend to cheat, I have taken control."
  • Username: 1000andonenites
  • Story File: storyNew.txt ( it's not full reddit post )
  • Background Video: 📥 Download 2GB Background (External Link)
  • Target Duration: 50 Seconds

Generated Output: The story was automatically split into 3 parts. You can view the rendered results here:


⚙️ How It Works

The application is designed to be a "set and forget" pipeline for short-form content.

  1. Input: Place your story in story.txt and a background video (like Minecraft parkour or GTA) as background.mp4.
  2. Voice Generation: Uses Kokoro TTS to create a natural, human-like narration.
  3. Transcription: Uses Faster-Whisper to generate word-level timestamps for perfectly synced subtitles.
  4. Auto-Splitting: You input a target duration (e.g., 50 seconds). The script splits the story into Part 1, Part 2, etc., automatically.
  5. Rendering: The script composites the background, the "hook" card, and the animated text into a finished .mp4.

Directory Structure:

Project_Folder/
├── main.py               # The main script
├── story.txt             # Your Reddit story text
├── background.mp4        # Your 9:16 background footage
└── videos/               # Where your finished videos appear

Why This Tool?

  • Because manual editing takes hours, and this takes minutes. Plus, it's free.

✨ Features

Core Features

Feature Description
Kokoro TTS Integrated high-fidelity text-to-speech for realistic narration
Faster-Whisper AI-powered transcription for pixel-perfect subtitle timing
Auto-Splitting Automatically breaks long stories into parts based on your duration input
Hook Generator Creates the iconic "Reddit UI" intro card with custom Title/User
Dynamic Subtitles Word-for-word text overlays rendered via MoviePy and PIL
Batch Processing Handles audio generation and video rendering in one workflow

💾 Download & Installation

Option 1: Run from Source

Requirements:

  • Python 3.10 or higher
  • FFmpeg installed and added to your System PATH

Installation Steps:

# Clone the repository
git clone https://github.com/TerzicScript/shorts-flow.git
cd shorts-flow

# Install dependencies
pip install faster-whisper kokoro moviepy soundfile pillow

🛠 Technical Stack

This project leverages some of the best open-source AI tools available:


🚀 Quick Start Guide

Step 1: Setup

Ensure story.txt and background.mp4 are in the project folder.

Step 2: Launch

Run the script:

python main.py

Step 3: Input Data

Follow the terminal prompts:

  1. Enter the Video Title (for the hook).
  2. Enter the Username (to show on the card).
  3. Enter the Max Duration per part (e.g., 60 for one minute).

Step 4: Finalize

The script will generate audio and ask for confirmation. Press Y to start the final video render.


🤝 Contributing

Contributions are welcome! If you have a better way to style the subtitles or handle transitions, feel free to help out.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/CoolUpdates)
  3. Commit your changes
  4. Push and open a Pull Request

🙏 Credits

  • The AI Community - For providing the TTS and Whisper models.
  • My Coffee Machine - For keeping me awake while debugging MoviePy errors.

About

An automated Python tool designed to create viral, short-form "Reddit Story" videos for TikTok, Reels, and YouTube Shorts. By combining **Kokoro TTS** for high-quality narration and **Faster-Whisper** for precise subtitle syncing, it transforms a simple text file and background footage into a fully edited, multi-part video series in minutes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages