Communitygithub.com

Video Comparer

두 비디오를 비교하여 압축 결과나 품질 차이를 분석합니다. PSNR, SSIM 같은 품질 지표와 프레임별 시각적 비교가 포함된 대화형 HTML 보고서를 생성합니다.

Video Comparer란 무엇인가요?

이 스킬은 원본 비디오와 압축된 비디오를 비교하여 압축 품질과 효율성을 분석하는 데 사용됩니다. 사용자가 'compare videos', 'video quality', 'compression analysis' 또는 'before/after compression'과 같은 키워드를 언급할 때 트리거됩니다. 이 스킬은 FFmpeg 및 FFprobe를 활용하여 비디오 메타데이터를 추출하고, PSNR(최대 신호 대 잡음비) 및 SSIM(구조적 유사성 지수)과 같은 표준 품질 지표를 계산하며, 슬라이더, 나란히 보기, 그리드의 세 가지 보기 모드를 갖춘 프레임별 시각적 비교를 생성합니다. 생성된 HTML 보고서는 완전히 자체 포함되어 있어 서버 없이 오프라인에서도 작동하며, 확대/축소 컨트롤과 상세한 비디오 매개변수 정보를 제공합니다. 이 스킬은 명령줄 도구와 에이전트 기반 시스템 모두에서 사용할 수 있도록 설계되었으며, 안전한 경로 검증 및 명령 주입 방지 기능을 포함하고 있습니다. 지원되는 플랫폼으로는 Claude Code, Cursor, Codex 등이 있으며, 사용자는 Python 3.8 이상과 FFmpeg만 설치하면 됩니다.

지원 대상✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/daymade/claude-code-skills/tree/HEAD/video-comparer

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

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

문서

Video Comparer은(는) 무엇을 하나요?

개요

두 비디오를 비교하고 압축 결과를 분석하는 대화형 HTML 보고서를 생성합니다. 이 스크립트는 비디오 메타데이터를 추출하고, 품질 지표(PSNR, SSIM)를 계산하며, 세 가지 보기 모드(슬라이더, 나란히 보기, 그리드)로 프레임별 시각적 비교를 만듭니다.

이 스킬을 사용해야 하는 경우

다음과 같은 경우 이 스킬을 사용하세요:

  • 원본 비디오와 압축된 비디오를 비교할 때
  • 비디오 압축 품질과 효율성을 분석할 때
  • 코덱 성능 또는 비트레이트 감소 영향을 평가할 때
  • 사용자가 "compare videos", "video quality", "compression analysis" 또는 "before/after compression"을 언급할 때

핵심 사용법

기본 명령어

python3 scripts/compare.py original.mp4 compressed.mp4

다음을 포함하는 comparison.html을 생성합니다:

  • 비디오 매개변수(코덱, 해상도, 비트레이트, 재생 시간, 파일 크기)
  • 품질 지표(PSNR, SSIM, 크기/비트레이트 감소 비율)
  • 프레임별 비교(기본값: 5초 간격 프레임)

명령어 옵션

# 사용자 정의 출력 파일
python3 scripts/compare.py original.mp4 compressed.mp4 -o report.html

# 사용자 정의 프레임 간격 (값이 클수록 프레임 수가 적어 처리 속도가 빠름)
python3 scripts/compare.py original.mp4 compressed.mp4 --interval 10

