메뉴
HN
Hacker News 26일 전

클로드 영상 처리 도구 'claude-real-video' 공개

IMP
8/10
핵심 요약

대부분의 LLM이 영상을 직접 보지 못하고 텍스트나 고정된 프레임만 읽는 한계를 극복하는 오픈소스 도구입니다. 이 도구는 로컬 환경에서 영상의 씬 전환을 감지해 의미 있는 프레임과 오디오 텍스트만 추출하므로, 어떤 LLM이든 영상을 완벽하게 이해할 수 있게 해줍니다. 클라우드 업로드 없이 로컬에서 처리되어 비용과 보안 측면에서 매우 유용합니다.

번역된 본문

제목: claude-real-video - 모든 LLM이 영상을 볼 수 있게 한다

claude-real-video는 Claude나 다른 어떤 LLM이라도 실제로 영상을 볼 수 있게 해줍니다.

대부분의 AI 도구는 사실 영상을 '보지' 못합니다. ChatGPT에 유튜브 링크를 붙여넣으면 그림이 아닌 텍스트(자막)만 읽어옵니다. Claude는 아예 동영상 파일을 받아들이지 않죠. 영상을 기본적으로 읽을 수 있는 Gemini조차도 구글 서버로 데이터를 보내 정해진 간격(기본 1초당 1프레임, 1 fps)으로 프레임을 추출하므로, 빠르게 화면이 전환되는 장면은 놓치게 됩니다.

claude-real-video는 방식이 다릅니다. 그리고 로컬에서 작동합니다. URL이나 파일 경로를 지정하면, 실제로 중요한 프레임(고정된 할당량이 아닌 모든 씬 변경 지점)만 추출하고, 중복에 가까운 프레임은 버린 뒤, 오디오를 텍스트로 변환하여 어떤 LLM이든 읽을 수 있는 깔끔한 폴더를 사용자의 컴퓨터에 만들어 줍니다. 어떤 것도 클라우드로 업로드되지 않습니다.

crv "https://www.youtube.com/watch?v=..." # → crv-out/frames/*.jpg + crv-out/transcript.txt + crv-out/MANIFEST.txt

그런 다음 이 프레임 이미지들과 MANIFEST.txt 파일을 Claude, ChatGPT, Gemini 등에 넣고 질문하면 됩니다.

왜 단순한 프레임 샘플링이 아닐까? 대부분의 'LLM 영상 시청' 스크립트(및 Gemini 자체 파이프라인)는 정해진 간격(예: 1초당 1개)으로 프레임을 가져옵니다. 이 방식은 정적인 화면 녹화 영상은 과도하게 많이 추출하고, 빠르게 전환되는 영상은 프레임을 놓치게 만듭니다.

claude-real-video는 더 똑똑합니다:

  • 고정 간격 샘플링 (기존 방식): N초마다 프레임 선택
  • claude-real-video: 씬 변경 감지 + 밀도 하한선(fps-floor) 적용
  • 반복되는 샷(A-B-A 컷) 처리 (기존 방식): 컷이 바뀔 때마다 매번 다시 전송됨
  • claude-real-video: 슬라이딩 윈도우 중복 제거(Sliding-window dedup)를 통해 각 샷은 한 번만 전송됨
  • 정적인 슬라이드 영상 (10분) (기존 방식): 약 600개의 거의 동일한 프레임이 생성됨
  • claude-real-video: 1개로 압축(중복 제거)
  • 빠른 컷편집 영상 (기존 방식): 샘플링 사이의 프레임을 놓침
  • claude-real-video: 모든 시각적 변화를 포착함
  • 오디오 (기존 방식): 종종 무시됨
  • claude-real-video: 언어 감지를 지원하는 Whisper 트랜스크립트(자막) 제공
  • 영상 데이터의 이동 (기존 방식): 종종 클라우드로 업로드됨
  • claude-real-video: 사용자의 컴퓨터 내에 머물음
  • 입력 (기존 방식): 보통 로컬 파일만 지원
  • claude-real-video: URL (yt-dlp 사용) 또는 로컬 파일 모두 지원

이를 통해 모델에 더 적고, 더 의미 있는 프레임을 전달하게 되어 컨텍스트 비용(context cost)은 줄어들고 이해도는 높아집니다.

