summaryrefslogtreecommitdiff
path: root/roles/streaming/dolmetsch-raspi/templates/rtp-send.sh.j2
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2021-07-30 21:54:12 +0200
committerChristian Pointner <equinox@spreadspace.org>2021-07-30 21:54:12 +0200
commite578f4538dad9aa7cd977094e58293e847990d30 (patch)
treee69f9edd2fe8d312e0ee4d0f7fb3adda35d88d7e /roles/streaming/dolmetsch-raspi/templates/rtp-send.sh.j2
parentmove some legacy stuff to graveyard (diff)
move dolmetsch-raspi to generic folder
Diffstat (limited to 'roles/streaming/dolmetsch-raspi/templates/rtp-send.sh.j2')
-rw-r--r--roles/streaming/dolmetsch-raspi/templates/rtp-send.sh.j214
1 files changed, 14 insertions, 0 deletions
diff --git a/roles/streaming/dolmetsch-raspi/templates/rtp-send.sh.j2 b/roles/streaming/dolmetsch-raspi/templates/rtp-send.sh.j2
new file mode 100644
index 00000000..9754b620
--- /dev/null
+++ b/roles/streaming/dolmetsch-raspi/templates/rtp-send.sh.j2
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+HOST="$1"
+if [ -z "$HOST" ]; then
+ echo "usage: $0 <remote-host>"
+ exit 1
+fi
+
+#export GST_DEBUG=3
+exec gst-launch-1.0 rtpbin name=rtpbin \
+ alsasrc device=hw:CODEC ! 'audio/x-raw,rate=48000,channels=1' ! opusenc ! rtpopuspay ! rtpbin.send_rtp_sink_0 \
+ rtpbin.send_rtp_src_0 ! udpsink "host=$HOST" port=5000 \
+ rtpbin.send_rtcp_src_0 ! udpsink "host=$HOST" port=5001 sync=false async=false \
+ udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0