diff options
Diffstat (limited to 'ffget-audio-extension')
-rwxr-xr-x | ffget-audio-extension | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/ffget-audio-extension b/ffget-audio-extension new file mode 100755 index 0000000..7f0156f --- /dev/null +++ b/ffget-audio-extension @@ -0,0 +1,26 @@ +#!/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" |