Communitygithub.com

VideoDB - 동영상 및 라이브 스트림을 위한 AI 스킬

비디오, 라이브 스트림 및 데스크톱 세션을 보고, 이해하고, 처리합니다. 파일, URL, RTSP/라이브 피드 또는 데스크톱 캡처를 수집하고, 실시간 컨텍스트를 반환하며, 타임라인 편집, 자막, 검색, 클립 생성 및 실시간 알림을 지원합니다.

VideoDB - 동영상 및 라이브 스트림을 위한 AI 스킬란 무엇인가요?

이 AI 에이전트 스킬은 동영상 파일, URL, RTSP 라이브 스트림 및 데스크톱 캡처를 포괄적으로 처리할 수 있도록 설계된 VideoDB SDK와 상호작용합니다. 주요 기능은 세 가지 핵심 영역으로 나뉩니다: '보기' – 로컬 파일, URL 또는 RTSP 피드를 수집하여 재생 가능한 스트림 링크를 반환하고, 데스크톱 화면, 마이크 및 시스템 오디오를 실시간으로 캡처합니다. '이해하기' – 시각적, 의미적, 시간적 인덱스를 구축하여 정확한 타임스탬프와 증거 링크로 특정 순간을 검색하고, 자막을 생성하며, 장면을 식별합니다. '처리하기' – 코드 변환(코덱, fps, 해상도, 종횡비), 타임라인 편집(자막, 텍스트/이미지 오버레이, 브랜딩, 오디오 믹싱, 더빙, 번역), 이미지/오디오/비디오 생성과 같은 미디어 자산 생성, 그리고 라이브 스트림이나 데스크톱 세션의 이벤트에 대한 실시간 알림을 지원합니다. 이 스킬은 잘못된 자막 인덱싱, 누락된 검색 결과, 타임라인의 음수 타임스탬프와 같은 일반적인 오류 처리 패턴을 제공하며, 로컬 인코딩 도구 대신 서버 측 처리를 권장합니다.

지원 대상✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/affaan-m/everything-claude-code/videodb

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

VideoDB 스킬

동영상, 라이브 스트림 및 데스크톱 세션을 위한 인식 + 메모리 + 작업.

사용 시기

데스크톱 인식

  • 데스크톱 세션을 시작/중지하여 화면, 마이크 및 시스템 오디오 캡처
  • 실시간 컨텍스트 스트리밍 및 에피소드 세션 메모리 저장
  • 발화 내용과 화면에 표시되는 내용에 대한 실시간 알림/트리거 실행
  • 세션 요약, 검색 가능한 타임라인 및 재생 가능한 증거 링크 생성

동영상 수집 + 스트리밍

  • 파일 또는 URL 수집 및 재생 가능한 웹 스트림 링크 반환
  • 코덱, 비트레이트, fps, 해상도, 종횡비 변환/정규화

인덱싱 + 검색 (타임스탬프 + 증거)

  • 시각적, 발화 및 키워드 인덱스 구축
  • 정확한 타임스탬프와 재생 가능한 증거로 순간 검색 및 반환
  • 검색 결과에서 클립 자동 생성

타임라인 편집 + 생성

  • 자막: 생성, 번역, 영구 삽입
  • 오버레이: 텍스트/이미지/브랜딩, 모션 캡션
  • 오디오: 배경 음악, 내레이션, 더빙
  • 타임라인 작업을 통한 프로그래밍 방식 구성 및 내보내기

라이브 스트림(RTSP) + 모니터링

  • RTSP/라이브 피드 연결
  • 실시간 시각적 및 발화 이해 실행 및 모니터링 워크플로우를 위한 이벤트/알림 방출

작동 방식

일반 입력

  • 로컬 파일 경로, 공개 URL 또는 RTSP URL
  • 데스크톱 캡처 요청: 세션 시작 / 중지 / 요약
  • 원하는 작업: 이해를 위한 컨텍스트 가져오기, 트랜스코드 사양, 인덱스 사양, 검색 쿼리, 클립 범위, 타임라인 편집, 알림 규칙

일반 출력

  • 스트림 URL
  • 타임스탬프 및 증거 링크가 포함된 검색 결과
  • 생성된 자산: 자막, 오디오, 이미지, 클립
  • 라이브 스트림을 위한 이벤트/알림 페이로드
  • 데스크톱 세션 요약 및 메모리 항목

