From ebfd768a825d3d260f5957f2cf686b1efb7d4b1f Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Thu, 12 Mar 2026 02:07:07 +0700 Subject: [PATCH] updated rtp-receiver.sh script --- bin/rtp-receiver.sh | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/bin/rtp-receiver.sh b/bin/rtp-receiver.sh index 0af3e9e..332f51e 100755 --- a/bin/rtp-receiver.sh +++ b/bin/rtp-receiver.sh @@ -1,7 +1,16 @@ #!/bin/bash -gst-launch-1.0 udpsrc port=46000 buffer-size=65536 ! \ - application/x-rtp,media=audio,payload=127,clock-rate=48000,encoding-name=L16,channels=2 ! \ - rtpjitterbuffer latency=200 ! \ - rtpL16depay ! \ - audioconvert ! \ - autoaudiosink +action=$1 + +case $action in + load) + pactl load-module module-rtp-recv \ + codec=audio/L16 \ + channels=2 \ + rate=48000 \ + format=s16be \ + sap=0 + ;; + unload) + pactl unload-module module-rtp-recv + ;; +esac