Go to file
2025-08-10 02:25:39 +02:00
stickers feat: Implement professional thumbnail editor with video frame capture, emoji stickers, and text editing features 2025-08-09 17:44:56 +02:00
.gitignore Initial commit: ShortGenerator project setup 2025-08-05 00:34:23 +02:00
app2.py Refactor subtitle generation and integration with Whisper AI; remove unused files and enhance GUI for better user experience 2025-08-09 10:35:13 +02:00
app.py Refactor subtitle generation and integration with Whisper AI; remove unused files and enhance GUI for better user experience 2025-08-09 10:35:13 +02:00
Main.py feat: Add ClipSelectionWindow for user clip selection and enhance progress handling 2025-08-10 02:25:39 +02:00
myvideo.srt Refactor subtitle generation and integration with Whisper AI; remove unused files and enhance GUI for better user experience 2025-08-09 10:35:13 +02:00
README.md Fix formatting in README.md by removing extraneous author name 2025-08-05 00:44:11 +02:00
requirements.txt Update requirements and enhance shorts generator with advanced detection modes and tooltips 2025-08-09 15:45:24 +02:00
shorts_generator2.py Add processing preview with progress tracking to the main application 2025-08-09 21:45:39 +02:00
sub2.srt Update requirements and enhance shorts generator with advanced detection modes and tooltips 2025-08-09 15:45:24 +02:00
subtitle_generator2.py Refactor subtitle rendering and highlight functionality 2025-08-07 22:25:56 +02:00
subtitle_generator.py Refactor subtitle generation and integration with Whisper AI; remove unused files and enhance GUI for better user experience 2025-08-09 10:35:13 +02:00
subtitle_gui_presets_slot_1.json Refactor subtitle rendering and highlight functionality 2025-08-07 22:25:56 +02:00
subtitle_gui_presets_slot_2.json Add subtitle generator with GUI and preset management 2025-08-07 00:34:27 +02:00
subtitle_gui_presets.json Refactor subtitle rendering and highlight functionality 2025-08-07 22:25:56 +02:00
test_whisper.py Refactor subtitle generation and integration with Whisper AI; remove unused files and enhance GUI for better user experience 2025-08-09 10:35:13 +02:00
thumbnail_editor.py feat: Implement professional thumbnail editor with video frame capture, emoji stickers, and text editing features 2025-08-09 17:44:56 +02:00
word_presets_slot_1.json Add subtitle generator with GUI and preset management 2025-08-07 00:34:27 +02:00
word_presets_slot_2.json Add subtitle generator with GUI and preset management 2025-08-07 00:34:27 +02:00
word_presets.json Add subtitle generator with GUI and preset management 2025-08-07 00:34:27 +02:00

ShortGenerator

A Python-based tool for automatically generating short-form videos from longer video content, optimized for platforms like TikTok, Instagram Reels, and YouTube Shorts.

Features

  • Automatic loud moment detection: Identifies exciting parts of videos using audio analysis
  • AI-powered transcription: Uses Whisper for accurate speech-to-text conversion
  • Dynamic subtitles: Creates engaging, word-by-word highlighted subtitles in the style of popular content creators
  • Vertical format optimization: Automatically converts landscape videos to 9:16 aspect ratio
  • Batch processing: Generate multiple shorts from a single video

Requirements

  • Python 3.8+
  • FFmpeg
  • Required Python packages (install with pip install -r requirements.txt):
    • moviepy
    • faster-whisper
    • numpy

Installation

  1. Clone the repository:
git clone https://git.ptbox.org/klop51/ShortGenerator.git
cd ShortGenerator
  1. Install dependencies:
pip install -r requirements.txt
  1. Ensure FFmpeg is installed and accessible from your PATH

Usage

Basic usage:

python shorts_generator2.py your_video.mp4

This will:

  1. Analyze your video for loud/exciting moments
  2. Generate up to 3 short clips (5 seconds each by default)
  3. Add dynamic subtitles with word-by-word highlighting
  4. Save the shorts in the shorts/ folder

Customization

You can modify the script parameters:

  • max_clips: Number of shorts to generate
  • chunk_duration: Length of each short clip
  • threshold_db: Audio loudness threshold for moment detection
  • output_folder: Where to save generated shorts

Output

Generated shorts will be:

  • 1080x1920 resolution (9:16 aspect ratio)
  • MP4 format with H.264 codec
  • Include dynamic subtitles with highlighting effects
  • Automatically cropped and centered from the original video

File Structure

ShortGenerator/
├── shorts_generator2.py    # Main script (latest version)
├── shorts_generator.py     # Legacy version
├── fonts/                  # Font files for subtitles
├── shorts/                 # Generated short videos (gitignored)
└── README.md              # This file

Contributing

Feel free to submit issues and enhancement requests!

License

This project is open source. Please check the license file for details.