This project offers a bloated solution for users to manipulate video content by downloading, trimming, concatenating, and enhancing it with overlaid text images at specific timestamps.
- YouTube Video Downloading: Easily download videos from YouTube by providing the video URL
- Video Trimming: Trim the video into mini-clips
- Concatenation: Seamlessly concatenate trimmed video clips
- VTT File Integration: Extract text from a VTT file and create images to overlay them onto the video at specified timestamps
- Whisper
- Ansi
- Ffmpeg
- ImageMagick
- Python 3.x
- Clone this repository
Open a terminal and clone the repository.
git clone https://github.com/scriubuguri/ClipCrafter.git
-
Install Ansi
-
See Whisper repository and follow the instructions provided in the README to download one of the Whisper models
-
Make the
clip_crafter.sh
script executable, run it and follow the intuitive instructions provided
chmod +x clip_crafter.sh
./clip_crafter.sh
- Generate the wav file (make sure you are in whisper folder)
ffmpeg -i /path/to/your/concatenatedvideo -ar 16000 -ac 1 -c:a pcm_s16le output.wav
- Generate the vtt file (make sure you are in whisper folder)
./main -m ./models/your-downloaded-model -f output.wav -l ro -ml 1 -ovtt
You can find the 4
and 5
steps also in the whisper repository with some examples.
- Run the command to process the vtt file (make sure you are in the main directory)
python3 wav_processing.py whisper.cpp/output.wav.vtt vttfile
- Run the command to create the final vtt file and extract timestamps and text
python3 w_concat.py vttfile vttfinal /path/to/your/concatenatedvideo
- Make the
pic_generator.sh
script executable and run it to generate text images
chmod +x pic_generator.sh
./pic_generator full_words path/to/your/concatenatedvideo
- Move the
overlay_w_img.py
in the folder where you have the video and run it to add captions on it
mv overlay_w_img.py path/to/your_video
python3 overlay_w_img.py
- scriubuguri
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.