Redesign video comparison viewer with synchronized playback
silvanus930
c300884
Replaced the two independent <video controls> elements (each with its own
play state, seek bar, and no relationship to the other) with a proper
side-by-side comparison viewer:
- Chip labels overlaid on the video itself (Reference/Compressed) instead
of plain text below, with a byte-size readout in the corner
- Both videos pinned to the same 16:9 frame via object-fit so they're
directly comparable regardless of actual resolution
- A single shared control bar: one play/pause button and one seek bar
drive both videos together, with a small drift-correction check on
every timeupdate (independent decoders on separately-encoded files can
drift a little even when started in sync)
- A loading overlay per video that clears on first decoded frame, so the
black box isn't ambiguous between "still loading" and "empty"
Also verified (in response to a reported reference/compressed mismatch)
that the actual file pairing was correct all along -- extracted frames
from both the source fil…
- scoring.py: shared real compression-score formula (mirrors the exact
validator formula, same one used in real_validator_score_test.py) so
every part of the CMS scores consistently instead of each view
reimplementing it.
- db.py: added score column (+ migration for the pre-existing DB), an
alerts table, a calibration_runs table, sortable/filterable item
queries, score-trend and rate-distortion query helpers.
- cq_health.py: parses the live CQ tables directly from app.py's source
and cross-references them against real calibration evidence, flagging
which tiers are backed by data vs. still guesses. Caught and fixed a
real bug while building this: calibration evidence wasn't filtered by
encoder_mode, so NVENC AV1 data was silently getting attributed to the
SVT-AV1 table (different CQ/CRF curve entirely) and vice versa. Also
normalized all scores to the real vmaf_threshold rather than trusting
stored score_est, which for search-log rows is computed against an
inf…