aboutsummaryrefslogblamecommitdiffstats
path: root/ffget-audio-extension
blob: 7f0156fcca787b1e1f4a11a10b77a2bf4922392b (plain) (tree)

























                                                                                                                        
#!/bin/sh
# See LICENSE file for copyright and license details.

set -e

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

while test "${1::1}" = '-'; do
	if test "${1}" = '--'; then
		shift
		break
	elif test "${1}" = '-'; then
		break
	else
		usage
	fi
done

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"