youtube-guitar-tab-parser: A CLI That Turns YouTube Guitar Lessons into PDF Tabs Using Claude Vision
A new open-source CLI tool uses Claude's vision capabilities to extract guitar tablature from YouTube lesson videos, automatically cropping, deduplicating, and stitching frames into a clean PDF.

If you've ever tried to learn a song from a YouTube guitar lesson, you know the pain: the tab scrolls by, the instructor's hands block the notation, and you end up scrubbing back and forth for minutes. A new open-source CLI tool called youtube-guitar-tab-parser aims to solve that by turning any YouTube guitar lesson into a clean PDF of the tab, using Claude's vision model to do the heavy lifting.
How It Works
The pipeline is refreshingly straightforward. The tool uses yt-dlp to download the video, then ffmpeg to extract frames at a configurable interval (default every 2 seconds). The clever part comes next: instead of asking a vision model for precise pixel coordinates—which is notoriously unreliable—it draws a labeled horizontal-band grid on a sample of frames and asks Claude to report which bands contain sheet music. This coarse approach is robust to outliers and gives a reliable vertical crop region.
Once the tab region is identified, every frame is cropped to that area. A perceptual hash (dHash) drops near-identical consecutive crops to reduce API costs. Then Claude reads the bar number printed at the start of each line and keeps exactly one crop per distinct bar number, dropping non-tab frames like title cards or intros. Finally, pdf-lib stitches the distinct tab lines vertically onto A4 pages, with the video title as a heading and document metadata.
Key Details
- Requirements: Node.js ≥ 20,
yt-dlp,ffmpeg, and an Anthropic API key. - Setup:
npm install && npm run build, then add yourANTHROPIC_API_KEYto a.envfile. - Usage:
node dist/cli.js "<youtube-url>"— the PDF lands inout/<video-title>.pdf. - Options: Everything has sensible defaults. You can tweak the screenshot interval, Claude model, sample size, dedup threshold, and max resolution.
Why This Matters
This is a great example of using LLM vision capabilities not for flashy demos but for a genuinely practical, well-scoped task. The design choices—coarse band detection instead of pixel-perfect coordinates, bar-number deduplication instead of naive frame comparison—show real engineering thought. It's also refreshing to see a tool that works out of the box with zero configuration.
The source code is on GitHub under what appears to be an MIT license. If you're a guitarist who also happens to write code, this is worth a spin.
Source: GitHub
Discussion
0 Comments
Be the first to start the discussion.