OpenSource-Hub

claude-video

CLI 도구

bradautomates/claude-video

Claude가 모든 동영상을 보고 분석할 수 있도록 합니다.

개요

Claude와 통합된 명령줄 도구로, 동영상을 다운로드하고 프레임을 추출하며 오디오를 전사할 수 있습니다. YouTube 등 다양한 소스를 지원하며 완전한 동영상 분석 워크플로를 제공합니다. 사용자는 동영상 콘텐츠에 관한 질문을 하고 시각적 및 청각적 정보를 기반으로 한 답변을 얻을 수 있습니다.

README 미리보기

# /watch\n\n**Give Claude the ability to watch any video.**\n\nClaude Code (recommended — auto-updates via marketplace):\n```\n/plugin marketplace add bradautomates/claude-video\n/plugin install watch@claude-video\n```\n\nCodex, Cursor, Copilot, Gemini CLI, or any of 50+ [Agent Skills](https://agentskills.io) hosts:\n```bash\nnpx skills add bradautomates/claude-video -g\n```\n(`-g` installs globally for your user, available across all projects. Drop it to scope per-project.)\n\nMore install options (claude.ai web, manual) in the [Install](#install) section below.\n\nZero config to start — `yt-dlp` and `ffmpeg` install on first run via `brew` on macOS (Linux/Windows print exact commands). Captions cover most public videos for free. Whisper API key is only needed when a video has no captions.\n\n---\n\nClaude can read a webpage, run a script, browse a repo. What it can't do, out of the box, is *watch a video*. You paste a YouTube link and it has to either guess from the title or pull a transcript that's missing 90% of what's on screen.\n\nWith Claude Video `/watch` you can paste a URL or a local path, ask a question, and Claude fetches captions first, downloads only what it needs, extracts frames (scene-aware, or fast keyframes at `efficient` detail), pulls a timestamped transcript (free captions when available, Whisper API as fallback), and `Read`s every frame as an image. By the time it answers, it has *seen* the video and *heard* the audio.\n\n```\n/watch https://youtu.be/dQw4w9WgXcQ what happens at the 30 second mark?\n```\n\n## What people actually use it for\n\n**Analyze someone else's content.** `/watch https://youtu.be/ what hook did they open with?` Claude looks at the first frames, reads the opening transcript, breaks down the structure. Same for ad creative, competitor launches, podcast intros, anything where the *how* matters as much as the *what*.\n\n**Diagnose a bug from a video.** Someone sends you a screen recording of something broken. `/watch bug-rep

FAQ (5)

문제 해결
Windows에서 Python CLI를 실행할 때 발생하는 "UnicodeEncodeError: 'charmap' codec can't encode character '→'" 오류는 어떻게 해결하나요?

이 문제는 보고서가 →, …, — 같은 문자를 출력하는 반면, Windows 콘솔은 UTF-8 대신 cp1252를 사용하는 경우가 많기 때문에 발생합니다.

임시 사용자 해결 방법:

setx PYTHONUTF8 1

실행한 후 터미널을 닫고 다시 여세요. 현재 PowerShell 세션에만 적용하려면 다음을 사용하세요:

$env:PYTHONUTF8 = "1"

영구적인 애플리케이션 수정: 프로그램 시작 시, 보고서 출력이 이루어지기 전에 stdout과 stderr를 UTF-8로 재설정하세요:

import sys

for stream in (sys.stdout, sys.stderr):
    try:
        stream.reconfigure(encoding="utf-8")
    except (AttributeError, ValueError):
        pass

이 헬퍼를 watch.py, frames.py, whisper.py, transcribe.py, setup.py, download.py 같은 모든 진입점에서 호출하세요. TextIOWrapper.reconfigure()는 Python 3.7+부터 사용할 수 있으며, 해당 프로젝트는 Python 3.10+를 필요로 합니다. 다른 보고서 출력에서도 동일한 cp1252 오류를 유발할 수 있으므로, 비 ASCII 문자를 단순히 제거하지 마세요.

원본 Issue #61
문제 해결
Claude Code에서 watch@claude-video를 설치한 후 "Unknown command: /watch" 오류를 어떻게 해결하나요?

슬래시 명령이 실패하는 이유는 Claude Code 2.1.126이 allowed-tools에 대한 YAML 인라인 리스트 형식을 파싱하지 못하기 때문입니다. ~/.claude/plugins/cache/claude-video/watch/0.1.2/commands/watch.md를 편집하여 다음을:

allowed-tools: [Bash, Read, AskUserQuestion]

다음과 같이 바꾸세요:

allowed-tools: Bash, Read, AskUserQuestion