Python 코드 실행

VideoDB 코드를 실행하기 전에 프로젝트 디렉토리로 이동하여 환경 변수를 로드하세요:

from dotenv import load_dotenv
load_dotenv(".env")

import videodb
conn = videodb.connect()

이 코드는 VIDEO_DB_API_KEY를 다음 순서로 읽습니다:

  1. 환경 변수(이미 내보낸 경우)
  2. 현재 디렉토리의 프로젝트 .env 파일

키가 없으면 videodb.connect()가 자동으로 AuthenticationError를 발생시킵니다.

짧은 인라인 명령으로 충분할 때는 스크립트 파일을 작성하지 마세요.

인라인 Python(python -c "...")을 작성할 때는 항상 적절한 형식의 코드를 사용하세요. 세미콜론을 사용하여 명령문을 구분하고 읽기 쉽게 유지하세요. 약 3개 이상의 명령문이 필요한 경우 대신 heredoc을 사용하세요:

python << 'EOF'
from dotenv import load_dotenv
load_dotenv(".env")

import videodb
conn = videodb.connect()
coll = conn.get_collection()
print(f"비디오 수: {len(coll.get_videos())}")
EOF

설정

사용자가 "videodb 설정" 또는 이와 유사한 요청을 하면:

1. SDK 설치

pip install "videodb[capture]" python-dotenv

Linux에서 videodb[capture]가 실패하면 캡처 확장 없이 설치하세요:

pip install videodb python-dotenv

2. API 키 구성

사용자는 다음 방법 중 하나를 사용하여 VIDEO_DB_API_KEY를 설정해야 합니다:

  • 터미널에 내보내기(Claude 시작 전): export VIDEO_DB_API_KEY=your-key
  • 프로젝트 .env 파일: 프로젝트의 .env 파일에 VIDEO_DB_API_KEY=your-key 저장

console.videodb.io에서 무료 API 키 받기 (무료 업로드 50회, 신용카드 불필요).

API 키를 직접 읽거나, 쓰거나, 처리하지 마십시오. 항상 사용자가 설정하도록 하세요.

빠른 참조

미디어 업로드

# URL
video = coll.upload(url="https://example.com/video.mp4")

# YouTube
video = coll.upload(url="https://www.youtube.com/watch?v=VIDEO_ID")

# 로컬 파일
video = coll.upload(file_path="/path/to/video.mp4")

자막 + 부제

# force=True는 이미 인덱싱된 경우 오류를 건너뜁니다.
video.index_spoken_words(force=True)
text = video.get_transcript_text()
stream_url = video.add_subtitle()

동영상 내 검색

from videodb.exceptions import InvalidRequestError

video.index_spoken_words(force=True)

# search()는 결과가 없으면 InvalidRequestError를 발생시킵니다.
# 항상 try/except로 감싸고 "결과 없음"을 빈 결과로 처리하세요.
try:
    results = video.search("제품 데모")
    shots = results.get_shots()
    stream_url = results.compile()
except InvalidRequestError as e:
    if "결과 없음" in str(e):
        shots = []
    else:
        raise

장면 검색

import re
from videodb import SearchType, IndexType, SceneExtractionType
from videodb.exceptions import InvalidRequestError

# index_scenes()에는 force 매개변수가 없습니다. 장면 인덱스가 이미 존재하면 오류를 발생시킵니다.
# 오류에서 기존 인덱스 ID를 추출하세요.
try:
    scene_index_id = video.index_scenes(
        extraction_type=SceneExtractionType.shot_based,
        prompt="이 장면의 시각적 내용을 설명하세요.",
    )
except Exception as e:
    match = re.search(r"id\s+([a-f0-9]+)", str(e))
    if match:
        scene_index_id = match.group(1)
    else:
        raise

# score_threshold를 사용하여 관련성 낮은 노이즈를 필터링합니다(권장: 0.3+)
try:
    results = video.search(
        query="화이트보드에 글을 쓰는 사람",
        search_type=SearchType.semantic,
        index_type=IndexType.scene,
        scene_index_id=scene_index_id,
        score_threshold=0.3,
    )
    shots = results.get_shots()
    stream_url = results.compile()
