From abf91b151cb2693d101f14103fe49fbe9bb9b7fb Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Thu, 12 Mar 2026 03:27:34 +0700 Subject: [PATCH] added rtp-sender.sh script --- bin/rtp-sender.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 bin/rtp-sender.sh diff --git a/bin/rtp-sender.sh b/bin/rtp-sender.sh new file mode 100755 index 0000000..af73d6f --- /dev/null +++ b/bin/rtp-sender.sh @@ -0,0 +1,22 @@ +#!/bin/bash +action=$1 +ip=${2:-192.168.3.46} + +case $action in + load) + pactl load-module module-null-sink sink_name=rtp_sink + pactl load-module module-rtp-send \ + source=rtp_sink.monitor \ + destination_ip=$2 \ + port=46000 \ + codec=audio/L16 \ + channels=2 \ + rate=48000 \ + format=s16be \ + sap=0 + ;; + unload) + pactl unload-module module-rtp-send + pactl unload-module module-null-sink + ;; +esac