diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2013-12-15 18:44:00 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2013-12-15 18:44:00 +0100 |
commit | 9f9f315fff656f696efa6cf5dad161ea4ce44269 (patch) | |
tree | d3c39013cf2c5da951bff9162828282fe60f030d /encode-url-gst-dabplus.sh | |
parent | 34424b40f9d106b234611d68268171f9a14c2d5f (diff) | |
download | mmbtools-aux-9f9f315fff656f696efa6cf5dad161ea4ce44269.tar.gz mmbtools-aux-9f9f315fff656f696efa6cf5dad161ea4ce44269.tar.bz2 mmbtools-aux-9f9f315fff656f696efa6cf5dad161ea4ce44269.zip |
add gstreamer encoder example script
However, it's quite bursty with gstreamer
Diffstat (limited to 'encode-url-gst-dabplus.sh')
-rwxr-xr-x | encode-url-gst-dabplus.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/encode-url-gst-dabplus.sh b/encode-url-gst-dabplus.sh new file mode 100755 index 0000000..d1e2ce7 --- /dev/null +++ b/encode-url-gst-dabplus.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# +# Read a URL using gstreamer, and encode with fdk-aac-dabplus-zmq +# +URL=$1 +BITRATE=$2 +DSTPORT=$3 +QUEUEDELAY=400000 #400ms + +if [ "$DSTPORT" == "" ] +then + echo "Usage:" + echo " $0 <url> <bitrate> <zmq destination port>" + exit 1 +fi + + +gst-launch-1.0 -q \ + uridecodebin uri=$URL ! \ + queue "max-size-time=$QUEUEDELAY" ! \ + audioresample quality=8 ! \ + audioconvert ! \ + audio/x-raw, 'rate=48000,format=S16LE,channels=2' ! \ + filesink location="/dev/stdout" | \ + ../fdk-aac-dabplus/aac-enc-dabplus-zmq \ + -i /dev/stdin -b $BITRATE -f raw -a -o "tcp://*:${DSTPORT}" |