diff options
author | Jonas Smedegaard <dr@jones.dk> | 2017-05-04 13:54:33 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2017-05-04 13:54:33 +0200 |
commit | 30d52bfd1b2451f7223b8888ddbbff63d3d76dd5 (patch) | |
tree | 347ad4f0ad2ae95e58347b03de0017ba2daece0e /bin | |
parent | a51bf70c4a4c08a400e52bd6d5414955cc03bf32 (diff) |
Use pseudo-format tee.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/stream | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -99,14 +99,16 @@ ffmpeg -hide_banner -threads auto -re \ -f segment -segment_format matroska -segment_format_options live=1:reserve_index_space=512kB \ -segment_list "$SAVESTEM.ffconcat" -segment_list_flags live \ -segment_time 600 -segment_atclocktime 1 -strftime 1 "$SAVESTEM-%H%M.mkv"} \ - ${HASAUDIO:+-map '0:a' \ - -codec:a libopus -ac "$ACHANNELS" -ar "$AFRAMERATE" -b:a "$ABITRATE" \ - -f rtp -payload_type 111 "rtp://$IP:$FIRSTPORT?pkt_size=1200"} \ - ${HASVIDEO:+-map '[v]' \ + ${HASAUDIO:+-map '0:a' } ${HASVIDEO:+-map '[v]' } \ + ${HASAUDIO:+ + -codec:a libopus -ac "$ACHANNELS" -ar "$AFRAMERATE" -b:a "$ABITRATE" } \ + ${HASVIDEO:+\ -pix_fmt yuv420p \ -codec:v vp8 -quality realtime -deadline 1000000 -cpu-used 15 \ -b:v "$VBITRATE" -minrate "$VBITRATE" -maxrate "$VBITRATE" \ -undershoot-pct 95 -bufsize $((6000*VBITRATE/1000)) -rc_init_occupancy $((4000*VBITRATE/1000)) \ -max-intra-rate 0 \ - -qmin 4 -qmax 56 \ - -f rtp -payload_type 100 "rtp://$IP:$((FIRSTPORT+2))?pkt_size=1200"} + -qmin 4 -qmax 56 } \ + -f tee \ + "${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}" |