Tools+45 XP

How I transcribe reels and videos locally with yt-dlp and faster-whisper

People send me reels and videos I don't have time to watch. I grab them with yt-dlp, pull the audio with ffmpeg and transcribe them with Whisper on my own PC.

IvánPublished on 7 minLeer en español

People send me Instagram reels, TikToks and YouTube videos with a “you’ll like this one”. Half of them take three minutes to say something you could read in twenty seconds. So I put together a recipe to turn them into text on my own PC: I download the video with yt-dlp, pull out the audio with ffmpeg and transcribe it with faster-whisper. Nothing goes to a cloud service and, once the model is downloaded, it works offline.

It also has a very handy side effect: with the text and a few frames, I hand the reel to Claude Code and it “watches” it without me having to open it. Here’s how I have it set up, with real timings on my PC and the problems I ran into.

1. The three pieces

Tool What it does How I installed it
yt-dlp Downloads videos from YouTube, Instagram, TikTok and hundreds of other sites pip install yt-dlp
ffmpeg Extracts the audio and the frames winget install Gyan.FFmpeg
faster-whisper Whisper (OpenAI’s speech-to-text model) rewritten to run faster and use less memory pip install faster-whisper

My setup: Windows 11, Python 3.12, yt-dlp 2026.08.19, ffmpeg 9.0 and faster-whisper 1.2.1. On Linux it’s the same, swapping winget for your distro’s package manager.

pip install -U yt-dlp faster-whisper
python -m yt_dlp --version
ffmpeg -version

I run python -m yt_dlp instead of plain yt-dlp because on Windows pip’s scripts folder isn’t always on the PATH. This way it always works.

2. Download the video (and its description)

python -m yt_dlp --write-info-json -o "video.%(ext)s" "https://www.instagram.com/reel/XXXXXXXX/"

With a public Instagram reel it worked first time, no cookies needed. --write-info-json saves a video.info.json next to it with the title, the author and, most importantly, the description, which on reels often holds half the information (the links, the list of tools…). To read it:

python -c "import json; print(json.load(open('video.info.json', encoding='utf-8'))['description'])"

yt-dlp changes often because websites change often. If a download that used to work suddenly fails, the first thing to try is pip install -U yt-dlp.

A word of warning: only download what you’re allowed to watch, and for your own use. Being able to download something doesn’t mean you can republish it.

3. Extract the audio with ffmpeg

Whisper works with mono audio at 16 kHz. If you give it that already, it skips the conversion and there are no surprises:

ffmpeg -i video.mp4 -ar 16000 -ac 1 audio.wav

4. Transcribe with faster-whisper

The bare minimum:

from faster_whisper import WhisperModel

m = WhisperModel("small", device="cpu", compute_type="int8")
segments, info = m.transcribe("audio.wav", language="es", vad_filter=True)

with open("transcript.txt", "w", encoding="utf-8") as f:
    for s in segments:
        f.write(f"[{s.start:6.1f} -> {s.end:6.1f}] {s.text.strip()}\n")

Three choices that matter:

  • compute_type="int8": the model works with lower-precision numbers. On the CPU it’s noticeably faster and the quality barely changes.
  • language="es" (or "en", or whatever the video is in): if you don’t tell it, it guesses from the first few seconds. With a reel that opens with music or a word in another language, it sometimes guesses wrong and hands you a translation.
  • vad_filter=True: skips the parts with no speech. It’s faster and avoids the phantom sentences Whisper sometimes writes over silence or background music (“Thanks for watching” when nobody said it).

The first run downloads the model from Hugging Face (small is about 500 MB) and caches it. After that it loads in about 3 seconds.

5. How long it really takes

I timed it on my PC (Ryzen 9 3900X, 32 GB of RAM, CPU only) with an 82-second test clip in Spanish:

Model Time Result
base 10 s Fine overall, but “RaspberiPi” and the odd strange sentence
small 27 s Better punctuation and names; my default

With small it runs about three times faster than the audio itself. For a one-minute reel there’s no point getting fancier. For an hour-long talk it’s a different story, and that’s where I’d want the GPU (see below).

6. The trouble with technical names

The test clip talked about the Raspberry Pi, the router, Docker Compose and the NAS. Whisper gave me “Rautar” and “DAACarCampoUs”. It’s the classic case: English words inside a Spanish sentence.

The first fix is to pass the vocabulary in initial_prompt:

segments, info = m.transcribe(
    "audio.wav", language="es", vad_filter=True,
    initial_prompt="Raspberry Pi, router, Docker Compose, NAS, script."
)

With that, “router” and “NAS” came out right. “Docker Compose” was still wrong. To be fair, the test clip was read by a Windows synthetic voice, which pronounces English terribly. With real people talking it does quite a bit better, but if the video is full of technical names, check the text before you trust it.

