
dreamers-laboratory/video-input-to-modern-llm
API developmentこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
コンテキストウィンドウを吹くことなく、LLM を動画に表示します: 選択した解像度でフレームのサンプリング, モデル家族あたりのトークン見積り, 予算フィッティング, コンタクトシート.
概要
動画を見ることができないモデル。 フレームを見ることができ、どのフレームでも問題が発生したとしてもトークンをコストします。 これは、フレームの選択を意図するスキルプラス2つのスクリプトです。名前の解像度でffmpegのサンプル、トークンのコストを推定し、何かが添付される前にトークンを推定し、解像度に対する取引フレームカウントで予算に合ったものです。 クロードコードのスキル、コーデックススキル、またはスクリプトを実行できる任意のエージェントの指示をプレーンとして動作します。 PATHのffmpegとffprobeを必要としています。 各フレームには、そのタイムスタンプが角に焼かれ、マニフェスト.json に、モデルファミリーごとの寸法と推定トークンが記載されています。 コンタクトシートは、フレームを1枚の画像にタイルを張ります。 それからあなたが付くために何であるかメーターで計って下さい: Estimates は、各プロバイダーの公開サイジングルールを使用します。Anthropic のピクセル ÷ 750 は、独自のダウンスケール、OpenAI の 512 px のタイルルール (タイル + 85) と 32 px のパッチルール (1536 パッチでキャプチャ) の後。 見積もりです。 測定値 tokens.
概要(AI 翻訳)
動画を見ることができないモデル。 フレームを見ることができ、どのフレームでも問題が発生したとしてもトークンをコストします。 これは、フレームの選択を意図するスキルプラス2つのスクリプトです。名前の解像度でffmpegのサンプル、トークンのコストを推定し、何かが添付される前にトークンを推定し、解像度に対する取引フレームカウントで予算に合ったものです。
クロードコードのスキル、コーデックススキル、またはスクリプトを実行できる任意のエージェントの指示をプレーンとして動作します。 PATH の [ffmpeg と ffprobe] は、他にありません。
インストール
使用
各フレームにタイムスタンプが角に焼かれ、モデルファミリーごとの寸法と推定トークンをmanifest.jsonにリストされています。 コンタクトシートは、フレームを1枚の画像にタイルを張ります。
それからあなたが付くために何であるかメーターで計って下さい:
ノブ
| フラッグ | 業務内容 | お問い合わせ |【[T3] | 1フレーム毎秒 | | 【[T4] | 1秒あたりのNフレーム | | 【[T5]】 | 映像が変化するフレーム、Tを下げるとカットが増える | | 【[[T6]】 | エンコーダのIフレーム、高速なラフパス | | 【[[T7]】 | 長辺 512, 768, 1024, 長辺 512, 原産なし |
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
video-input-to-modern-llm
A model cannot watch a video. It can look at frames, and every frame costs tokens whether or not it mattered. This is a skill plus two scripts that make the choice of frames deliberate: sample with ffmpeg at a resolution you name, estimate the token cost before anything is attached, and fit a budget by trading frame count against resolution.
Works as a Claude Code skill, a Codex skill, or plain instructions for any agent that can run a script. Needs ffmpeg and ffprobe on PATH, nothing else.
Install
git clone
cp -r video-input-to-modern-llm ~/.claude/skills/video-input-to-modern-llm # or ~/.codex/skills/
Use
python3 scripts/sample_video.py demo.mp4 --out /tmp/frames \
--mode scene --resolution low --sheet 4 --token-budget 3000 --model-family claude
demo.mp4: 1920x1080 30.0 fps 00:04:12.40
mode=scene resolution=low -> 15 frames at 512x288 in /tmp/frames/
tokens (frames): claude~2955 openai-tile~3825 openai-patch~2160
tokens (sheets): 1 sheet(s) claude~1842 openai-tile~1445
manifest: /tmp/frames/manifest.json
Every frame has its timestamp burned into the corner and listed in manifest.json with its dimensions and estimated tokens per model family. Contact sheets tile the frames into one image for a cheap first look.
Then meter what you are about to attach:
python3 scripts/measure_tokens.py /tmp/frames/detail
python3 scripts/measure_tokens.py /tmp/frames/detail --exact # real count via Anthropic's endpoint
The knobs
| flag | what it does |
|---|---|
--mode interval --every S |
one frame every S seconds |
--mode fps N |
N frames per second |
--mode scene --scene-threshold T |
frames where the picture changes; lower T finds more cuts |
--mode keyframes |
the encoder’s I-frames, a fast rough pass |
--resolution low|medium|high|full |
long side 512, 768, 1024, or native; never upscales |
--width PX |
explicit long side |
--max-frames N |
cap any mode by thinning evenly |
--token-budget N --model-family claude|openai |
fit the budget: fewer frames first, then lower resolution, never silently over |
--sheet COLS |
build COLSxCOLS contact sheets, capped at 1568 px wide |
--start S --end S |
window the video |
--audio |
also write a mono 16 kHz WAV for transcription |
Token estimates
Estimates use each provider’s published sizing rules: Anthropic’s pixels ÷ 750 after its own downscale, OpenAI’s 512-px tile rule (170 per tile + 85) and 32-px patch rule (capped at 1536 patches). They are estimates. measure_tokens.py --exact asks Anthropic’s token-counting endpoint for the real number without creating a message. OpenAI has no counting endpoint for images, so those columns stay estimates, and some models apply a multiplier on top of the patch count.
The skill
推奨ツール
別のキーワードを試すか、フィルタを外してください。
インストール
npx skillfish add dreamers-laboratory/video-input-to-modern-llm