다음 명령으로 직접 적용할 수 있습니다:

sed -i '' 's/^allowed-tools: \[Bash, Read, AskUserQuestion\]$/allowed-tools: Bash, Read, AskUserQuestion/' ~/.claude/plugins/cache/claude-video/watch/0.1.2/commands/watch.md

Claude Code를 완전히 종료하고 다시 연 다음 /watch를 실행하거나 자동 완성에서 /watch:watch를 선택하세요. 영구적인 해결 방법은 플러그인 유지 관리자가 main의 commands/watch.md에서 이 한 줄 변경을 적용하는 것이며, frontmatter 유효성 검사를 추가하면 회귀를 방지할 수 있습니다.

원본 Issue #6
문제 해결
Windows에서 /watch 보고서에 동영상 제목과 업로더가 누락되는 이유는 무엇인가요?

watch v0.1.3 이상으로 업그레이드하세요. 이 버그는 scripts/download.py가 encoding="utf-8" 없이 Path.read_text()를 호출하기 때문에 발생합니다. Windows에서는 Python이 cp1252를 사용하므로, yt-dlp의 video.info.json에 포함된 비ASCII 문자가 UnicodeDecodeError를 일으킵니다. 이후 광범위한 except가 URL만 남긴 채 조용히 넘어가므로 제목과 업로더가 누락됩니다. 이전 버전을 패치하려면 다음을:

raw = json.loads(info_path.read_text())

다음과 같이 변경하세요:

raw = json.loads(info_path.read_text(encoding="utf-8"))

또한 파싱 실패를 조용히 무시하지 말고 로그로 남기세요. 예를 들면:

except Exception as exc:
    print(f"[watch] info.json parse failed: {exc}", file=sys.stderr)
    info = {"url": url}

임시 해결 방법으로, 출력 디렉터리에서 video.info.json을 명시적으로 UTF-8로 다시 읽으세요. 이모지나 기타 비ASCII 제목 문자로 인해 Windows 콘솔 출력이 실패하는 경우, 명령을 실행하기 전에 PYTHONUTF8=1 또는 PYTHONIOENCODING=utf-8을 설정하세요.

원본 Issue #4
문제 해결
Python subprocess에서 사용자가 제공한 URL을 전달할 때 yt-dlp 옵션 인젝션을 어떻게 방지할 수 있나요?

yt-dlp argv 배열에서 URL 바로 앞에 "--"를 삽입하여 파서가 옵션 처리를 중단하도록 하세요. 또한 URL을 검증하고 -로 시작하는 입력은 거부하세요.

cmd = [
    "yt-dlp",
    "-N", "8",
    "-o", output_template,
    "--",
    url,
]
subprocess.run(cmd, check=True)

심층 방어(defense in depth)를 위해 URL 검증을 강화하세요:

from urllib.parse import urlparse

def is_url(source: str) -> bool:
    if source.startswith("-"):
        return False
    parsed = urlparse(source)
    return parsed.scheme in ("http", "https") and bool(parsed.netloc)

ffmpeg/ffprobe의 경우, 이 도구들은 --를 옵션 종료로 처리하지 않으므로 --에 의존하지 마세요. 대신 Path.resolve()를 사용하여 사용자가 제어하는 경로를 절대 경로로 변환하세요. 이 문제는 claude-video v0.1.3/커밋 c333c22에서 수정되었습니다.

원본 Issue #2
문제 해결
claude-video를 사용하여 자동 생성된 비디오 트랜스크립트에서 잘못 인식된 단어를 어떻게 수정할 수 있나요?

현재 수정된 VTT/SRT 파일을 만들어 주는 원클릭 옵션은 없지만, 2단계 워크플로우로 해결할 수 있습니다:

1. /watch <url> --detail transcript를 실행하고 Claude에게 타임스탬프가 포함된 원본 트랜스크립트와 함께 고유명사, 동음이의어, 갑작스러운 맥락 전환 같은 의심스러운 구간을 요청하세요. 이미 자막이 있는 URL의 경우, 이 도구는 yt-dlp로 가져온 VTT를 사용하며 비디오 다운로드를 건너뜁니다.
2. 비디오를 다운로드하고 의심스러운 타임스탬프만 다시 확인하세요:

/watch <local-video> --detail transcript --timestamps 1:23,4:56,7:08 --no-whisper

Claude는 해당 타임스탬프에서만 프레임을 추출하여 트랜스크립트와 비교한 뒤, 맥락에 맞는 수정 사항을 제안할 수 있습니다. 제안된 수정 사항은 VTT/SRT 파일에 수동으로 적용하세요.

원본 Issue #66