Run all method combinations (single-signal → fused) and compare diagnostics.
Reference results: See METHOD_MATRIX_RESULTS.md for the NBA clip results table to compare against when re-running the matrix.
python3 run_matrix.py matrix_out --gen-fixture- Generates
matrix_out/fixture.mkv(120s test pattern + tone) if missing. - Runs 17 combos in analysis-only mode (no encode).
- Writes
matrix_out/comparison.csv,matrix_out/comparison.json, and per-combodiag_<id>.json.
python3 run_matrix.py /path/to/game.mkv matrix_outUse --render to run full encode for each combo (slower).
| Kind | Combos |
|---|---|
| Single signal | motion, rms, flux, whistle |
| Pairs | motion+rms, motion+flux, motion+whistle, rms+flux, rms+whistle, flux+whistle |
| Triples | motion+rms+flux, motion+rms+whistle, motion+flux+whistle, rms+flux+whistle |
| All signals (action) | default weights, render_mode=action |
| Clock only | default weights, render_mode=clock (needs OCR) |
| Fused | default weights, render_mode=fused |
- comparison.csv — One row per combo: id, name, ok, render_mode, action_ratio_kept_vs_cut, fraction_hard_in_kept, segment_count, length_seconds.
- comparison.json — Same data plus full diagnostics path and analysis_only flag.
- diag_.json — Full diagnostics for that combo (validation stats, segment counts, EDL segment list).
- config_.json — Config used for that combo.
- action_ratio_kept_vs_cut — Mean action in kept segments vs cut; we want ≥ 1.2 (validators use this). Synthetic fixture can yield odd ratios. On short clips or when target length is close to source length, ratios can be negative or odd because the “cut” region is small or has different signal (e.g. loud ads).
- fraction_hard_in_kept — Fraction of hard-event bins (whistles/peaks) inside kept segments; we want ≥ 0.9.
- Compare fused (and all_action) to single-signal rows: fused should be at least as good on these metrics for real sports footage.
- Fused is the right default. In the NBA clip matrix, fused (and all_action / clock) kept 100% of hard events with the fewest segments (8) and near-target length. Single-signal methods often did worse: RMS only and flux only kept only 0–5% of hard events (whistles/peaks), so they would drop most key moments. That confirms we should not run with a single signal for real games.
- Configuration is sound. Using default weights (motion + RMS + flux + whistle) and render_mode: fused is correct. The matrix validates that the combined method captures what single methods miss.
- When to re-evaluate. Re-tune or re-run the matrix if: (1) you change signal logic or weights, (2) you add new signals, or (3) validation fails on real runs (e.g.
validate_condensed.py --diagnosticsfails action ratio or hard-events-in-kept). Negative action ratios on a short clip (e.g. 10 min with 18 min target) are not enough by themselves to re-evaluate; run validation on a full-length game and check ratio ≥ 1.2 and fraction_hard_in_kept ≥ 0.9.
For production (real games):
-
Use fused (default). Do not use a single-signal method or
render_mode: actionalone unless you are doing comparison tests. -
Use the full config with OCR if you have a clock/scorebug:
--config condensearr_config.full.json
Optionally add--auto-roior--clock-roi x,y,w,hif not in config. -
Emit diagnostics so you can validate:
--emit-diagnostics path/to/diag.json -
Example:
python3 condensearr.py /path/to/game.mkv \ --config condensearr_config.full.json \ --emit-diagnostics game_diag.json \ --out /path/to/game.condensed.mkv
-
After encoding, run
validate_condensed.py --output game.condensed.mkv --diagnostics game_diag.jsonand fix config or logic if it fails.