Video2Shorts is a online Python tool that allows you to convert your YouTube video into smaller shorts. Here is the step by step of how it works;
- Uploading the video, you can upload a video from your local machine in
.mp4format. Alternatively, for demo purposes you can use the sample video too. - Extracting the audio, then the audio is extracted from the video,
- Transcription of audio, using OpenAI's Whisper model we transcribe the audio. The transcription will be used to identify the hook segments in the video,
- Hooks extraction, then Google Gemini 2.5 flash API is called to extract the hook sentences and content that can be converted into the shorts. It outputs the start and end time stamp along with suggestion of the title.
- Cliiping and downloading, then each hook content is clipped to create a short and user can download the clipped content easily for the upload.
Due to rate limit of Free Tier of Google Gemini API, the application may not work properly when it exceeds the rate limit. Or, the audio processing part or clipping part might take time. So, alternatively you can click on I am using Siege demo button to load the cached content from previous iterations.
If you want to setup your own site at your local computer or server,
- Install the necessary dependency in
pyproject.toml. I used poetry so, if you are using poetry from dependency management, you can simply dopoetry install. - Run the streamlit applicaation with command,
streamlit run main.py- Note, that
ffmpeglibrary is required for this application to run. So, please install it in local system before use.
To run, the application you can visit https://video2shorts.streamlit.app/