video-comparer

3
0
Source

This skill should be used when comparing two videos to analyze compression results or quality differences. Generates interactive HTML reports with quality metrics (PSNR, SSIM) and frame-by-frame visual comparisons. Triggers when users mention "compare videos", "video quality", "compression analysis", "before/after compression", or request quality assessment of compressed videos.

Install

mkdir -p .claude/skills/video-comparer && curl -L -o skill.zip "https://mcp.directory/api/skills/download/3140" && unzip -o skill.zip -d .claude/skills/video-comparer && rm skill.zip

Installs to .claude/skills/video-comparer

About this skill

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

macos-cleaner

daymade

Analyze and reclaim macOS disk space through intelligent cleanup recommendations. This skill should be used when users report disk space issues, need to clean up their Mac, or want to understand what's consuming storage. Focus on safe, interactive analysis with user confirmation before any deletions.

239

ppt-creator

daymade

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.

235

claude-skills-troubleshooting

daymade

Diagnose and resolve Claude Code plugin and skill issues. This skill should be used when plugins are installed but not showing in available skills list, skills are not activating as expected, or when troubleshooting enabledPlugins configuration in settings.json. Triggers include "plugin not working", "skill not showing", "installed but disabled", or "enabledPlugins" issues.

91

twitter-reader

daymade

Fetch Twitter/X post content by URL using jina.ai API to bypass JavaScript restrictions. Use when Claude needs to retrieve tweet content including author, timestamp, post text, images, and thread replies. Supports individual posts or batch fetching from x.com or twitter.com URLs.

321

llm-icon-finder

daymade

Finding and accessing AI/LLM model brand icons from lobe-icons library. Use when users need icon URLs, want to download brand logos for AI models/providers/applications (Claude, GPT, Gemini, etc.), or request icons in SVG/PNG/WEBP formats.

00

i18n-expert

daymade

This skill should be used when setting up, auditing, or enforcing internationalization/localization in UI codebases (React/TS, i18next or similar, JSON locales), including installing/configuring the i18n framework, replacing hard-coded strings, ensuring en-US/zh-CN coverage, mapping error codes to localized messages, and validating key parity, pluralization, and formatting.

30

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

643969

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

591705

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

318399

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

340397

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

452339

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

304231

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.