Automatically create social media clips from long videos. Save time and increase social metrics.
Clips AI | AI Video Repurposing for Developers is an open-source Python library that automatically converts longform video into clips. With just a few lines of code, you can segment a video into multiple clips and resize its aspect ratio from 16:9 to 9:16. The tool is designed for audio-centric, narrative-based videos such as podcasts, interviews, speeches, and sermons. Its clipping algorithm analyzes a video's transcript to identify and create clips, while its resizing algorithm dynamically reframes videos to focus on the current speaker, converting the video into various aspect ratios.
pip install clipsaipip install whisperx@git+https://github.com/m-bain/whisperx.gitSince clips are found using the video's transcript, the video must first be transcribed. Transcribing is done with WhisperX, an open-source wrapper on Whisper with additional functionality for detecting start and stop times for each word.
To resize the original video to the desired aspect ratio, a Hugging Face access token is required to use Pyannote for speaker diarization. You won’t be charged for using Pyannote; instructions are available on the Pyannote HuggingFace page.
pip install clipsaipip install whisperx@git+https://github.com/m-bain/whisperx.gitfrom clipsai import ClipFinder, Transcribertranscriber = Transcriber() then transcription = transcriber.transcribe(audio_file_path = "/abs/path/to/video.mp4")clipfinder = ClipFinder() then clips = clipfinder.find_clips(transcription = transcription)crops = resize(video_file_path = "/abs/path/to/video.mp4", pyannote_auth_token = "pyannote_token", aspect_ratio = (9, 16))