From a9faa63cd9342a22136c781afc87a62fe8cf8f1d Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 23 Apr 2026 01:52:38 +0000 Subject: [PATCH] =?UTF-8?q?4-seasons:=20remove=20per-frame=20ffprobe=20val?= =?UTF-8?q?idation=20=E2=80=94=20too=20slow=20at=20scale?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 43k images × ffprobe process launch = 30-90 min before encoding starts. Every corrupt file seen in practice has been 0-byte (caught instantly by [ ! -s ]). Non-zero corrupt files are rare; if ffmpeg hits one the existing drift warning flags the short output. Removing ffprobe restores the fast path: one stat() call per image. https://claude.ai/code/session_01C4jbd3waXG3eKZYbGUjLUQ --- 4-seasons.sh | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/4-seasons.sh b/4-seasons.sh index 48a2582..d051a55 100755 --- a/4-seasons.sh +++ b/4-seasons.sh @@ -102,18 +102,11 @@ GREY_MIN="${SEASONS_GREY_STDDEV_MIN:-0}" GREY_DARK_FLOOR="${SEASONS_GREY_DARK_FLOOR:-30}" # frames darker than this are never skipped images=(); bad=0; grey=0 for img in "${all_images[@]}"; do - # Empty or unreadable + # Skip empty or unreadable files (0-byte writes from camera reconnects) if [ ! -r "$img" ] || [ ! -s "$img" ]; then echo "WARNING: skipping empty/missing frame: $(basename "$img")" ((bad++)) || true; continue fi - # Corrupt JPEG — ffprobe can't identify any video stream - if ! ffprobe -v quiet -select_streams v:0 \ - -show_entries stream=codec_name -of csv=p=0 "$img" 2>/dev/null \ - | grep -q .; then - echo "WARNING: skipping corrupt frame: $(basename "$img")" - ((bad++)) || true; continue - fi # Optional: skip uniform-grey bad-signal frames. # A frame is bad-signal if it is BOTH uniform (low stddev) AND not dark. # Night frames are dark so they pass even with low stddev.