DL

dreamers-laboratory/video-input-to-modern-llm

API development

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

85 stars 품질 59 트렌드 22Apache-2.0

컨텍스트 창을 불어넣지 않고 비디오의 LLM 눈을 제공합니다: 선택된 해상도에서 ffmpeg 프레임 샘플링, 모델 가족, 예산 피팅, 연락처 시트 당 토큰 추정.

개요

모델은 비디오를 볼 수 없습니다. 프레임을 볼 수 있으며, 모든 프레임은 중요하지 않습니다. 이것은 프레임 deliberate의 선택을 만드는 2개의 스크립트 플러스 기술입니다: 당신이 이름에 ffmpeg를 가진 표본, 무엇이든이 붙어 있기 전에 토큰 비용을 견적하고, 해결책에 대하여 거래 구조 조사에 의하여 예산을 적합합니다. Claude Code 스킬, Codex 스킬, 또는 스크립트를 실행할 수있는 모든 에이전트에 대한 일반 지침으로 작동합니다. PATH에 ffmpeg 및 ffprobe가 필요합니다. 모든 프레임은 모서리로 태우며 모델 가족 당 크기와 추정된 토큰으로 나타날.json에 나열되어 있습니다. 연락처 시트 타일 저렴 한 첫 번째 보기에 대 한 하나의 이미지로 프레임. 그런 다음 부착하는 것에 대해 미터 : 추정은 각 공급자의 발행된 sizing 규칙을 사용합니다: Anthropic의 화소 ÷ 750 그것의 자신의 downscale 후에, OpenAI의 512-px 도와 규칙 ( 타일 + 85) 및 32-px 헝겊 조각 규칙 (1536의 헝겊 조각에서 모자를 씌우는). 그들은 견적입니다. 측정 tokens.

개요(AI 번역)

모델은 비디오를 볼 수 없습니다. 프레임을 볼 수 있으며, 모든 프레임은 중요하지 않습니다. 이것은 프레임 deliberate의 선택을 만드는 2개의 스크립트 플러스 기술입니다: 당신이 이름에 ffmpeg를 가진 표본, 무엇이든이 붙어 있기 전에 토큰 비용을 견적하고, 해결책에 대하여 거래 구조 조사에 의하여 예산을 적합합니다.

Claude Code 스킬, Codex 스킬, 또는 스크립트를 실행할 수있는 모든 에이전트에 대한 일반 지침으로 작동합니다. ffmpeg]와 ffprobe PATH에, 다른 아무것도.

설치

사용

모든 프레임은 코너에 태우고 manifest.json]에 나열되어 모델 가족 당 치수와 추정된 토큰을 가지고 있습니다. 연락처 시트 타일 저렴 한 첫 번째 보기에 대 한 하나의 이미지로 프레임.

그런 다음 부착하는 것에 대해 미터 :

칼

| 국기 | 그것이 무엇인지 | |—||| | --mode interval --every S | 각 S초마다 하나의 프레임 | | [T4] | 초당 N 프레임 | | --mode scene --scene-threshold T | 사진이 변경되는 프레임, 더 낮은 T는 더 컷을 찾습니다 | | [T6] | 인코더의 I-프레임, 빠른 거친 패스 | | --resolution low\|medium\|high\|full | 긴면 512, 768, 1024, 또는 네이티브; 절대 업스케이프 |

이 페이지는 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

GitHub에서 전체 README 보기

추천 도구

다른 키워드를 입력하거나 필터를 제거해 보세요.

설치

npx skillfish add dreamers-laboratory/video-input-to-modern-llm
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →