Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
daymade avatar

Video Comparer

  • 712 installs
  • 1.3k repo stars
  • Updated August 4, 2026
  • daymade/claude-code-skills

video-comparer is a Claude Code skill that compares original and compressed videos and generates interactive HTML quality reports with PSNR, SSIM, and frame-by-frame visuals for developers evaluating encoding results.

About

video-comparer is a daymade/claude-code-skills utility that compares two video files—typically an original and a compressed export—and produces an interactive HTML report analyzing compression quality. The bundled script extracts video metadata, calculates objective metrics including PSNR and SSIM, and renders frame-by-frame visual comparisons with multiple viewing modes such as slide-based inspection. Triggers include compare videos, video quality, compression analysis, before/after compression, and requests to assess encoded output fidelity. Developers reach for video-comparer when tuning bitrate, codec, or transcoding presets and need quantified evidence plus side-by-side frames instead of subjective playback checks alone. The skill fits content pipelines, media CLI tooling, and pre-release validation where degraded compression must be caught before publishing or distribution.

  • Calculates PSNR and SSIM quality metrics between two videos
  • Generates interactive HTML reports with three viewing modes: slider, side-by-side, and grid
  • Extracts and displays codec, resolution, bitrate, duration, and file size parameters
  • Creates frame-by-frame visual comparisons at customizable intervals
  • Supports custom output filenames and compression analysis triggers

Video Comparer by the numbers

  • 712 all-time installs (skills.sh)
  • Ranked #331 of 1,335 Generative Media skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/daymade/claude-code-skills --skill video-comparer

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs712
repo stars1.3k
Last updatedAugust 4, 2026
Repositorydaymade/claude-code-skills

How do you compare video compression quality with metrics?

Automatically compare original and compressed videos with quality metrics and interactive visual reports.

Who is it for?

Media developers tuning video compression who need PSNR, SSIM, and visual frame diffs in an HTML report before shipping encoded assets.

Skip if: Still-image optimization, live streaming latency tests, or teams without two comparable video files to analyze.

When should I use this skill?

A developer mentions compare videos, compression analysis, video quality metrics, or before/after encoding assessment.

What you get

Interactive HTML reports with PSNR and SSIM scores, video metadata, and frame-by-frame visual comparison modes.

  • Interactive HTML quality report
  • PSNR and SSIM metric tables

Files

SKILL.mdMarkdownGitHub ↗

Video Comparer

Overview

Compare two videos and generate an interactive HTML report analyzing compression results. The script extracts video metadata, calculates quality metrics (PSNR, SSIM), and creates frame-by-frame visual comparisons with three viewing modes: slider, side-by-side, and grid.

When to Use This Skill

Use this skill when:

  • Comparing original and compressed videos
  • Analyzing video compression quality and efficiency
  • Evaluating codec performance or bitrate reduction impact
  • Users mention "compare videos", "video quality", "compression analysis", or "before/after compression"

Core Usage

Basic Command

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

Generates comparison.html with:

  • Video parameters (codec, resolution, bitrate, duration, file size)
  • Quality metrics (PSNR, SSIM, size/bitrate reduction percentages)
  • Frame-by-frame comparison (default: frames at 5s intervals)

Command Options

# Custom output file
python3 scripts/compare.py original.mp4 compressed.mp4 -o report.html

# Custom frame interval (larger = fewer frames, faster processing)
python3 scripts/compare.py original.mp4 compressed.mp4 --interval 10

# Batch comparison
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

Requirements

System Dependencies

FFmpeg and FFprobe (required for video analysis and frame extraction):

# macOS
brew install ffmpeg

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

# Windows
# Download from https://ffmpeg.org/download.html
# Or use: winget install ffmpeg

Python 3.8+ (uses type hints, f-strings, pathlib)

Video Specifications

  • Supported formats: .mp4 (recommended), .mov, .avi, .mkv, .webm
  • File size limit: 500MB per video (configurable)
  • Processing time: ~1-2 minutes for typical videos; varies by duration and frame interval

Script Behavior

Automatic Validation

The script automatically validates:

  • FFmpeg/FFprobe installation and availability
  • File existence, extensions, and size limits
  • Path security (prevents directory traversal)

Clear error messages with resolution guidance appear when validation fails.

Quality Metrics

The script calculates two standard quality metrics:

PSNR (Peak Signal-to-Noise Ratio): Pixel-level similarity measurement (20-50 dB scale, higher is better)

SSIM (Structural Similarity Index): Perceptual similarity measurement (0.0-1.0 scale, higher is better)

For detailed interpretation scales and quality thresholds, consult references/video_metrics.md.

Frame Extraction

The script extracts frames at specified intervals (default: 5 seconds), scales them to consistent height (800px) for comparison, and embeds them as base64 data URLs in self-contained HTML. Temporary files are automatically cleaned after processing.

Output Report

The generated HTML report includes:

  • Slider Mode: Drag to reveal original vs compressed (default)
  • Side-by-Side Mode: Simultaneous display for direct comparison
  • Grid Mode: Compact 2-column layout
  • Zoom Controls: 50%-200% magnification
  • Self-contained format (no server required, works offline)

Important Implementation Details

Security

The script implements:

  • Path validation (absolute paths, prevents directory traversal)
  • Command injection prevention (no shell=True, validated arguments)
  • Resource limits (file size, timeouts)
  • Custom exceptions: ValidationError, FFmpegError, VideoComparisonError

Common Error Scenarios

"FFmpeg not found": Install FFmpeg via platform package manager (see Requirements section)

"File too large": Compress videos before comparison, or adjust MAX_FILE_SIZE_MB in scripts/compare.py

"Operation timed out": Increase FFMPEG_TIMEOUT constant or use larger --interval value (processes fewer frames)

"Frame count mismatch": Videos have different durations/frame rates; script auto-truncates to minimum frame count and shows warning

Configuration

The script includes adjustable constants for file size limits, timeouts, frame dimensions, and extraction intervals. To customize behavior, edit the constants at the top of scripts/compare.py. For detailed configuration options and their impacts, consult references/configuration.md.

Reference Materials

Consult these files for detailed information:

  • `references/video_metrics.md`: Quality metrics interpretation (PSNR/SSIM scales, compression targets, bitrate guidelines)
  • `references/ffmpeg_commands.md`: FFmpeg command reference (metadata extraction, frame extraction, troubleshooting)
  • `references/configuration.md`: Script configuration options and adjustable constants
  • `assets/template.html`: HTML report template for customizing viewing modes and styling

Related skills

How it compares

Use video-comparer for side-by-side encoded video QA with metrics; use image-focused tools when the artifact is still frames rather than video files.

FAQ

What metrics does video-comparer calculate?

video-comparer calculates PSNR and SSIM quality metrics alongside extracted video metadata, then embeds results in an interactive HTML report with frame-by-frame visual comparisons.

What output does video-comparer produce?

video-comparer produces an interactive HTML report with quality metrics and frame-by-frame visual comparisons, including slide-based viewing modes for inspecting compression differences between two videos.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.