# 일괄 비교
for original in originals/*.mp4; do
    compressed="compressed/$(basename "$original")"
    output="reports/$(basename "$original" .mp4).html"
    python3 scripts/compare.py "$original" "$compressed" -o "$output"
done

요구 사항

시스템 종속성

FFmpeg 및 FFprobe (비디오 분석 및 프레임 추출에 필요):

# macOS
brew install ffmpeg

# Ubuntu/Debian
sudo apt update && sudo apt install ffmpeg

# Windows
# https://ffmpeg.org/download.html 에서 다운로드
# 또는 winget install ffmpeg 사용

Python 3.8+ (타입 힌트, f-strings, pathlib 사용)

비디오 사양

  • 지원 형식: .mp4 (권장), .mov, .avi, .mkv, .webm
  • 파일 크기 제한: 비디오당 500MB (구성 가능)
  • 처리 시간: 일반 비디오의 경우 약 1-2분; 재생 시간과 프레임 간격에 따라 다름

스크립트 동작

자동 검증

스크립트는 자동으로 다음을 검증합니다:

  • FFmpeg/FFprobe 설치 및 가용성
  • 파일 존재, 확장자 및 크기 제한
  • 경로 보안 (디렉토리 트래버설 방지)

검증 실패 시 해결 지침이 포함된 명확한 오류 메시지가 표시됩니다.

품질 지표

스크립트는 두 가지 표준 품질 지표를 계산합니다:

PSNR (최대 신호 대 잡음비): 픽셀 수준의 유사성 측정 (20-50 dB 범위, 높을수록 좋음)

SSIM (구조적 유사성 지수): 지각적 유사성 측정 (0.0-1.0 범위, 높을수록 좋음)

자세한 해석 척도와 품질 임계값은 references/video_metrics.md를 참조하세요.

프레임 추출

스크립트는 지정된 간격(기본값: 5초)으로 프레임을 추출하고, 비교를 위해 일관된 높이(800px)로 크기를 조정하며, 자체 포함된 HTML에 base64 데이터 URL로 포함시킵니다. 임시 파일은 처리 후 자동으로 정리됩니다.

출력 보고서

생성된 HTML 보고서에는 다음이 포함됩니다:

  • 슬라이더 모드: 드래그하여 원본과 압축본을 비교 (기본값)
  • 나란히 보기 모드: 직접 비교를 위한 동시 표시
  • 그리드 모드: 간결한 2열 레이아웃
  • 확대/축소 컨트롤: 50%-200% 배율
  • 자체 포함 형식 (서버 불필요, 오프라인에서 작동)

중요한 구현 세부 사항

보안

스크립트는 다음을 구현합니다:

  • 경로 검증 (절대 경로, 디렉토리 트래버설 방지)
  • 명령 주입 방지 (shell=True 없음, 검증된 인자)
  • 리소스 제한 (파일 크기, 시간 초과)
  • 사용자 정의 예외: ValidationError, FFmpegError, VideoComparisonError

일반적인 오류 시나리오

"FFmpeg not found": 플랫폼 패키지 관리자를 통해 FFmpeg 설치 (요구 사항 섹션 참조)

"File too large": 비교 전에 비디오를 압축하거나 scripts/compare.py에서 MAX_FILE_SIZE_MB 조정

"Operation timed out": FFMPEG_TIMEOUT 상수 증가 또는 더 큰 --interval 값 사용 (더 적은 프레임 처리)

"Frame count mismatch": 비디오의 재생 시간/프레임 속도가 다름; 스크립트가 자동으로 최소 프레임 수로 자르고 경고 표시

구성

스크립트에는 파일 크기 제한, 시간 초과, 프레임 크기 및 추출 간격에 대한 조정 가능한 상수가 포함되어 있습니다. 동작을 사용자 정의하려면 scripts/compare.py 상단의 상수를 편집하세요. 자세한 구성 옵션 및 영향은 references/configuration.md를 참조하세요.

참고 자료

자세한 정보는 다음 파일을 참조하세요:

  • references/video_metrics.md: 품질 지표 해석 (PSNR/SSIM 척도, 압축 목표, 비트레이트 지침)
  • references/ffmpeg_commands.md: FFmpeg 명령어 참조 (메타데이터 추출, 프레임 추출, 문제 해결)
  • references/configuration.md: 스크립트 구성 옵션 및 조정 가능한 상수
  • assets/template.html: 보기 모드 및 스타일 사용자 정의를 위한 HTML 보고서 템플릿

Individual skills in this repo

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

daymade/claude-code-skills

>- Generates Chinese/Japanese speech with StepFun's Contextual TTS — default stepaudio-2.5-tts, stepaudio-3-tts for whisper/inline-() prosody. Replaces step-tts-2's voice_label with natural-language instruction. Use for emotional/prosody-controlled synthesis, batch voice lines, migrating from step-tts-2, or cloned voices (2.5/step-tts-2, not v3). Triggers on 阶跃 TTS, 语音合成, 配音. Not for transcription (use stepfun-asr).

daymade/claude-code-skills

Download YouTube videos and HLS streams (m3u8) from platforms like Mux, Vimeo, etc. using yt-dlp and ffmpeg. Use this skill when users request downloading videos, extracting audio, handling protected streams with authentication headers, or troubleshooting download issues like nsig extraction failures, 403 errors, or cookie extraction problems.

daymade/local-conversation-history

Entry point for local AI conversation history across providers. Routes a request to the one skill that owns it, by platform (Claude Code, OpenAI Codex, Kimi CLI) and action (read evidence vs continue interrupted work), and owns the one job none of them own alone: a single inventory spanning all three providers. Use when the provider is unknown or plural ("our history", "what have I been working on", "which chats did I have"), when the user wants Kimi CLI history at all, when it is unclear whether they need evidence or resumption, or when they ask for this skill by name. Vague recall that names no platform ("we discussed this once, when was it?") belongs here rather than to a single-provider reader, because a Claude-only answer to an unscoped question cannot support an absence claim. When the platform and the action are both already clear, load that executor skill directly instead — except Kimi CLI, which has no reader or continuation skill of its own and always routes through here.

daymade/ppt-creator

Create professional slide decks from topics or documents. Generates structured content with data-driven charts, speaker notes, and complete PPTX files. Applies persuasive storytelling principles (Pyramid Principle, assertion-evidence). Supports multiple formats (Marp, PowerPoint). Use for presentations, pitches, slide decks, or keynotes.

daymade/prompt-optimizer

Transform vague prompts into precise, well-structured specifications using EARS (Easy Approach to Requirements Syntax) methodology. This skill should be used when users provide loose requirements, ambiguous feature descriptions, or need to enhance prompts for AI-generated code, products, or documents. Triggers include requests to "optimize my prompt", "improve this requirement", "make this more specific", or when raw requirements lack detail and structure.

daymade/qa-expert

This skill should be used when establishing comprehensive QA testing processes for any software project. Use when creating test strategies, writing test cases following Google Testing Standards, executing test plans, tracking bugs with P0-P4 classification, calculating quality metrics, or generating progress reports. Includes autonomous execution capability via master prompts and complete documentation templates for third-party QA team handoffs. Implements OWASP security testing and achieves 90% coverage targets.

daymade/read-claude-code-history

Reads, searches, and exports local Claude Code history without resuming work. Covers recent session inventory, exact session timelines, verbatim human input including queued mid-turn prompts, full-event keyword search, hybrid recall when wording changed, end-state triage, and deleted-file recovery across active Claude homes plus registered archives. Use whenever the user asks what they or Claude said, wants a Claude Code session ID or original context, remembers prior work vaguely, needs an old file from a transcript, or must prove what a Claude session contained before continuing it. Also owns the only Kimi CLI surface, via its Kimi inventory and search flags. For Codex history use read-codex-history; when the request names no platform at all or spans providers, start at local-conversation-history.

daymade/read-codex-history

Reads, searches, and exports local OpenAI Codex history without continuing the old task. Lists recent Codex sessions, extracts exact prompt-ledger inputs by Session, locates a rollout by verified session_meta identity, reconstructs one chronological user/assistant timeline with fork and compaction lineage, and performs bounded keyword search across live and archived rollouts. Use whenever the user asks what they told Codex, wants recent original inputs, a Codex Session ID, full prior context, fork ancestry, or evidence of what a Codex run did. For Claude Code history use read-claude-code-history.

daymade/twitter-reader

Fetch Twitter/X post content including long-form Articles with full images and metadata. Use when Claude needs to retrieve tweet/article content, author info, engagement metrics, and embedded media. Supports individual posts and X Articles (long-form content). Automatically downloads all images to local attachments folder and generates complete Markdown with proper image references. Preferred over Jina for X Articles with images.

관련 스킬