cd /news/artificial-intelligence/show-hn-youtube-guitar-tab-parser Β· home β€Ί topics β€Ί artificial-intelligence β€Ί article
[ARTICLE Β· art-57869] src=github.com β†— pub= topic=artificial-intelligence verified=true sentiment=Β· neutral

Show HN: YouTube Guitar Tab Parser

A developer released a command-line tool that converts YouTube guitar lesson videos into PDF guitar tabs. The tool uses Claude vision to detect tab regions in video frames, deduplicates them by bar number, and stitches them into a PDF. It is available on GitHub and requires an Anthropic API key.

read2 min views1 publishedJul 13, 2026
Show HN: YouTube Guitar Tab Parser
Image: source

CLI that turns a YouTube guitar-lesson video into a PDF of the guitar tab.

It downloads the video, samples frames, uses Claude vision to locate the tab region, crops every frame to that region, de-duplicates the crops by the bar number printed on each line of the score, and stitches the distinct tab lines vertically into a PDF. It works out of the box with no configuration β€” the PDF is written to out/<video-title>.pdf

, with the video title as a heading on the first page and in the document metadata.

npm install
npm run build
cp .env.example .env   # then put your ANTHROPIC_API_KEY in it
node --env-file=.env dist/cli.js "https://www.youtube.com/watch?v=WgU5tDGC-Vc"

export ANTHROPIC_API_KEY=sk-ant-...
node dist/cli.js "https://www.youtube.com/watch?v=WgU5tDGC-Vc"

During development you can skip the build step:

node --env-file=.env --import tsx src/cli.ts "<url>"

The result is written to out/<video-title>.pdf

(its path is also printed to stdout); progress goes to stderr.

Everything has a sensible default; you normally only need the URL.

-i, --interval <seconds>   screenshot interval (default 2)
--model <id>               Claude vision model (default claude-sonnet-5)
--sample <n>               frames sampled for tab-region detection (default 6)
--dedup-threshold <n>      pre-dedup Hamming distance, cost control (default 12)
--max-height <px>          cap download resolution (default 720)
--keep-temp                keep intermediate frames/crops

Downloadβ€”yt-dlp

fetches the video (≀--max-height

).Framesβ€”ffmpeg

extracts one frame every--interval

seconds.Detectβ€” a labeled horizontal-band grid is drawn on--sample

frames and Claude vision reports which bands contain sheet music. The median first/last music band (robust to an outlier) gives the vertical extent; width is kept full. (Coarse labeled bands are far more reliable than asking a vision model for precise pixel coordinates.)Cropβ€”sharp

crops every frame to that region.Pre-dedupβ€” a dHash perceptual hash drops near-identical consecutive crops. This is only a cost control to reduce the number of vision calls in the next step.Bar-number dedupβ€” Claude reads the measure/bar number printed at the start of each line and whether the crop is real sheet music. The tool keeps exactly one crop per distinct bar number (first appearance wins) and drops non-tab crops (title cards, intros/outros). Because the bar number is constant while the playback cursor sweeps a line and only changes when the score advances, this collapses all the near-identical cursor frames of a line into a single page.PDFβ€”pdf-lib

stacks the distinct tab lines vertically down A4 pages, in the order they appear in the video. The video title (read fromyt-dlp

) becomes the file name, a heading on the first page, and the document metadata title. Output:out/<video-title>.pdf

.

── more in #artificial-intelligence 4 stories Β· sorted by recency
── more on @anthropic 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/show-hn-youtube-guit…] indexed:0 read:2min 2026-07-13 Β· β€”