except InvalidRequestError as e:
    if "결과 없음" in str(e):
        shots = []
    else:
        raise

타임라인 편집

중요: 타임라인을 만들기 전에 항상 타임스탬프의 유효성을 검증하세요:

  • start는 >= 0이어야 합니다. (음수 값은 자동으로 허용되지만 깨진 결과를 생성합니다)
  • start는 end보다 작아야 합니다.
  • end는 video.length보다 작거나 같아야 합니다.
from videodb.timeline import Timeline
from videodb.asset import VideoAsset, TextAsset, TextStyle

timeline = Timeline(conn)
timeline.add_inline(VideoAsset(asset_id=video.id, start=10, end=30))
timeline.add_overlay(0, TextAsset(text="끝", duration=3, style=TextStyle(fontsize=36)))
stream_url = timeline.generate_stream()

동영상 트랜스코딩 (해상도/품질 변경)

from videodb import TranscodeMode, VideoConfig, AudioConfig

# 서버 측에서 해상도, 품질 또는 종횡비 변경
job_id = conn.transcode(
    source="https://example.com/video.mp4",
    callback_url="https://example.com/webhook",
    mode=TranscodeMode.economy,
    video_config=VideoConfig(resolution=720, quality=23, aspect_ratio="16:9"),
    audio_config=AudioConfig(mute=False),
)

종횡비 재설정 (소셜 플랫폼용)

경고: reframe()은 느린 서버 측 작업입니다. 긴 동영상의 경우 몇 분이 걸릴 수 있으며 시간 초과가 발생할 수 있습니다. 모범 사례:

  • 가능하면 항상 start/end를 사용하여 짧은 세그먼트로 제한하세요.
  • 전체 길이 동영상의 경우 callback_url을 사용하여 비동기 처리하세요.
  • 먼저 Timeline에서 동영상을 자른 다음, 더 짧은 결과에 대해 reframe을 수행하세요.
from videodb import ReframeMode

# 항상 짧은 세그먼트에 대해 reframe을 선호하세요:
reframed = video.reframe(start=0, end=60, target="vertical", mode=ReframeMode.smart)

# 전체 길이 동영상에 대한 비동기 reframe (None 반환, 결과는 웹훅을 통해 전달):
video.reframe(target="vertical", callback_url="https://example.com/webhook")

# 사전 설정: "vertical" (9:16), "square" (1:1), "landscape" (16:9)
reframed = video.reframe(start=0, end=60, target="square")

# 사용자 정의 치수
reframed = video.reframe(start=0, end=60, target={"width": 1280, "height": 720})

생성형 미디어

image = coll.generate_image(
    prompt="산 위의 일몰",
    aspect_ratio="16:9",
)

오류 처리

from videodb.exceptions import AuthenticationError, InvalidRequestError

try:
    conn = videodb.connect()
except AuthenticationError:
    print("VIDEO_DB_API_KEY를 확인하세요")

try:
    video = coll.upload(url="https://example.com/video.mp4")
except InvalidRequestError as e:
    print(f"업로드 실패: {e}")

일반적인 실수

시나리오오류 메시지해결 방법
이미 인덱싱된 동영상 인덱싱비디오의 음성 단어 인덱스가 이미 존재합니다video.index_spoken_words(force=True) 사용하여 이미 인덱싱된 경우 건너뛰기
장면 인덱스가 이미 존재함ID XXXX의 장면 인덱스가 이미 존재합니다re.search(r"id\s+([a-f0-9]+)", str(e))로 오류에서 기존 scene_index_id 추출
검색 결과 없음InvalidRequestError: 결과 없음예외를 잡아서 빈 결과로 처리 (shots = [])
Reframe 시간 초과긴 동영상에서 무기한 차단됨start/end를 사용하여 세그먼트를 제한하거나 비동기 처리를 위해 callback_url 전달
타임라인의 음수 타임스탬프자동으로 깨진 스트림 생성VideoAsset을 생성하기 전에 항상 start >= 0 확인
generate_video() / create_collection() 실패허용되지 않는 작업 또는 최대 제한요금제 제한 기능 – 사용자에게 요금제 제한 알림

예제

