- Implemented a standalone video editor for editing generated shorts. - Integrated OpenCV for basic video playback and MoviePy for advanced editing features. - Added functionalities including video trimming, speed control, volume adjustment, fade effects, and text overlays. - Created a modern GUI using Tkinter with responsive design and a professional color scheme. - Included detailed README documentation outlining features, usage, and installation requirements. |
||
|---|---|---|
| stickers | ||
| .gitignore | ||
| Main.py | ||
| MODERNIZATION_COMPLETE.md | ||
| README.md | ||
| requirements.txt | ||
| RESPONSIVE_DESIGN_IMPROVEMENTS.md | ||
| shorts_generator2.py | ||
| subtitle_generator2.py | ||
| subtitle_generator.py | ||
| subtitle_gui_presets_slot_1.json | ||
| subtitle_gui_presets_slot_2.json | ||
| subtitle_gui_presets.json | ||
| thumbnail_editor_modern.py | ||
| thumbnail_editor.py | ||
| VIDEO_EDITOR_README.md | ||
| video_editor.py | ||
| word_presets_slot_1.json | ||
| word_presets_slot_2.json | ||
| word_presets.json | ||
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
- Clone the repository:
git clone https://git.ptbox.org/klop51/ShortGenerator.git
cd ShortGenerator
- Install dependencies:
pip install -r requirements.txt
- Ensure FFmpeg is installed and accessible from your PATH
Usage
Basic usage:
python shorts_generator2.py your_video.mp4
This will:
- Analyze your video for loud/exciting moments
- Generate up to 3 short clips (5 seconds each by default)
- Add dynamic subtitles with word-by-word highlighting
- Save the shorts in the
shorts/folder
Customization
You can modify the script parameters:
max_clips: Number of shorts to generatechunk_duration: Length of each short clipthreshold_db: Audio loudness threshold for moment detectionoutput_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.