Scripts: new probe script

master
Pierre Neidhardt 2014-02-08 13:51:19 +01:00
parent 8c5fe9cfaa
commit 829fe7c9ac
1 changed files with 20 additions and 0 deletions

20
.scripts/probe Executable file
View File

@ -0,0 +1,20 @@
#!/bin/sh
if [ "$#" -eq 0 ] || [ "$1" = "-h" ]; then
cat<<EOF
Usage: ${1##*/} FILE
${1##*/} ENTRIES FILE
Run ffprobe on FILE using shell print format. If no entry is specified, print
format and streams.
EOF
exit
fi
if [ $# -gt 1 ]; then
ffprobe -v quiet -print_format flat=s=_ -show_entries "$@"
else
ffprobe -v quiet -print_format flat=s=_ -show_format -show_streams "$1"
fi