Skip to content

Video freeze detection + scan completion fixes (v2.6.8)#45

Merged
ttlequals0 merged 7 commits intomainfrom
feature/freeze-detection
Apr 2, 2026
Merged

Video freeze detection + scan completion fixes (v2.6.8)#45
ttlequals0 merged 7 commits intomainfrom
feature/freeze-detection

Conversation

@ttlequals0
Copy link
Copy Markdown
Owner

@ttlequals0 ttlequals0 commented Mar 30, 2026

Summary

  • Video freeze detection using FFmpeg freezedetect filter with black frame false positive filtering
  • Freeze events reported as warnings (not corruption) -- files stay healthy
  • Tuned to n=-60dB:d=5 to eliminate false positives on animation and live-action
  • Configurable via FREEZE_DETECTION_ENABLED env var (default: true)
  • Fix "0 of 0 files" progress display during scanning phase
  • Fix scan stuck as active after completion (ORM identity map + stale Redis)

Version

2.6.8

Test plan

  • 8 freeze detection tests passing
  • Scan completion tests passing
  • Docker image built and pushed (2.6.8 and latest)

Detect videos with frozen frames (stuck picture while audio continues)
using FFmpeg's freezedetect filter. Freeze events are marked as
corruption with event count, total frozen time, and per-event
timestamps. Configurable via FREEZE_DETECTION_ENABLED env var
(default: true).
Added explicit Redis update after DB commit when transitioning to
scanning phase, and a fallback to phase_total in the scan-status API
when estimated_total is 0. Closes the gap where the UI showed stale
progress data during chunk counting.
Chain blackdetect filter with freezedetect in a single FFmpeg decode
pass. Freeze events that overlap with detected black sections (scene
transitions, studio logos, end credits) are filtered out. Only freezes
on actual video content are flagged as corruption.
@ttlequals0 ttlequals0 changed the title Add video freeze detection (v2.6.3) Video freeze detection with black frame filtering (v2.6.4) Mar 30, 2026
Adjust freezedetect to n=-40dB:d=4 (stricter noise tolerance, 4s
minimum duration) and blackdetect to d=1.0:pic_th=0.98 for better
false positive filtering. Update README, CHANGELOG, and configuration
docs with freeze detection details.
Tested against The Boondocks S01E06 (animation with held frames) which
produced 22 false positives at d=4. At d=5, zero false positives while
still catching real encoder freezes. Also changed freeze detection from
corruption to warning-only.
…2.6.8)

Two root causes: (1) _mark_scan_completed raw SQL UPDATE was overwritten
by ORM identity map flush in _create_scan_report commit -- added
expire_all after SQL commit. (2) Recovery endpoint and new scans did
not clear stale Redis progress keys -- added clear_scan_progress_redis
utility and calls at recovery and scan start.
@ttlequals0 ttlequals0 changed the title Video freeze detection with black frame filtering (v2.6.4) Video freeze detection + scan completion fixes (v2.6.8) Mar 31, 2026
@ttlequals0 ttlequals0 merged commit e34838b into main Apr 2, 2026
6 checks passed
@ttlequals0 ttlequals0 deleted the feature/freeze-detection branch April 2, 2026 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant