From 42193b81bd1bcdf47b2dea81c6df03ec2d90faea Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 22 May 2017 15:31:41 +0200 Subject: Use mux() for mpeg (not only webm). --- bin/stream | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bin') 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") } -- cgit v1.2.3