summaryrefslogtreecommitdiff
path: root/roles/streaming/dolmetsch-raspi/templates/rtp-recv.sh.j2
blob: 1cbd08ead95ce9214e03ad5566e103b180e8020a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

HOST="$1"
LATENCY="$2"
if [ -z "$HOST" ] || [ -z "$LATENCY" ]; then
  echo "usage: $0 <remote-host> <latency-ms>"
  exit 1
fi

#export GST_DEBUG=3
exec gst-launch-1.0 rtpbin name=rtpbin "latency=$LATENCY" \
       udpsrc port=5000 caps="application/x-rtp,media=(string)audio,encoding-name=(string)OPUS,clock-rate=(int)48000" ! rtpbin.recv_rtp_sink_0 \
         rtpbin. ! rtpopusdepay ! opusdec ! alsasink \
       udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \
       rtpbin.send_rtcp_src_0 ! udpsink "host=$HOST" port=5001 sync=false async=false