From 387b84f36744b8316a5f9ec327c21d386ebfdb96 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 20 Apr 2026 20:02:04 +0000 Subject: [PATCH] make-finals.sh: skip corrupt temp files (moov atom not found) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Check ffprobe output before encoding — empty/N/A duration means the file is corrupt or truncated; skip with a clear message rather than passing a bad input to ffmpeg. https://claude.ai/code/session_01C4jbd3waXG3eKZYbGUjLUQ --- make-finals.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/make-finals.sh b/make-finals.sh index 1c2ea11..947054b 100755 --- a/make-finals.sh +++ b/make-finals.sh @@ -108,7 +108,12 @@ while IFS= read -r -d '' temp_file; do continue fi - raw_dur=$(ffprobe -v error -show_entries format=duration -of csv=p=0 "$temp_file") + raw_dur=$(ffprobe -v error -show_entries format=duration -of csv=p=0 "$temp_file" 2>/dev/null || true) + if [ -z "$raw_dur" ] || [ "$raw_dur" = "N/A" ]; then + echo "SKIP (corrupt/unreadable): $temp_file" + (( skipped++ )) || true + continue + fi speed=$(echo "scale=6; $raw_dur / $target" | bc) echo "MAKE $cam/$ASTRO_YEAR/$SEASON/Mvt$MVT_NUM/$(basename "$final") [${speed}x]"