16 lines
366 B
Bash
Executable File
16 lines
366 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ $# -ne 1 ]; then
|
|
echo "Usage: `basename $0` <input_file>"
|
|
exit 1
|
|
fi
|
|
|
|
if ! command -v "ffprobe" &> /dev/null; then
|
|
echo 'The "ffprobe" command is necessary in order to run the script, but was not found.'
|
|
exit 1
|
|
fi
|
|
|
|
input_file="$1"
|
|
|
|
ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=s=x:p=0 "$input_file"
|