aboutsummaryrefslogtreecommitdiffstats
path: root/ffget-audio-extension
blob: 8feca8164315a0fe5c2383d7aae5527ee202b450 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/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

exec ffprobe -v error -select_streams a:0 -show_entries stream=codec_name -of default=noprint_wrappers=1:nokey=1 -- "$1"