Video freeze detection + scan completion fixes (v2.6.8)#45
Merged
ttlequals0 merged 7 commits intomainfrom Apr 2, 2026
Merged
Conversation
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Version
2.6.8
Test plan