Commit Graph

23 Commits

Author SHA1 Message Date
Melbar 17db238ea3 Update cutter report after full match run (23/25, 6 confirmed)
Refreshed CUTTER_REPORT.{md,html} plus stills and clips from the latest
match cache. Notable changes vs prior cache:

- 6 confirmed (was 5): newly confirmed beats 2, 9, 12, 17 (beat 8 lost
  confirmed status, beat 18 lost match entirely; both will be addressed
  per-beat).
- Beat 2: previously unmatched -> scene 3 in=35.190s score 0.761 (OK).
- Beat 20: scene 613 in=5284.706s score 0.663 (OK), correct phase via
  recovery.
- Beats 21, 23: previously unmatched -> now provisional via recovery.
- Beat 18: regression, currently MAN. (was confirmed before).
- Beat 24: still MAN. (end credits, expected).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 22:25:42 +02:00
Melbar f57bd6a669 Track cutter stills and clips in repo, always render with clips
- cli.py auto-regen now produces video clips on every match (no opt-in
  flag). Best presentation comes first; speed cost (~minutes per match)
  is accepted.
- output/cutter_stills/ and output/cutter_clips/ are no longer gitignored.
  All 45 stills and 45 short MP4 previews are committed alongside the
  CUTTER_REPORT.{md,html} so the remote repo always shows the current
  state — even when the report files are inspected without running the
  generator.
- Other output/ contents (FCPXML, EDL, debug folders, HTML report) stay
  ignored.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 13:36:20 +02:00
Melbar a405df0ddb Embed cutter-report stills inline + add HTML report with video previews
Two issues fixed:

1. Source frame rate was wrong. The script trusted ffprobe, which on this
   re-wrapped proxy reports 25 fps. The real number for the EDL/FCPXML and
   for what the cutter sees in the NLE comes from config.toml's
   edl_frame_rate (here 23.976). Source fps now reads that value first;
   ffprobe is only a fallback. Trailer fps still probes ffprobe (correct
   for the trailer file) with optional config override.

2. Stills in CUTTER_REPORT.md showed as broken links because output/ is
   gitignored, so the git server can't serve them. Stills are now embedded
   as base64 data URIs directly in the markdown. The file is therefore
   self-contained and renders in any markdown viewer including the git
   server's web preview.

3. New CUTTER_REPORT.html alongside the markdown: same data, proper card
   layout, side-by-side trailer/source columns per beat, base64-embedded
   stills, and (with --with-clips) base64-embedded 3 s MP4 video previews
   so the cutter can sight-check phase agreement directly in a browser.
   The auto-regen on each match writes both files; --with-clips is opt-in
   from the CLI for slower full renders.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 13:33:07 +02:00
Melbar 5a6ae2175c Slim README, move algorithm prose to docs, add stills + per-fps TC to cutter report
README: 550 -> 308 lines. The dense algorithm prose was moved verbatim to
docs/ALGORITHM.md and replaced in the README with a compact "Wenn ein Match
falsch wirkt" troubleshooting table and a link. The cutter-facing intro
points at the new in-report stills instead of the old HTML report.

Cutter report:
- Per-side frame rates: trailer timecodes use the trailer file's fps
  (typically 25), source timecodes use the source file's fps. ffprobe is
  used to detect each side; falls back to edl_frame_rate if unavailable.
- Side-by-side trailer/source preview stills extracted via ffmpeg, taken
  ~30% into the beat / match window. Stored under output/cutter_stills/
  (gitignored). Re-rendered only when the underlying video is newer than
  the cached jpg.
- Compact table at the top, detailed per-beat sections below with the
  stills inline so the cutter can sight-check phase agreement directly.
- New --no-stills flag for fast text-only regeneration.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 13:24:19 +02:00
Melbar 97a8f9e305 Add cutter report and auto-regen on each match
- New CUTTER_REPORT.md: per-beat hand-off table for the video editor doing
  the manual recut. Per beat: trailer SMPTE in/out, source SMPTE in/out,
  scene id, score, status (OK / ? / MAN.), and a one-line phase
  description from the cached vision text.
- New scripts/generate_cutter_report.py: pure renderer that reads the
  current cache (match_results.json + trailer_beats.json + optional
  vision_descriptions.json) and writes CUTTER_REPORT.md. No side effects on
  the cache.
- cli.py: after every successful match the cutter report is regenerated
  automatically (best-effort; failures are logged and do not abort).
- README.md: new top-section "Fuer den Cutter" describing exactly what the
  editor needs (which two files to look at, how the status flag works,
  the recommended NLE workflow). The technical algorithm description
  follows below.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 13:09:16 +02:00
Melbar 06a2326bf1 Broaden phase realign and add unmatched-beat recovery
- Phase realign for matched results: drop the "long scene" gate (>1.6x
  segment, >=6s) in favor of "scene has any meaningful slack beyond the
  segment". Already-confirmed segments in tight scenes are still skipped to
  protect strong matches. A repair is only committed if the new score is
  not meaningfully worse than the original (>=score-0.02).

- Recovery stage for unmatched beats: vibe-check (CV) feeds top-K candidate
  scenes into the semantic action-window search; CV alignment + vision phase
  validate gate decide whether the candidate becomes a provisional match.
  Beats without scoreable visual content (logos, title cards, full fades)
  remain unmatched by design.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 07:12:20 +02:00
Melbar 7b4a98d760 Match segment window by its own action phase
For segmented beats, the repair stage now searches for the source action
window using the segment's own description first; the full beat context is
used only as a fallback or when it scores noticeably higher. The trailer-
offset shift is applied only when the beat context is actually chosen.

Also harden vision-call retries to catch read-side network errors
(TimeoutError, socket.timeout, ConnectionError, OSError) and wrap the
filter/repair loop so a transient vision failure preserves the previously
cached match instead of dropping it.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-03 06:22:12 +02:00
Melbar 2cc05e4737 Trim retimed segments when phase drifts 2026-05-02 23:04:41 +02:00
Melbar e293835a86 Use beat context for segmented action retiming 2026-05-02 21:58:35 +02:00
Melbar 8415516f89 Retiming long scene matches by action phase 2026-05-02 20:47:59 +02:00
Melbar 252f710396 Rank long-scene probes without action penalty 2026-05-02 18:53:27 +02:00
Melbar 2d9ba91a7b Probe broader long-scene action windows 2026-05-02 18:25:16 +02:00
Melbar a5a84a9145 Use motion phase for in-scene timing 2026-05-02 17:59:18 +02:00
Melbar 3ea5582b49 Realign wrong in-scene action matches 2026-05-02 17:13:22 +02:00
Melbar 1a177d6b89 Reject vision matches with action phase mismatches 2026-05-02 16:49:47 +02:00
Melbar d9e470c877 Improve vision matching for dissolve-heavy beats 2026-05-02 16:15:51 +02:00
Melbar 858a814db1 Normalize segmented cache coverage 2026-05-02 14:11:27 +02:00
Melbar e6bd0faf03 Improve segmented vision matching quality 2026-05-02 13:49:16 +02:00
Melbar 884a0d4232 Add vision prepass for targeted matches 2026-05-02 13:03:15 +02:00
Melbar f1173eacee Add segmented fallback for unmatched beats 2026-05-02 11:46:33 +02:00
Melbar 535176c144 Lower provisional review threshold 2026-05-02 10:09:30 +02:00
Melbar e4dd0a77b2 Document multi-segment trailer beat matching 2026-05-02 09:18:46 +02:00
Melbar 8e1bcf142f Initial project import 2026-05-02 09:07:41 +02:00