Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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.
.claude/skills/nicepkg-video-comparer/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | -66% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 15% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -8% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 10% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -30% | 0% |
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.
Use this skill when:
bashpython3 scripts/compare.py original.mp4 compressed.mp4
Generates comparison.html with:
bash# 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
FFmpeg and FFprobe (required for video analysis and frame extraction):
bash# 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)
.mp4 (recommended), .mov, .avi, .mkv, .webmThe script automatically validates:
Clear error messages with resolution guidance appear when validation fails.
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.
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.
The generated HTML report includes:
The script implements:
shell=True, validated arguments)ValidationError, FFmpegError, VideoComparisonError"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
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.
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 constantsassets/template.html: HTML report template for customizing viewing modes and styling| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-04 | fail→fail | 16,670 | 3,161 | -81% | 1 | 1 | 0% | 3,287 | 1,447 | -56% | 0 | 0 | — |
case-05 | pass→fail | 12,830 | 4,606 | -64% | 1 | 1 | 0% | 2,022 | 1,816 | -10% | 0 | 0 | — |
case-06 | pass→pass | 8,748 | 4,939 | -44% | 1 | 1 | 0% | 1,334 | 1,871 | +40% | 0 | 0 | — |
case-01 | fail→fail | 31,469 | 11,425 | -64% | 1 | 1 | 0% | 6,203 | 1,345 | -78% | 0 | 0 | — |
case-02 | fail→fail | 29,928 | 2,675 | -91% | 1 | 1 | 0% | 6,208 | 1,424 | -77% | 0 | 0 | — |
case-03 | fail→pass | 30,938 | 23,174 | -25% | 1 | 1 | 0% | 6,197 | 2,133 | -66% | 0 | 0 | — |
case-07 | fail→pass | 8,481 | 1,967 | -77% | 1 | 1 | 0% | 1,233 | 1,421 | +15% | 0 | 0 | — |
case-08 | fail→pass | 9,622 | 1,495 | -84% | 1 | 1 | 0% | 1,458 | 1,344 | -8% | 0 | 0 | — |
case-09 | fail→pass | 7,836 | 1,661 | -79% | 1 | 1 | 0% | 1,291 | 1,422 | +10% | 0 | 0 | — |
case-10 | fail→pass | 12,767 | 2,044 | -84% | 1 | 1 | 0% | 1,955 | 1,366 | -30% | 0 | 0 | — |
case-11 | fail→pass | 8,335 | 2,080 | -75% | 1 | 1 | 0% | 1,173 | 1,418 | +21% | 0 | 0 | — |
case-12 | fail→pass | 14,837 | 8,070 | -46% | 1 | 1 | 0% | 2,174 | 2,378 | +9% | 0 | 0 | — |
case-13 | pass→pass | 8,678 | 4,858 | -44% | 1 | 1 | 0% | 1,492 | 1,935 | +30% | 0 | 0 | — |
case-14 | fail→pass | 11,334 | 2,944 | -74% | 1 | 1 | 0% | 1,810 | 1,631 | -10% | 0 | 0 | — |
case-15 | fail→pass | 11,807 | 1,982 | -83% | 1 | 1 | 0% | 1,796 | 1,421 | -21% | 0 | 0 | — |
case-16 | fail→pass | 9,043 | 1,711 | -81% | 1 | 1 | 0% | 1,448 | 1,359 | -6% | 0 | 0 | — |
case-17 | fail→pass | 14,462 | 3,396 | -77% | 1 | 1 | 0% | 2,639 | 1,681 | -36% | 0 | 0 | — |
case-18 | pass→pass | 14,201 | 6,820 | -52% | 1 | 1 | 0% | 2,231 | 2,213 | -1% | 0 | 0 | — |
case-19 | pass→pass | 4,769 | 1,701 | -64% | 1 | 1 | 0% | 823 | 1,394 | +69% | 0 | 0 | — |
case-20 | fail→pass | 6,243 | 7,361 | +18% | 1 | 1 | 0% | 1,335 | 2,549 | +91% | 0 | 0 | — |
case-21 | pass→pass | 8,010 | 6,006 | -25% | 1 | 1 | 0% | 1,395 | 2,220 | +59% | 0 | 0 | — |
case-22 | pass→fail | 6,874 | 3,185 | -54% | 1 | 1 | 0% | 1,192 | 1,643 | +38% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +45 percentage points is the difference between those two pass rates over the 21 comparable cases. 3 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.