first commit

This commit is contained in:
2025-10-09 10:55:52 +02:00
commit 6be8201511
20 changed files with 2132 additions and 0 deletions

34
sanitycheck.sh Executable file
View File

@ -0,0 +1,34 @@
#!/usr/bin/env bash
#
# sanitycheck.sh <file.mp4>
#
# Returns: "OK" if file looks good, "Not OK" otherwise.
file="$1"
if [ -z "$file" ]; then
echo "Usage: $0 <file.mp4>"
exit 2
fi
if [ ! -f "$file" ]; then
echo "Not OK (file not found)"
exit 1
fi
# --- Test 1: metadata sanity check ---
ffprobe -v error -select_streams v:0 -show_entries stream=width,height,duration \
-of csv=p=0 "$file" > /dev/null 2>&1
probe_status=$?
# --- Test 2: deep read/decode ---
ffmpeg -v error -xerror -i "$file" -f null - -nostats > /dev/null 2>&1
decode_status=$?
if [ $probe_status -eq 0 ] && [ $decode_status -eq 0 ]; then
echo "OK"
exit 0
else
echo "Not OK"
exit 1
fi