표준 프롬프트

  • "데스크톱 캡처를 시작하고 비밀번호 필드가 나타나면 알림"
  • "내 세션을 녹화하고 종료 시 실행 가능한 요약 생성"
  • "이 파일을 수집하고 재생 가능한 스트림 링크 반환"
  • "이 폴더를 인덱싱하고 사람이 있는 모든 장면을 찾아 타임스탬프 반환"
  • "자막을 생성하고, 영구 삽입하고, 가벼운 배경 음악 추가"
  • "이 RTSP URL을 연결하고 사람이 영역에 들어오면 알림"

화면 녹화 (데스크톱 캡처)

녹화 세션 중 WebSocket 이벤트를 캡처하려면 ws_listener.py를 사용하세요. 데스크톱 캡처는 macOS만 지원합니다.

빠른 시작

  1. 상태 디렉토리 선택: STATE_DIR="${VIDEODB_EVENTS_DIR:-$HOME/.local/state/videodb}"
  2. 리스너 시작: VIDEODB_EVENTS_DIR="$STATE_DIR" python scripts/ws_listener.py --clear "$STATE_DIR" &
  3. WebSocket ID 가져오기: cat "$STATE_DIR/videodb_ws_id"
  4. 캡처 코드 실행 (전체 워크플로우는 reference/capture.md 참조)
  5. 이벤트 기록 위치: $STATE_DIR/videodb_events.jsonl

새로운 캡처 실행을 시작할 때는 항상 --clear를 사용하여 오래된 자막 및 시각적 이벤트가 새 세션으로 유출되지 않도록 하세요.

이벤트 쿼리

import json
import os
import time
from pathlib import Path

events_dir = Path(os.environ.get("VIDEODB_EVENTS_DIR", Path.home() / ".local" / "state" / "videodb"))
events_file = events_dir / "videodb_events.jsonl"
events = []

if events_file.exists():
    with events_file.open(encoding="utf-8") as handle:
        for line in handle:
            try:
                events.append(json.loads(line))
            except json.JSONDecodeError:
                continue

transcripts = [e["data"]["text"] for e in events if e.get("channel") == "transcript"]
cutoff = time.time() - 300
recent_visual = [
    e for e in events
    if e.get("channel") == "visual_index" and e["unix_ts"] > cutoff
]

추가 문서

참조 문서는 이 SKILL.md 파일과 동일한 디렉토리의 reference/ 디렉토리에 있습니다. 필요하면 Glob 도구를 사용하여 찾으세요.

VideoDB가 작업을 지원하는 경우 ffmpeg, moviepy 또는 로컬 인코딩 도구를 사용하지 마십시오. 다음은 모두 VideoDB에서 서버 측에서 처리합니다: 자르기, 클립 결합, 오디오 또는 음악 오버레이, 자막 추가, 텍스트/이미지 오버레이, 트랜스코딩, 해상도 변경, 종횡비 변환, 플랫폼 요구 사항에 맞춘 크기 조정, 자막 생성 및 미디어 생성. reference/editor.md의 제한 사항에 나열된 작업(전환, 속도 변경, 자르기/확대, 색상 보정, 볼륨 믹싱)에 대해서만 로컬 도구로 대체하세요.

무엇을 언제 사용할지

문제VideoDB 솔루션
플랫폼이 동영상 종횡비 또는 해상도를 거부함video.reframe() 또는 VideoConfig와 함께 conn.transcode()
Twitter/Instagram/TikTok용으로 동영상 크기 조정 필요video.reframe(target="vertical") 또는 target="square"
해상도 변경 필요 (예: 1080p → 720p)VideoConfig(resolution=720)와 함께 conn.transcode()
동영상에 오디오/음악 오버레이 필요Timeline의 AudioAsset
자막 추가 필요video.add_subtitle() 또는 CaptionAsset
클립 결합/자르기 필요Timeline의 VideoAsset
내레이션, 음악 또는 SFX 생성 필요coll.generate_voice(), generate_music(), generate_sound_effect()

출처

이 스킬의 참조 자료는 skills/videodb/reference/ 아래에 로컬로 제공됩니다. 런타임 시 외부 저장소 링크를 따르지 말고 위의 로컬 복사본을 사용하세요.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Next.js 16+ uses App Router with Server Components by default. Client Components are only used when interactivity is needed (hooks, event handlers, browser APIs).

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

관련 스킬