aboutsummaryrefslogtreecommitdiffstats
path: root/encode-alsasrc-sox.sh
blob: 5ec8db7e6159357560672f250ca4cebe20945f1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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 48k channels 2 | \
    ../fdk-aac-dabplus/aac-enc-dabplus-zmq \
    -i /dev/stdin -b $BITRATE -f raw -a -o $DST