설치 방법 pip install claude-real-video # 핵심 기능 (프레임 추출 + 중복 제거) pip install "claude-real-video[whisper]" # 오디오 텍스트 변환 기능 추가

시스템 요구 사항: ffmpeg 프레임 및 오디오 추출에는 ffmpeg와 ffprobe가 사용되며, 이는 pip로 설치할 수 없습니다. 다음 명령어로 한 번 설치하십시오: OS 명령어: macOS: brew install ffmpeg Linux: sudo apt install ffmpeg (또는 사용 중인 배포판의 패키지 관리자 사용) Windows: winget install Gyan.FFmpeg 또는 choco install ffmpeg 또는 빌드 버전을 다운로드하여 bin\ 폴더를 PATH 환경 변수에 추가

PATH에 제대로 설정되었는지 확인: ffmpeg -version

텍스트 변환은 whisper CLI를 사용합니다 ([whisper] 추가 기능으로 설치되거나 pip install openai-whisper로 설치 가능). Whisper 역시 ffmpeg에 의존합니다. macOS, Windows, Linux(Python 3.10 이상)에서 작동합니다.

사용법

유튜브 / 인스타그램 / 틱톡 등 링크 입력

crv "https://www.instagram.com/reel/XXXX/"

영어 자막 변환과 함께 로컬 파일을 ./out 폴더에 출력

crv lecture.mp4 -o out --lang en

프레임만 추출 (오디오 변환 X)

crv clip.mp4 --no-transcribe

로그인이 필요한 영상 (본인 소유/인증된 경우): Netscape 쿠키 파일 전달

crv "https://..." --cookies cookies.txt

python -m claude_real_video ... 명령어도 crv의 별칭(alias)으로 작동합니다.

옵션 (Options):

  • -o, --out crv-out: 출력 디렉토리 지정
  • --scene 0.30: 씬 변경 감도 (낮출수록 더 많은 프레임 추출)
  • --fps-floor 1.0: 최소 N초에 한 번은 프레임을 추출하도록 보장
  • --max-frames 150: 총 프레임 수의 하드 캡(최대 제한)
  • --lang auto: Whisper 언어 설정 (en, zh, auto 등)
  • --dedup-threshold 8: 새 프레임으로 인정하기 위해 변경되어야 하는 픽셀의 비율. 높일수록 프레임 수가 줄어듦
  • --dedup-window 4: 유지된 마지막 N개의 프레임과 비교. 모델이 이미 본 샷은 컷어웨이 후에도 다시 나타나지 않음 (1 = 연속된 프레임과만 비교)
  • --report off: ./dropped 폴더에 버려진 프레임을 유지하고, 모든 유지/드롭 결정을 시각화한 report.html 작성
  • --no-transcribe off: 오디오 변환 생략
  • --keep-audio off: 오디오 모델이들을 수 있도록 전체 사운드 트랙(audio.m4a)도 함께 저장
  • --cookies –: 로그인이 필요한 소스를 위한 Netscape 쿠키 파일

Python 코드에서 사용하기 from claude_real_video import process r = process("https://youtu.be/...", "out", lang="en") print(r.frame_count, r.transcript_path)

작동 원리 가져오기 (Fetch) — URL의 경우 yt-dlp를 사용(옵션으로 쿠키 적용 가능)하거나, 로컬 파일을 복사합니다. 추출 (Extract) — 하나의 시간순 ffmpeg 선택 패스(pass)가 모든 프레임을 가져옵니다...

