From f6c9bd0e9e81210b119df4a608c6c2be274ba2b8 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 5 May 2017 17:44:32 +0200 Subject: Prepare for multiple heights: Map video codecs dynamically. --- bin/stream | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/stream b/bin/stream index e1d0925..686b1c1 100755 --- a/bin/stream +++ b/bin/stream @@ -126,7 +126,7 @@ ffmpeg -hide_banner -threads auto -re \ -segment_list "$SAVESTEM.ffconcat" -segment_list_flags live \ -segment_time 600 -segment_atclocktime 1 -strftime 1 "$SAVESTEM-%H%M.mkv"} \ ${HEIGHTS_WEBM:+\ - ${HASAUDIO:+-map '0:a' }${HASVIDEO:+ -map "[v${height}webm]" } \ + ${HASAUDIO:+-map '0:a' }${HASVIDEO:+$(printf_each ' -map [v%swebm]' "$HEIGHTS_WEBM") } \ ${HASAUDIO:+\ -codec:a libopus -ac "$ACHANNELS" -ar "$AFRAMERATE" -b:a "$ABITRATE" } \ ${HASVIDEO:+\ @@ -140,7 +140,7 @@ ffmpeg -hide_banner -threads auto -re \ "${HASAUDIO:+[select=\'a\':f=rtp:payload_type=111]rtp://$IP:$FIRSTPORT?pkt_size=1200| \ }${HASVIDEO:+[select=\'v\':f=rtp:payload_type=100]rtp://$IP:$((FIRSTPORT+2))?pkt_size=1200}" } \ ${HEIGHTS_MPEG:+\ - ${HASAUDIO:+-map '0:a' }${HASVIDEO:+ -map "[v${height}mpeg]" } \ + ${HASAUDIO:+-map '0:a' }${HASVIDEO:+$(printf_each ' -map [v%smpeg]' "$HEIGHTS_MPEG") } \ ${HASAUDIO:+\ -codec:a aac -strict experimental -ac "$ACHANNELS" -ar 44100 -b:a $((ACHANNELS*64))k } \ ${HASVIDEO:+\ -- cgit v1.2.3