summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-05-21 23:11:54 +0200
committerJonas Smedegaard <dr@jones.dk>2017-05-21 23:11:54 +0200
commit346f5f904f17d51da838822782a6a0ad335449c5 (patch)
treeff46a570cf514081839a03931421681cc7d3eff4 /bin
parent9cad4312e48f5a573f2c621b21974d52f5168807 (diff)
Fix support audio-only or video-only.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/stream4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/stream b/bin/stream
index c1833de..0bc99f6 100755
--- a/bin/stream
+++ b/bin/stream
@@ -102,7 +102,7 @@ fi
[ -z "$XINPUT" ] || [ $XINPUT -eq 1 ] || exit1 "Too many arguments: Max. 1 multimedia source"
[ -n "${NOAUDIO:-}" ] || [ -z "$AINPUT$XINPUT" ] || HASAUDIO=1
[ -n "${NOVIDEO:-}" ] || [ -z "$VINPUT$XINPUT" ] || HASVIDEO=1
-[ "$AINPUT$VINPUT$XINPUT" = "1" ] || TWOSOURCES=1
+[ -z "${HASAUDIO:-}" ] || [ -z "${HASVIDEO:-}" ] || HASMULTIMEDIA=1
VSTREAMINDEX=1
[ -n "$AINPUT" ] || VSTREAMINDEX=0
@@ -266,7 +266,7 @@ ffmpeg -hide_banner -threads auto \
$(encode_vp8 "$VBITRATE" "$SPEED_VP8") } \
-f tee \
"${HASAUDIO:+\
- $(tee_rtp a 111 "$FIRSTPORT")|\
+ $(tee_rtp a 111 "$FIRSTPORT")${HASMULTIMEDIA:+|}\
}${HASVIDEO:+\
$(tee_rtp v 100 $((FIRSTPORT+2)))}" } \
${HEIGHTS_MPEG:+\