diff options
author | Jonas Smedegaard <dr@jones.dk> | 2017-03-08 23:58:30 +0100 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2017-03-09 00:23:02 +0100 |
commit | 9c843caf241752d9e389b08b2d447ba6df81b438 (patch) | |
tree | 96694194d1513663722bb9a03bf40eba87e3a931 /bin/recv-gst-rtp-v-a | |
parent | 180fcbe26e2c6f3ddc5d0aba3f647ea09479cb47 (diff) |
Limit network latency.
Diffstat (limited to 'bin/recv-gst-rtp-v-a')
-rwxr-xr-x | bin/recv-gst-rtp-v-a | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/recv-gst-rtp-v-a b/bin/recv-gst-rtp-v-a index 17cd16e..daffd25 100755 --- a/bin/recv-gst-rtp-v-a +++ b/bin/recv-gst-rtp-v-a @@ -18,6 +18,10 @@ set -u RECHOST="${RECMIP:+address=$RECMIP auto-multicast=true}" CAMHOST="${CAMIP:+host=$CAMIP}${CAMMIP:+host=$CAMMIP auto-multicast=true}" +# http://stackoverflow.com/a/42237307 +ABUFFERS=80000 +NETLATENCY=20 + case "$VFORMAT" in H264) VCAPS=application/x-rtp,media=video,clock-rate=90000,payload=96,encoding-name=H264 @@ -63,6 +67,6 @@ stream() { } gst-launch-1.0 -v \ - rtpbin name=rtpbin \ + rtpbin name=rtpbin latency=$NETLATENCY drop-on-latency=true \ $(for i in $(seq "${VCOUNT:-1}"); do stream "$i" "$VCAPS" "$VDEC ! $VSINK"; done) \ - $(for j in $(seq "${ACOUNT:-0}"); do stream $((VCOUNT+j)) "$ACAPS" "$ADEC ! $ASINK"; done) + $(for j in $(seq "${ACOUNT:-0}"); do stream $((VCOUNT+j)) "$ACAPS" "$ADEC ! $ASINK buffer-time=$ABUFFERS"; done) |