Video Comparer banner
daymade daymade

Video Comparer

Development community Intermediate

Description

A professional video comparison tool that analyzes compression quality and generates interactive HTML reports. Compare original vs compressed videos with detailed metrics (PSNR, SSIM) and frame-by-frame visual comparisons.

Installation

Installs to ~/.claude/skills/video-comparer/

Terminal
git clone --depth 1 https://github.com/daymade/claude-code-skills /tmp/claude-code-skills \ && mkdir -p ~/.claude/skills \ && cp -r /tmp/claude-code-skills/video-comparer ~/.claude/skills/video-comparer

Clones the whole repository, because a skill folder can carry scripts and resources beside its SKILL.md.

Repository README

This is the README for daymade/claude-code-skills, shared by 5 entries in this directory. It describes the repository, not this entry specifically.

Video Comparer

A professional video comparison tool that analyzes compression quality and generates interactive HTML reports. Compare original vs compressed videos with detailed metrics (PSNR, SSIM) and frame-by-frame visual comparisons.

Features

🎯 Video Analysis

  • Metadata Extraction: Codec, resolution, frame rate, bitrate, duration, file size
  • Quality Metrics: PSNR (Peak Signal-to-Noise Ratio) and SSIM (Structural Similarity Index)
  • Compression Analysis: Size and bitrate reduction percentages

🖼️ Interactive Comparison

  • Three Viewing Modes:
    • Slider Mode: Interactive before/after slider using img-comparison-slider
    • Side-by-Side Mode: Simultaneous display of both frames
    • Grid Mode: Compact 2-column layout
  • Zoom Controls: 50%-200% zoom with real image dimension scaling
  • Responsive Design: Works on desktop, tablet, and mobile

🔒 Security & Reliability

  • Path Validation: Prevents directory traversal attacks
  • Command Injection Prevention: No shell=True in subprocess calls
  • Resource Limits: File size and timeout restrictions
  • Comprehensive Error Handling: User-friendly error messages

Quick Start

Prerequisites

  1. Python 3.8+ (for type hints and modern features)
  2. FFmpeg (required for video analysis)
# macOS
brew install ffmpeg

# Ubuntu/Debian
sudo apt install ffmpeg

# Windows
# Download from https://ffmpeg.org/download.html

Basic Usage

# Navigate to the skill directory
cd /path/to/video-comparer

# Compare two videos
python3 scripts/compare.py original.mp4 compressed.mp4

# Open the generated report
open comparison.html  # macOS
# or
xdg-open comparison.html  # Linux
# or
start comparison.html  # Windows

Command Line Options

python3 scripts/compare.py   [options]

Arguments:
  original      Path to original video file
  compressed    Path to compressed video file

Options:

...