diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-02-11 17:32:48 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-02-11 17:32:48 +0100 |
commit | ab7d24f360dbe88fc30cc1274badce068241a84c (patch) | |
tree | e72b7a7ee66890cfc8af653d9c602af24bc0695e | |
parent | feb30e3651606cd7e1350d33cf42973bdab9ee3b (diff) | |
download | mmbtools-aux-ab7d24f360dbe88fc30cc1274badce068241a84c.tar.gz mmbtools-aux-ab7d24f360dbe88fc30cc1274badce068241a84c.tar.bz2 mmbtools-aux-ab7d24f360dbe88fc30cc1274badce068241a84c.zip |
add 32khz srate script example
-rwxr-xr-x | encode-alsasrc-sox32.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/encode-alsasrc-sox32.sh b/encode-alsasrc-sox32.sh new file mode 100755 index 0000000..66f9c1f --- /dev/null +++ b/encode-alsasrc-sox32.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# +# Read audio from ALSA input using sox, and encode with fdk-aac-dabplus-zmq +# +BITRATE=$1 +DST=$2 +ALSASRC="default" + +if [ "$DST" == "" ] +then + echo "Usage:" + echo " $0 <bitrate> <zmq destination>" + exit 1 +fi + +sox -t alsa $ALSASRC -b 16 -t raw - rate 32k channels 2 | \ + ../fdk-aac-dabplus/aac-enc-dabplus-zmq -r 32000 \ + -i /dev/stdin -b $BITRATE -f raw -a -o $DST + |