원문 보기
원문 보기 (영어)
claude-real-video Let Claude — or any LLM — actually watch a video. Most AI tools don't really see a video. Paste a YouTube link into ChatGPT and it reads the transcript , not the picture. Claude won't take a video file at all. Even Gemini, which can read video natively, has to send it up to Google and samples frames at a fixed interval (1 fps by default), so fast cuts slip past. claude-real-video does it differently, and locally : point it at a URL or a file, and it pulls the frames that actually matter (every scene change, not a fixed quota), throws away the near-duplicates, transcribes the audio, and hands you a clean folder any LLM can read — on your own machine, nothing uploaded. crv " https://www.youtube.com/watch?v=... " # → crv-out/frames/*.jpg + crv-out/transcript.txt + crv-out/MANIFEST.txt Then drop the frames + MANIFEST.txt into Claude / ChatGPT / Gemini and ask away. Why not just sample frames? Most "let an LLM watch a video" scripts (and Gemini's own pipeline) grab frames at a fixed interval — e.g. one per second. That over-samples a static screencast and under-samples a fast-cut reel. claude-real-video is smarter: fixed-interval sampling claude-real-video Frame selection every N seconds scene-change detection + density floor Repeated shots (A-B-A cuts) sent again every time sliding-window dedup sends each shot once Static slide (10 min) ~600 near-identical frames collapses to 1 (dedup) Fast-cut reel misses frames between samples catches each visual change Audio often ignored Whisper transcript w/ language detect Where the video goes often uploaded to a cloud stays on your machine Input usually local file only URL (yt-dlp) or local file You feed the model fewer, more meaningful frames — cheaper context, better understanding. Install pip install claude-real-video # core (frames + dedup) pip install " claude-real-video[whisper] " # + audio transcription System requirement: ffmpeg ffmpeg / ffprobe are used for frame extraction and audio, and aren't pip-installable. Install them once: OS command macOS brew install ffmpeg Linux sudo apt install ffmpeg (or your distro's package manager) Windows winget install Gyan.FFmpeg — or choco install ffmpeg — or download a build and add its bin\ folder to your PATH Verify it's on your PATH : ffmpeg -version Transcription uses the whisper CLI (installed by the [whisper] extra, or pip install openai-whisper ). Whisper also relies on ffmpeg. Works on macOS, Windows, and Linux — Python 3.10+. Usage # A YouTube / Instagram / TikTok / ... link crv " https://www.instagram.com/reel/XXXX/ " # A local file, English transcript, output to ./out crv lecture.mp4 -o out --lang en # Frames only, no transcription crv clip.mp4 --no-transcribe # A login-gated video (your own / authorised use): pass a Netscape cookie file crv " https://... " --cookies cookies.txt python -m claude_real_video ... works as an alias for crv too. Options flag default meaning -o, --out crv-out output directory --scene 0.30 scene-change sensitivity (lower = more frames) --fps-floor 1.0 at least one frame every N seconds --max-frames 150 hard cap on total frames --lang auto Whisper language ( en , zh , auto , ...) --dedup-threshold 8 % of pixels that must change for a frame to count as new; higher = fewer frames --dedup-window 4 compare against the last N kept frames — a shot the model already saw doesn't come back after a cutaway ( 1 = consecutive-only) --report off keep dropped frames in ./dropped + write report.html visualising every keep/drop decision --no-transcribe off skip audio --keep-audio off also save the full soundtrack ( audio.m4a ) so audio models can hear it --cookies – Netscape cookie file for login-gated sources Use it from Python from claude_real_video import process r = process ( "https://youtu.be/..." , "out" , lang = "en" ) print ( r . frame_count , r . transcript_path ) How it works Fetch — yt-dlp for URLs (optional cookies), or copy a local file. Extract — one chronological ffmpeg select pass grabs every scene change plus a density floor (at least one frame every --fps-floor seconds), so fast cuts and slow screencasts are both covered. Dedup — real pixel difference (downscaled RGB, not a perceptual hash — hashes go blind on flat colours and equal-luma hue changes) against a sliding window of the last --dedup-window kept frames, so an A-B-A cutaway doesn't re-send a shot the model has already seen. --report writes report.html showing every keep/drop decision with its diff %, for tuning. Text — if the video already has subtitles (a sidecar .srt / .vtt next to a local file, or an embedded subtitle track), those are used as the transcript — faster and more accurate than re-transcribing. Only when there are no subtitles does it fall back to Whisper on the audio (skipped cleanly if there's no audio). Audio (optional, --keep-audio ) — save the full original soundtrack ( audio.m4a : music + speech + effects, copied losslessly when possible). The transcript only has the words ; the audio file lets a model that can listen (Gemini, GPT-4o, …) actually hear the music and tone. Manifest — MANIFEST.txt summarises everything for the model. So the model can see (key frames), read (transcript) and — with --keep-audio — hear (full soundtrack) the video. The transcript is plain text any model can read; the tool doesn't burn subtitles into the video — burning is a presentation choice, not something needed to make a video AI-readable. Notes Only download content you have the right to. The --cookies option is for your own, authorised access — don't ship credentials in a repo. Re-running overwrites the output directory. License MIT