modern_lisp-machine/misc/scripts/analyze_video.sh

14 lines
350 B
Bash
Executable File

EXEC_SHELL_PATH=$(command -v bash)
if [ "$#" -ne 1 ]; then
echo "Usage: $0 input_file"
exit 1
fi
file_path="$1"
file_size_mb=$(stat --format="%s" "$file_path" | awk '{printf "%.2f", $1 / 1024 / 1024}')
echo "File size: ${file_size_mb}MB"
ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=s=x:p=0 "$file_path"