diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-01-03 16:58:33 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-01-03 16:58:33 +0100 |
commit | 80b324e915e972adee078ac1dc5cf1848de00eb7 (patch) | |
tree | fdf7535bb9c71e919b2226ddda90ee8441b3d94a /encode-url-gst-dabplus.sh | |
parent | 9f9f315fff656f696efa6cf5dad161ea4ce44269 (diff) | |
download | mmbtools-aux-80b324e915e972adee078ac1dc5cf1848de00eb7.tar.gz mmbtools-aux-80b324e915e972adee078ac1dc5cf1848de00eb7.tar.bz2 mmbtools-aux-80b324e915e972adee078ac1dc5cf1848de00eb7.zip |
add gstreamer-0.10 examples, some renamings
Diffstat (limited to 'encode-url-gst-dabplus.sh')
-rwxr-xr-x | encode-url-gst-dabplus.sh | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/encode-url-gst-dabplus.sh b/encode-url-gst-dabplus.sh index d1e2ce7..bbe3d59 100755 --- a/encode-url-gst-dabplus.sh +++ b/encode-url-gst-dabplus.sh @@ -7,6 +7,8 @@ BITRATE=$2 DSTPORT=$3 QUEUEDELAY=400000 #400ms +GSTREAMER_VERSION="1" + if [ "$DSTPORT" == "" ] then echo "Usage:" @@ -15,12 +17,28 @@ then 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}" +if [ "$GSTREAMER_VERSION" == "1" ] +then + 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}" + +elif [ "$GSTREAMER_VERSION" == "0" ] +then + gst-launch -q \ + uridecodebin uri=$URL ! \ + queue "max-size-time=$QUEUEDELAY" ! \ + audioresample quality=8 ! \ + audioconvert ! \ + audio/x-raw-int, '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}" +fi + |