summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/stream5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/stream b/bin/stream
index 44374d6..7a5851c 100755
--- a/bin/stream
+++ b/bin/stream
@@ -103,6 +103,7 @@ fi
[ -n "${NOAUDIO:-}" ] || [ -z "$AINPUT$XINPUT" ] || HASAUDIO=1
[ -n "${NOVIDEO:-}" ] || [ -z "$VINPUT$XINPUT" ] || HASVIDEO=1
TARGETS_WEBM="${HASAUDIO:+rtp_opus} ${HASVIDEO:+rtp_vp8}"
+TARGETS_MPEG="rtp_mpegts"
VSTREAMINDEX=1
[ -n "$AINPUT" ] || VSTREAMINDEX=0
@@ -244,6 +245,7 @@ mux() { targets="$1";
case "$targets" in
rtp_opus) echo_n "-f rtp -payload_type 111 rtp://$IP:$FIRSTPORT?pkt_size=1440";;
rtp_vp8) echo_n "-f rtp -payload_type 100 rtp://$IP:$((FIRSTPORT+2))?pkt_size=1440";;
+ rtp_mpegts) echo_n "-f rtp_mpegts rtp://$IP:10000?pkt_size=1440";;
*) exit1 "Unknown target $targets";;
esac
else
@@ -252,6 +254,7 @@ mux() { targets="$1";
case "$target" in
rtp_opus) echo_n "[select=\'a\':f=rtp:payload_type=111]rtp://$IP:$FIRSTPORT?pkt_size=1440";;
rtp_vp8) echo_n "[select=\'v\':f=rtp:payload_type=100]rtp://$IP:$((FIRSTPORT+2))?pkt_size=1440";;
+ rtp_mpegts) echo_n "[f=rtp_mpegts]rtp://$IP:$((FIRSTPORT+2))?pkt_size=1440";;
*) exit1 "Unknown target $target";;
esac
targetcount=$((targetcount-1))
@@ -288,4 +291,4 @@ ffmpeg -hide_banner -threads auto \
$(encode_aac) } \
${HASVIDEO:+\
$(encode_x264 "$VBITRATE" "$SPEED_X264") } \
- -f rtp_mpegts rtp://$IP:10000 }
+ $(mux "$TARGETS_MPEG") }