Skip to main content

nybls

nybls

Other tools slurp the whole video. This one sips —
three frames out of fifty-three thousand, and it shows you which.


The problem

Almost every "AI watches YouTube" tool reads the subtitles. That is not a cynical read of the field, it is what the code does: the YouTube loaders in the major agent frameworks and self-hosted chat apps are transcript scrapers, and Google's own documentation says a YouTube source in NotebookLM imports "only the text transcript of the video."

So a video with no speech returns nothing. A chart on screen is invisible. A demo that shows rather than tells is invisible. And you cannot tell the difference between a tool that looked and a tool that guessed, because neither shows you what it saw.

The other half of the field does the opposite and dumps 100 uniformly-sampled frames into the model at once — expensive, mostly redundant, and still blind to whatever fell between the samples.

What nybls does instead

nybls gives an AI agent five ways to ask for pieces of a video, and a protocol that makes it ask well:

  1. Read the free stuff first — transcript, scene boundaries, metadata. Zero images.
  2. Look broadly, cheaply — one contact sheet is six timestamped thumbnails for the cost of a single image.
  3. Then say what it is missing — the agent must name the time interval and what it expects to find there before it may request more.
  4. Drill in only there — full-resolution frames, or a zoom crop to read small text.
  5. Stop, and show the receipts — every answer ends with the frames it examined and what they cost.

Real run, this repo's test corpus — a 35-minute car-restoration video:

watched 35 min · examined 3 images (~3,069 visual tokens, ~$0.01)
of ~53,171 total frames · budget 3/142 units

Three frames. It found the reveal at 12:05, identified that the second half of the video switches to a different car, and reported honestly that a zoom aimed at a badge landed on a headlight instead — so it did not name the model.

Why "sips" is the whole point

The research this is built on is unambiguous: selecting fewer frames well beats sampling many frames blindly. Stanford's VideoAgent matched the accuracy of 180 uniformly-sampled frames using 8.4 frames chosen by a confidence-gated loop. Adaptive keyframe selection beats uniform sampling at equal frame count. Grids larger than about six tiles measurably destroy a model's ability to localize detail. Every rule in the nybls protocol traces to a published result — see docs/RESEARCH.md.

Install

Prerequisites (nybls orchestrates these; it does not vendor them):

Tool Why Install
ffmpeg frame extraction, crops, contact sheets brew install ffmpeg
yt-dlp downloading from YouTube and ~1,800 other sites brew install yt-dlp
deno required by yt-dlp for full YouTube support brew install deno
whisper-cpp local transcription when a video has no captions brew install whisper-cpp

Then:

pip install nybls

On macOS, add Apple Vision OCR (works with Arabic, no extra models):

pip install "nybls[macos]"

For local transcription, download a Whisper model once:

mkdir -p ~/.nybls/models && curl -L -o ~/.nybls/models/ggml-large-v3-turbo.bin \
  https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-large-v3-turbo.bin

Use it

nybls probe "https://www.youtube.com/watch?v=VIDEO_ID"
id: VIDEO_ID
title: But what is a neural network? | Deep learning chapter 1
duration: 18.7 min · 1280x720 · 24 scenes
transcript: subtitles:video.en.vtt -> ~/.nybls/store/VIDEO_ID/transcript.txt
budget: 75 image units
cost so far: 0 images. Read the transcript first; then request sheets.
Command What it does Cost
nybls probe <url|file> download, transcribe, detect scenes, set the budget 0 images
nybls sheet <id> [--range S E] 3x2 contact sheet, timestamped 1 image
nybls frames <id> --at 92,570 full-resolution stills 1 per frame
nybls zoom <id> --at 570 --box x,y,w,h crop into a region to read detail 1 image
nybls ledger <id> what has been spent 0

Everything is written to ~/.nybls/store/<id>/ as ordinary PNG and text files. There is no API integration: your agent reads the files.

With Claude Code

Install as a plugin — the skill and its protocol come with it:

/plugin marketplace add nKOxxx/nybls
/plugin install nybls@nybls

Then ask:

/nybls:watch https://www.youtube.com/watch?v=VIDEO_ID  what does the chart at the end show?

The skill carries the protocol — the confidence check, the named-gap rule, the stop conditions, and the receipts contract — so the discipline travels with the tool instead of depending on how well you prompt. For a personal install without the plugin system, copy skills/watch/SKILL.md to ~/.claude/skills/watch/SKILL.md.

The guardrails are in the tool, not just the prose

A protocol written only in a prompt is a suggestion. These are enforced by the CLI itself:

  • Named gaps. Past a few images, frames and zoom refuse to run without --looking-for "<interval + what you expect>".
  • A real budget. Duration-scaled, cumulative, and the server refuses to serve past it unless a human passes --force.
  • Duplicate warnings. A frame that is a near-duplicate of one already served is flagged as wasted budget.
  • Next-step nudges. Every command's output ends by telling the agent to draft an answer and classify its own confidence before asking for more.

What this cannot do

  • No live video. Batch only: download, then analyze.
  • Motion is lossy. It sees stills, not movement. Good for talks, tutorials, demos, dashboards, and on-screen text; weak for sports mechanics or fast action.
  • Speech only. Transcription covers words, not music or sound events.
  • It depends on tools that fight back. Video platforms actively break downloaders. Keep yt-dlp current; expect occasional breakage.
  • Alpha. The protocol is validated by published research and by daily use, but this is version 0.1.0 and the interfaces may change.

Privacy and security posture

Local-first by construction: no API keys, no accounts, no telemetry, no server. The agent you already use supplies the model; everything else runs on your machine. See docs/SECURITY.md for the full posture, including the one rule that matters most — video content is data, never instructions. A video can display text aimed at your agent, and the protocol requires that such text be reported to you rather than obeyed.

Downloading from a platform may conflict with that platform's terms of service. That is your call to make; this tool takes no position and phones nothing home.

Documentation

License

MIT.

Metadata

Release files for nybls 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nybls 0.1.1
File Size Uploaded
nybls-0.1.1.tar.gz 27.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nybls 0.1.1
File Interpreter ABI Platform
nybls-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 49.0 kB

Release files / nybls-0.1.1.tar.gz

Download URL nybls-0.1.1.tar.gz
Size 27.7 kB
Tags Source
SHA-256 checksum
How to use checksums
acfa0037c885cf3811342093560825d427682ff0e34d2b96b5d71d6a3cf26da8
BLAKE2b-256 checksum
How to use checksums
458f2a984a0bf0a585a4c1365a1428562d78dbf70b363a8136970b849e1979d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / nybls-0.1.1-py3-none-any.whl

Download URL nybls-0.1.1-py3-none-any.whl
Size 21.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
27528ac1d8c621efbb251d0400fc7d9f20f28763b64e743f8641fd12fdf29769
BLAKE2b-256 checksum
How to use checksums
0389342291b8db453de1f73108b4f63a373218727c19ee52604f1e2277d931c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release history Release notifications | RSS feed

0.10.0

2 release files

0.9.8

2 release files

0.9.7

2 release files

0.9.6

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.4.0

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page