Back to Cap

Cap Export Benchmark Results

crates/export/EXPORT-BENCHMARKS.md

latest4.5 KB
Original Source

Cap Export Benchmark Results

This document tracks performance benchmarks for Cap's export system over time. Each benchmark run is timestamped, enabling comparison across different versions, configurations, and hardware.

Quick Reference

Performance Targets

MetricTargetNotes
Export Render FPS (1080p)>= 30 fpsFor 1080p and below
Export Render FPS (4K)>= 15 fpsFor 4K resolution
Export CompletionNo errorsAll presets must complete
Size Estimation Accuracy< 50% errorInitial target, tighten with data

Export Presets Tested

MP4:

  • 720p / 30fps / Maximum, Social, Web
  • 1080p / 30fps / Maximum, Social, Web
  • 1080p / 60fps / Maximum
  • 4K / 30fps / Maximum, Social

GIF:

  • 720p / 15fps
  • 720p / 30fps

Running Benchmarks

bash
# Quick benchmark (3 core presets)
cargo run -p cap-export --example export-benchmark-runner -- quick

# Full benchmark (all presets, writes to this file)
cargo run -p cap-export --example export-benchmark-runner -- full --benchmark-output

# MP4 only
cargo run -p cap-export --example export-benchmark-runner -- mp4-only --benchmark-output

# GIF only
cargo run -p cap-export --example export-benchmark-runner -- gif-only --benchmark-output

# Custom duration (default: 30s)
cargo run -p cap-export --example export-benchmark-runner -- full --duration 60 --benchmark-output

Benchmark History

<!-- EXPORT_BENCHMARK_RESULTS_START -->

Benchmark Run: 2026-02-16 11:02:26 UTC

Local time: 2026-02-16 11:02:26

Overall Result: ALL PASS (9/9)

Test Video: 72s at 1920x1080 30fps

Notes: Final calibration: encoder_efficiency=0.5 applied, FPS tapering, real-world data

Command: cargo run -p cap-export --example export-benchmark-runner -- mp4-only --duration 72 --recording-path /Users/richie/Library/Application Support/so.cap.desktop.dev/recordings/Odyssey G93SC (Display) 2026-02-16 10.06 AM.cap --benchmark-output

<details> <summary>System Information</summary>
  • OS: macos
  • Arch: aarch64
</details>

Export Results

PresetTime(s)FPSSize(MB)Estimated(MB)Size Err(%)Time Est(s)Time Err(%)Status
MP4 720p/30fps/Maximum7.58283.435.7936.22+1.27.41-2.3PASS
MP4 720p/30fps/Social7.78276.218.9318.52-2.27.41-4.8PASS
MP4 720p/30fps/Web7.03305.612.1310.26-15.47.41+5.4PASS
MP4 1080p/30fps/Maximum7.66280.380.2780.46+0.27.41-3.4PASS
MP4 1080p/30fps/Social8.62249.241.1940.64-1.37.41-14.1PASS
MP4 1080p/30fps/Web7.50286.323.3722.06-5.67.41-1.3PASS
MP4 1080p/60fps/Maximum15.15283.5127.65128.25+0.514.81-2.2PASS
MP4 4K/30fps/Maximum20.22106.3319.82319.39-0.112.27-39.3PASS
MP4 4K/30fps/Social12.26175.2161.26160.11-0.712.27+0.1PASS

Estimation Accuracy

  • MP4 Size: avg error -2.6%, avg |error| 3.0%
  • MP4 Time: avg error -6.9%, avg |error| 8.1%

Calibration Data

Use these actual-vs-estimated ratios to tune the estimation algorithm:

PresetActual(MB)Estimated(MB)Ratio (actual/est)Suggested BPP Multiplier
MP4 720p/30fps/Maximum35.7936.220.98820.2965 (current: 0.30)
MP4 720p/30fps/Social18.9318.521.02240.1534 (current: 0.15)
MP4 720p/30fps/Web12.1310.261.18270.0946 (current: 0.08)
MP4 1080p/30fps/Maximum80.2780.460.99760.2993 (current: 0.30)
MP4 1080p/30fps/Social41.1940.641.01340.1520 (current: 0.15)
MP4 1080p/30fps/Web23.3722.061.05930.0847 (current: 0.08)
MP4 1080p/60fps/Maximum127.65128.250.99530.2986 (current: 0.30)
MP4 4K/30fps/Maximum319.82319.391.00130.3004 (current: 0.30)
MP4 4K/30fps/Social161.26160.111.00720.1511 (current: 0.15)

<!-- EXPORT_BENCHMARK_RESULTS_END -->

Notes

  • Test videos are generated synthetically using FFmpeg testsrc for deterministic results
  • Source video is 1920x1080 at 30fps; exports at different resolutions test upscaling/downscaling
  • Size estimation uses the same algorithm as apps/desktop/src-tauri/src/export.rs
  • Calibration data in each run shows actual-vs-estimated ratios for tuning the estimation algorithm