Add analysis caching and segment looping for short videos

- Add _cache_analysis_tracks() to cache each analysis track individually
  with content-hash IDs, replacing inline data with cache-id refs
- Add _resolve_analysis_refs() to resolve cache-id refs back to full data
- Add extract_segment_with_loop() helper that detects when output is
  shorter than requested duration and re-runs with -stream_loop -1
- Update COMPOUND handler's FFmpeg and Python paths to use looping
- This fixes videos shorter than audio duration being truncated

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gilesb
2026-01-28 18:51:28 +00:00
parent 45f9171701
commit 17e3e23f06
2 changed files with 1210 additions and 158 deletions

1148
execute.py

File diff suppressed because it is too large Load Diff