A python-based tool to generate short video content (like Instagram reels or YouTube Shorts).
-
First, we take the following inputs -
input_folder
- a folder containing several videos (ideally dumped from a GoPro or similar camera)scene_prompt
- a prompt describing the kind of scenes you want to extract from the input videosaudio_path
- path to an audio file to be put as background music in the final reel videooutput_folder
- output folder to render the generated reel.
-
With these inputs, the app searches the
input_folder
for parts of the videos that match the scene described in thescene_prompt
and cuts out the clips with the highest matches (using cosine similarity) -
Finally, the app
- combines the extracted clips and the provided audio
- syncs the cuts to the beats of the audio
- renders the final reel at the given output folder
- Clone this repository -
git clone https://github.com/inframarauder/ai-reel-generator.git
- Create a python virtual environment inside the repo -
cd ai-reel-generator python3 -m venv .venv source .venv/bin/activate
- Install the requirements -
pip install -r requirements.txt
- Run the application -
python index.py \ -i "<path-to-input-videos-folder>" \ -a "<path-to-audio>" \ -s "<scene-prompt>" \ -o "<output-folder>"
There are some default settings configured in configs/settings.py
which you may edit as per your needs.