diff options
author | Jonas Smedegaard <dr@jones.dk> | 2017-05-22 15:31:41 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2017-05-22 15:31:41 +0200 |
commit | 42193b81bd1bcdf47b2dea81c6df03ec2d90faea (patch) | |
tree | e2b3707235f3473da277793e059d6a3c478d902f | |
parent | 414d5a435051e65b0bd6420e6fb2c3eae0101417 (diff) |
Use mux() for mpeg (not only webm).
-rwxr-xr-x | bin/stream | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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") } |