From 5f51d9a1ac60fcb524344bf0987957fcf0c212f2 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 24 Apr 2017 08:59:07 +0200 Subject: Add variable ACHANNELS. --- bin/loop+encode+stream | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin/loop+encode+stream') diff --git a/bin/loop+encode+stream b/bin/loop+encode+stream index 4266b53..48df91f 100755 --- a/bin/loop+encode+stream +++ b/bin/loop+encode+stream @@ -15,6 +15,7 @@ fi FIRSTPORT=${2:-5002} # even number - next 3 ports used too +ACHANNELS=2 AFRAMERATE=48000 ABITRATE=32000 @@ -25,7 +26,7 @@ VBITRATE=256000 # + Use same RTP payload types as GStreamer ffmpeg -threads auto -re \ -stream_loop -1 -i "$INPUT" \ - -codec:a libopus -ac 2 -ar "$AFRAMERATE" -b:a "$ABITRATE" \ + -codec:a libopus -ac "$ACHANNELS" -ar "$AFRAMERATE" -b:a "$ABITRATE" \ -vn \ -f rtp -payload_type 111 "rtp://$IP:$FIRSTPORT?pkt_size=1200" \ -an \ -- cgit v1.2.3