RapidClip is a project that automates the creation of short videos, ideal for platforms like YouTube Shorts, Instagram Reels, TikTok, and Kwai. It allows generating complete videos from a given theme, combining narration, dynamic images, visual effects, synchronized subtitles, detailed process logging, background music integration, automatic volume balancing of background music in harmony with narration, and final video assembly and rendering with animated transitions. By using OpenAI's new TTS models (Recommended), the application can dynamically define the tone used in narration, intonation, and other voice characteristics.
🇧🇷 For the Portuguese (pt-br) version of this README, see README.pt-br.md.
Note: The demonstration videos were converted from mp4 to mov.
|
Download Demo 1 |
Download Demo 2 |
- Automatic Content Creation: Generates custom scripts based on the provided theme.
- Audio Narration: Converts scripts into high-quality narration, supporting both ElevenLabs and OpenAI TTS.
- Audio Reprocessing: Adjusts audio duration for platform compatibility.
- Subtitle Generation: Creates enhanced subtitles with alignment and segmentation:
- Tokenization of transcribed text while preserving punctuation.
- Word alignment with respective timestamps and punctuation.
- Readable and synchronized subtitles, respecting character and word limits per line.
- Enhanced Image Generation:
- Diverse prompt generation for image creation using subtitle context and generated prompts to ensure variation and creativity.
- Support for configuring the SANA model version via an environment variable.
- Final Video Assembly: Composes the final video using audio, images, subtitles, and animated transitions (including zoom-in effect) while maintaining a resolution of 1080x1920.
- Background Music Integration:
- Selects a soundtrack from a local library of royalty-free music (configured in
songs/songs.jsonand stored insongs/mp3). - Automatic music selection by an AI model based on the script and generated images.
- Selects a soundtrack from a local library of royalty-free music (configured in
- Optional Video Watermark: Adds an optional video-level text watermark using the
--watermarkargument. - Relevant Images: Improves image selection to better illustrate content.
- Visual Effects and Transitions: Applies zoom, animations, and additional smooth cuts.
- Complete Rendering: Creates the final video ready for publishing.
- Multi-Language Support: Enables content creation, narration, and subtitles in various languages.
- Process Logging: Stores detailed logs of the process, including generated prompts for each image interval, in the output folder of each video.
- Support for OpenAI's New TTS Models: By using OpenAI's new TTS models, the application dynamically defines narration tone, intonation, and other voice characteristics.
Before using RapidClip, you need to configure environment variables. Use the .env.example file as a template to create your own .env file containing the following variables:
OPENAI_API_KEY=your-openai-api-key
ELEVENLABS_API_KEY=your-elevenlabs-api-key
REPLICATE_API_TOKEN=your-replicate-api-key
SANA_MODEL_VERSION=sana-model-version
You can run RapidClip via Docker, simplifying usage in an isolated environment with all dependencies pre-installed. For more details, check README.DOCKER.md.
If you prefer to run the project directly on your machine, follow these steps:
1. Install dependencies:
pip install -r requirements.txt2. Generate the video:
Using OpenAI TTS (Recommended!):
python src/main.py --theme "Technology Curiosities (a single curiosity)" \
--language "en-US" \
--max_duration 60 \
--tts_service openai \
--openai_tts_model "gpt-4o-mini-tts" \
--openai_tts_voice "ash" \
--watermark "Your channel name or custom text"Using ElevenLabs TTS:
python src/main.py --theme "Space Curiosities (a single curiosity)" \
--language "en-US" \
--voice_id "CstacWqMhJQlnfLPxRG4" \
--max_duration 60 \
--tts_service elevenlabs \
--watermark "Your channel name or custom text"- Refine advanced video editing features for more sophisticated functionalities.
We welcome contributions! If you would like to collaborate with the project, follow these steps:
- Fork the repository.
- Create a branch for your feature or bug fix:
git checkout -b my-contribution
- Make your changes and submit a pull request detailing your modifications.
This project is licensed under the MIT license. This means you can use, modify, and distribute it as long as the original license is included in the code. See the LICENSE file for more details.