summaryrefslogtreecommitdiff
path: root/bin/send-gst-rtp-v-a
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-03-08 23:58:30 +0100
committerJonas Smedegaard <dr@jones.dk>2017-03-09 00:23:02 +0100
commit9c843caf241752d9e389b08b2d447ba6df81b438 (patch)
tree96694194d1513663722bb9a03bf40eba87e3a931 /bin/send-gst-rtp-v-a
parent180fcbe26e2c6f3ddc5d0aba3f647ea09479cb47 (diff)
Limit network latency.
Diffstat (limited to 'bin/send-gst-rtp-v-a')
-rwxr-xr-xbin/send-gst-rtp-v-a5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/send-gst-rtp-v-a b/bin/send-gst-rtp-v-a
index cd7b4c4..cc30c0e 100755
--- a/bin/send-gst-rtp-v-a
+++ b/bin/send-gst-rtp-v-a
@@ -25,6 +25,9 @@ AUDIORATE=48000
VCAPS=video/x-raw,height="$HEIGHT"
ACAPS=audio/x-raw,rate="$AUDIORATE",channels=2,depth=16
+# * http://stackoverflow.com/a/42237307
+ABUFFERS=20000
+
# * force threads using queues - see http://stackoverflow.com/a/30738533
# * generous queue sizes inspired by https://wiki.xiph.org/GST_cookbook
QUEUE=" queue max-size-bytes=100000000 max-size-time=0"
@@ -72,6 +75,6 @@ n=0
gst-launch-1.0 -v \
rtpbin name=rtpbin \
$(for dev in $VDEVICES; do n=$((n+1)); stream "$n" "v4l2src device=$dev ! $QUEUE ! videoconvert ! $VCAPS ! $QUEUE ! $VENC ! $QUEUE"; done; \
- for dev in $ADEVICES; do n=$((n+1)); stream "$n" "alsasrc device=$dev ! $QUEUE ! audioconvert ! $QUEUE ! $AENC ! $QUEUE"; done)
+ for dev in $ADEVICES; do n=$((n+1)); stream "$n" "alsasrc device=$dev buffer-time=$ABUFFERS ! $QUEUE ! audioconvert ! $QUEUE ! $AENC ! $QUEUE"; done)
set -e