One script to transcribe YouTube, TikTok, and Instagram Reels — no setup required.
Paste any video URL and get a .txt transcript in seconds. Platform is auto-detected. YouTube videos with captions are fetched instantly; everything else is transcribed locally with Whisper.
- Auto-detects platform from the URL — YouTube, TikTok, or Instagram
- YouTube caption API first — instant transcripts with no AI overhead when captions exist
- Whisper fallback — if a YouTube video has no captions, or for TikTok/Instagram, audio is downloaded and transcribed locally
- Zero setup — runs via
uvwith no virtual environment or install step - Batch support — pass multiple URLs at once, even across different platforms
- Configurable Whisper model — trade speed for accuracy with
--model
That's it. Dependencies (youtube-transcript-api, yt-dlp, openai-whisper) are declared inline and installed automatically on first run.
# Single URL — platform is auto-detected
uv run transcript.py https://www.youtube.com/watch?v=VIDEO_ID
uv run transcript.py https://www.tiktok.com/@user/video/ID
uv run transcript.py https://www.instagram.com/reel/ID/
# Multiple URLs (mixed platforms are fine)
uv run transcript.py <youtube-url> <tiktok-url> <instagram-url>
# Use a larger Whisper model for better accuracy
uv run transcript.py <url> --model small # tiny | base | small | medium | large
# Interactive mode — paste URLs line by line, press Enter twice when done
uv run transcript.pyOutput is saved as a .txt file in your current directory, named after the video title.
| Platform | Strategy |
|---|---|
| YouTube | Tries the caption/subtitle API first (fast, no AI). Falls back to Whisper if no captions are found. |
| TikTok | Downloads audio via yt-dlp, transcribes with Whisper. |
Downloads audio via yt-dlp, transcribes with Whisper. |
Whisper is loaded lazily — if all your YouTube videos have captions, the model is never loaded.
Contributions are welcome! Here's how to get started:
- Fork this repository
- Create a branch for your change:
git checkout -b my-feature - Make your changes and test them locally with
uv run transcript.py - Open a pull request with a clear description of what you changed and why
Ideas for contributions:
- Support for additional platforms (e.g. YouTube Shorts direct URLs, Twitter/X, Vimeo)
- Output formats (SRT, JSON with timestamps)
- A
--output-dirflag to specify where transcripts are saved - Better filename collision handling
Please keep pull requests focused — one feature or fix per PR.
MIT — do whatever you want, attribution appreciated.
- openai/whisper — speech recognition model
- yt-dlp/yt-dlp — video/audio downloader
- jdepoix/youtube-transcript-api — YouTube caption fetching
- astral-sh/uv — fast Python package runner that makes zero-setup scripts possible
