Skip to main content
Analyze a video and automatically generate short-form segments for platforms like YouTube Shorts and Instagram Reels.

Code

video_to_shorts.py

Usage

1

Set up your virtual environment

2

Install dependencies

3

Install ffmpeg

4

Provide the input video

Save or copy an MP4 file next to video_to_shorts.py as sample_video.mp4.
5

Export your GOOGLE API key

6

Run the agent