rewatch
rewatch takes a long video and turns it into short clips with captions. It all runs on your own laptop. No API keys, no uploading your videos anywhere, no paying per clip.
I'm building this from scratch to learn, so it's early. This is version 0.1.0.
What works right now
You can cut any part of a video into a clip that plays everywhere (phones, Macs, Windows, Instagram, WhatsApp). You can also give it a clip and it will listen to the speech, write captions and put them on the video. The listening part uses Whisper, running locally.
What I'm working on next
The big one: finding the best moments in a long video by itself. A lot of clipping tools just ask an AI chatbot "what's interesting here?". I want to train a model on what people actually rewatch on YouTube and use that instead.
After that, a vertical crop that follows whoever is talking, and captions in Hindi and Telugu.
Before you install
You need Python 3.11 or newer, and FFmpeg.
One thing that took me a while to figure out: on a Mac, the normal brew install ffmpeg can't draw captions, because it's built without a library called libass. You need ffmpeg-full:
brew install ffmpeg-full
brew unlink ffmpeg
brew link --force ffmpeg-full
To check, run ffmpeg -hide_banner -filters | grep subtitles. If it prints nothing, captions won't work.
Install
git clone https://github.com/shaikashfaaqhamja/rewatch.git
cd rewatch
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
How to use it
Cut 30 seconds, starting at 1:30:
rewatch cut episode.mp4 90 120 clip.mp4
Put captions on a clip:
rewatch captions clip.mp4 clip_captioned.mp4
The first time you run captions it downloads the Whisper model, so give it a minute.
What happens inside
FFmpeg cuts the clip and converts it to H.264 video and AAC audio, which is what plays everywhere. Then faster-whisper listens to it and gives back every word with the time it was said. I group those words into short lines of up to five words, and a line also ends wherever a sentence ends. The lines go into an SRT file, and FFmpeg draws them onto every frame.
License
MIT, so you can use it however you want. See LICENSE.
Metadata
Release files for rewatchx 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rewatchx-0.1.0.tar.gz | 4.9 kB | Without provenance | Details for rewatchx-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rewatchx-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for rewatchx-0.1.0-py3-none-any.whl |
Total release size: 11.0 kB
Release files / rewatchx-0.1.0.tar.gz
| Download URL | rewatchx-0.1.0.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
72dcb797bc4ad91a9fdf46c72de35535832e53367517880345d3a08a142ec602
|
|
BLAKE2b-256 checksum How to use checksums |
670e6f1346f45392aa76917e625f8e32131715011063ce8e4e65409b77c64f1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / rewatchx-0.1.0-py3-none-any.whl
| Download URL | rewatchx-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
16f9e41a21189d10afd5369e1e11fd596e6c4475f678396a8d45b84dbf698fb1
|
|
BLAKE2b-256 checksum How to use checksums |
9968317b14458a7e46f65ba302917c09ae869331d5f2bcfbe119d3d3dbbfeb95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for rewatchx 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.