7. All together in one script

This is the one I use. Give it a URL or a file and it leaves you a transcript with timestamps:

import subprocess, sys
from pathlib import Path
from faster_whisper import WhisperModel

source = sys.argv[1]                      # video URL or path to a file
model = sys.argv[2] if len(sys.argv) > 2 else "small"
folder = Path("transcripts"); folder.mkdir(exist_ok=True)

# 1. If it's a URL, download it with yt-dlp (and keep the description in a .info.json)
if source.startswith("http"):
    subprocess.run([sys.executable, "-m", "yt_dlp", "--write-info-json",
                    "-o", str(folder / "video.%(ext)s"), source], check=True)
    video = next(p for p in folder.glob("video.*") if not p.name.endswith(".json"))
else:
    video = Path(source)

# 2. Extract mono 16 kHz audio, which is what Whisper uses
audio = folder / "audio.wav"
subprocess.run(["ffmpeg", "-y", "-loglevel", "error", "-i", str(video),
                "-ar", "16000", "-ac", "1", str(audio)], check=True)

# 3. Transcribe on the CPU
m = WhisperModel(model, device="cpu", compute_type="int8")
segments, info = m.transcribe(str(audio), language="es", vad_filter=True,
                              initial_prompt="Raspberry Pi, Docker, NAS, Proxmox.")

# 4. Save the text with timestamps, always as UTF-8
output = folder / f"{video.stem}.txt"
with open(output, "w", encoding="utf-8") as f:
    for s in segments:
        f.write(f"[{s.start:6.1f} -> {s.end:6.1f}] {s.text.strip()}\n")
print(f"Done: {output} ({info.duration:.0f} s of audio)")
python transcribe.py "https://www.youtube.com/watch?v=XXXXXXXX"
python transcribe.py talk.mp4 base

Why write to a file instead of printing to the screen? Because the first time I printed it to the console and piped it through grep, which answered “Binary file matches” instead of the text: between the accented characters and the Windows console encoding, grep thought it was a binary. With a UTF-8 .txt it never happens again.

8. Bonus: watching the video without watching it

Plenty of reels make no sense from the audio alone: “look at this” while they show a screen. For those I grab one frame every 3 seconds and stitch them into 4x2 contact sheets:

ffmpeg -i video.mp4 -vf "fps=1/3,scale=480:-1,tile=4x2" sheet%02d.jpg

A 30-second video ends up as two images. With the transcript, the description from the info.json and the contact sheets, any model that can read images understands the whole video. That’s how I use it with Claude Code: I paste the link, it runs the recipe, reads the text, looks at the sheets and tells me whether it’s worth my time. Same idea as the AI on my Raspberry Pi: let it work on data I’ve pulled locally.

9. What about the GPU?

I have an RTX 2070 Super, so I tried device="cuda", compute_type="float16". Result:

RuntimeError: Library cublas64_12.dll is not found or cannot be loaded

The NVIDIA driver isn’t enough: faster-whisper needs the CUDA 12 libraries (cuBLAS and cuDNN 9) installed separately. You can get them with pip (nvidia-cublas-cu12, nvidia-cudnn-cu12) or with NVIDIA’s CUDA installer. I haven’t installed them: for one- or two-minute reels, 27 seconds on the CPU is plenty. If I ever transcribe long talks, it’ll be the first thing I do.

What not to do

  • Not setting the language. If the video opens with music or a sentence in another language, it may detect the wrong one and give you something else.
  • Trusting technical names. Check brands, commands and acronyms before copying anything from the transcript.
  • Using large “just in case” on the CPU. It’s much slower and, for clean audio, small already does the job. Only move up if you see it failing.
  • Republishing what you download. It’s for your own use: reading it, searching it, summarising it.

Summary

  1. yt-dlp to download (with --write-info-json to keep the description).
  2. ffmpeg to turn the audio into mono 16 kHz.
  3. faster-whisper with small, int8, a fixed language and vad_filter=True.
  4. initial_prompt with the technical vocabulary, and check the result.
  5. Frame contact sheets if the video shows things on screen.

What I like most is that it works offline and without accounts. Once the model is downloaded, the audio never leaves my PC.

Mini quiz

Did it stick?

Three quick questions. Each right answer is worth 10 XP.

  1. What does vad_filter=True do when transcribing with faster-whisper?
  2. Whisper gets technical names wrong ("router" comes out as "Rautar"). What's the first thing I try?
  3. Moving to the GPU I got "cublas64_12.dll is not found". What does it mean?
  • #whisper
  • #yt-dlp
  • #ffmpeg
  • #python
  • #local-ai
Esc