aboutsummaryrefslogtreecommitdiffstats
path: root/ffget-audio-extension
blob: ac3a84f86ac6a5f97ca3dee23c659230ca66d0b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
# See LICENSE file for copyright and license details.

set -e

usage () {
	printf 'usage %s: in-file\n' "$0" >&2
	exit 1
}

while getopts '' flag; do
	usage
done
shift $(( ${OPTIND} - 1 ))

if test ! $# = 1; then
	usage
fi

out_file="file:$1"
if test "$1" = -; then
	out_file=-
fi
exec ffprobe -v error -select_streams a:0 -show_entries stream=codec_name -of default=noprint_wrappers=1:nokey=1 -- "${out_file}"