Skip to main content

CLI tool to generate slide-aligned markdown notes from YouTube videos or local video files.

Project description

slidecap

CLI tool that turns a YouTube video into slide-aligned markdown notes for agent/LLM workflows.

What It Does

  1. Downloads a YouTube video at 1080p (strict by default).
  2. Detects slide changes using SSIM-based frame comparison (same behavior as your existing app).
  3. Transcribes audio with Whisper.
  4. Aligns transcript chunks to detected slide timestamps.
  5. Writes:
    • A markdown file with slide sections + transcript text.
    • Slide images to one shared images folder.

Install

pip install slidecap

System dependencies:

  • ffmpeg in PATH
  • yt-dlp in PATH

Usage

Minimal — just pass a URL:

slidecap --url "https://www.youtube.com/watch?v=abc123"

This creates:

./slidecap/
  My Video Title.md
  slides/
    yt_abc123_slide_001_t000005.jpg
    ...

Custom output paths:

slidecap \
  --url "https://www.youtube.com/watch?v=abc123" \
  --out-md "/path/to/vault/notes/abc123.md" \
  --images-dir "/path/to/vault/assets/youtube-slides"

JSON output (for agents):

slidecap --url "https://www.youtube.com/watch?v=abc123" --json

Flags

  • --url (required): YouTube URL.
  • --out-md (optional): Output markdown path. Defaults to ./slidecap/<video title>.md.
  • --images-dir (optional): Slide images folder. Defaults to ./slidecap/slides/.
  • --similarity-threshold (default 0.85): Slide detection threshold.
  • --sample-rate (default 1.0): Frame sampling interval in seconds.
  • --whisper-model (default medium): Whisper model name. See Whisper Models below.
  • --language: Optional transcription language code (e.g. en, de, ja).
  • --image-format (default jpg): jpg or png.
  • --image-quality (default 90): JPEG quality.
  • --allow-lower-quality: Fallback below 1080p if exact 1080p is unavailable.
  • --overwrite: Overwrite existing markdown output.
  • --keep-temp: Keep temp downloads for debugging.
  • --log-level (default info): debug|info|warn|error.
  • --json: Print structured JSON result (success or error) for agent workflows.

Whisper Models

Model Speed Accuracy Notes
tiny Fastest Lowest Quick drafts
base Fast Good
small Moderate Better Good general choice
medium Slow Strong Default
large Slowest Best Alias for latest large
large-v1 Slowest Best Original large
large-v2 Slowest Best Improved large
large-v3 Slowest Best Latest multilingual
large-v3-turbo Fast Very good Distilled large-v3
turbo Fast Very good Alias for large-v3-turbo

English-only variants (tiny.en, base.en, small.en, medium.en) are faster than their multilingual counterparts when transcribing English content.

Output Format

The markdown file includes:

  • source metadata
  • table of contents
  • per-slide sections with:
    • timestamped YouTube link
    • relative markdown image link
    • transcript chunk aligned to that slide

Images are named to avoid collisions:

  • yt_<video-id>_slide_<nnn>_t<seconds>.<ext>

JSON Response Shape

Success:

{
  "status": "ok",
  "url": "https://www.youtube.com/watch?v=abc123",
  "video_id": "abc123",
  "output_markdown": "/path/to/vault/notes/abc123.md",
  "images_dir": "/path/to/vault/assets/youtube-slides",
  "slide_count": 12,
  "image_files": [],
  "downloaded_resolution": "1920x1080",
  "downloaded_fps": "30",
  "format_note": "1080p",
  "download_format": "bestvideo[height=1080]+bestaudio/best[height=1080]",
  "similarity_threshold": 0.85,
  "sample_rate": 1.0,
  "whisper_model": "medium",
  "language": "en",
  "started_at": "2026-02-23T00:00:00+00:00",
  "completed_at": "2026-02-23T00:03:00+00:00",
  "duration_seconds": 180.123,
  "warnings": []
}

Error:

{
  "status": "error",
  "error": "message",
  "error_type": "RuntimeError"
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slidecap-0.4.0.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slidecap-0.4.0-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file slidecap-0.4.0.tar.gz.

File metadata

  • Download URL: slidecap-0.4.0.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for slidecap-0.4.0.tar.gz
Algorithm Hash digest
SHA256 34f9c2a9de0acc30fcc89912f84c878fe53d28f820a20d7d1e8d03b60036ad69
MD5 e1f067e815a100d2c3c3eb92b3cc4478
BLAKE2b-256 c3b83de048ac32151e1b9fa3ac904a0ad6d4f124a51f14dbf7f714792ef15b96

See more details on using hashes here.

File details

Details for the file slidecap-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: slidecap-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for slidecap-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6f2d12944f6c433094f1f749df27156c8111bdabbe073e21e987c05535cfc13
MD5 2f71b222ae00af37e9ab6ce326d5894a
BLAKE2b-256 0e69ca175ee0f972a57c8ff3f04fda678c1cbea5369d1fc666bd7d70a931e9a2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page