make-finals.sh: skip corrupt temp files (moov atom not found)
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
This commit is contained in:
+6
-1
@@ -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]"
|
||||
|
||||
Reference in New Issue
Block a user