diff options
author | Jonas Smedegaard <dr@jones.dk> | 2017-05-22 17:50:38 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2017-05-22 17:50:38 +0200 |
commit | 6da10629d8910a1434aee620fc7fd9e8dc0a2a50 (patch) | |
tree | a889a0ad3b15e40fe88f3c9710e69b7ecbb874c5 /bin/stream | |
parent | c8368ef166fe18a97b5bbc7fea6577981461e50a (diff) |
Tidy: Wrap targets.
Diffstat (limited to 'bin/stream')
-rwxr-xr-x | bin/stream | 28 |
1 files changed, 20 insertions, 8 deletions
@@ -243,20 +243,32 @@ mux() { targets="$1"; targetcount=$(echo "$targets" | wc --words) if [ $targetcount -lt 2 ]; then case "$targets" in - hls_mpeg) echo_n "-f hls -hls_time 6 -hls_flags delete_segments -hls_flags discont_start -hls_flags append_list -use_localtime 1 -hls_segment_filename file-%Y%m%d-%s.ts index.m3u8";; - 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";; + hls_mpeg) echo_n "-f hls -hls_time 6 -hls_flags delete_segments" + echo_n " -hls_flags discont_start -hls_flags append_list" + echo_n " -use_localtime 1 -hls_segment_filename file-%Y%m%d-%s.ts" + echo_n " index.m3u8";; + rtp_opus) echo_n "-f rtp -payload_type 111" + echo_n " rtp://$IP:$FIRSTPORT?pkt_size=1440";; + rtp_vp8) echo_n "-f rtp -payload_type 100" + echo_n " rtp://$IP:$((FIRSTPORT+2))?pkt_size=1440";; + rtp_mpegts) echo_n "-f rtp_mpegts" + echo_n " rtp://$IP:10000?pkt_size=1440";; *) exit1 "Unknown target $targets";; esac else echo_n "-f tee " for target in $targets; do case "$target" in - hls_mpeg) echo_n "[f=hls:hls_time=6:hls_flags=delete_segments:hls_flags=discont_start:hls_flags=append_list:use_localtime=1:hls_segment_filename=file-%Y%m%d-%s.ts]index.m3u8";; - 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";; + hls_mpeg) echo_n "[f=hls:hls_time=6:hls_flags=delete_segments" + echo_n ":hls_flags=discont_start:hls_flags=append_list" + echo_n ":use_localtime=1:hls_segment_filename=file-%Y%m%d-%s.ts]" + echo_n "index.m3u8";; + rtp_opus) echo_n "[select=\'a\':f=rtp:payload_type=111]" + echo_n "rtp://$IP:$FIRSTPORT?pkt_size=1440";; + rtp_vp8) echo_n "[select=\'v\':f=rtp:payload_type=100]" + echo_n "rtp://$IP:$((FIRSTPORT+2))?pkt_size=1440";; + rtp_mpegts) echo_n "[f=rtp_mpegts]" + echo_n "rtp://$IP:$((FIRSTPORT+2))?pkt_size=1440";; *) exit1 "Unknown target $target";; esac targetcount=$((targetcount-1)) |