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]"