diff options
author | Jonas Smedegaard <dr@jones.dk> | 2017-05-04 13:49:20 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2017-05-04 13:49:20 +0200 |
commit | a51bf70c4a4c08a400e52bd6d5414955cc03bf32 (patch) | |
tree | 8367f14caca7000d9b832bbc28486a7d3a45b437 /bin | |
parent | 09c05220903194dbd61c0a1fae14cc87e82bfdc6 (diff) |
Tidy variable names: Rename MAYBEAUDIO,MAYBEVIDEO → HASAUDIO,HASVIDEO.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/stream | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -62,8 +62,8 @@ fi [ -z "$VINPUT" ] || [ $VINPUT -eq 1 ] || exit1 "Too many arguments: Max. 1 video source" [ -z "$WINPUT" ] || [ $WINPUT -eq 1 ] || exit1 "Too many arguments: Max. 1 watermark source" [ -z "$XINPUT" ] || [ $XINPUT -eq 1 ] || exit1 "Too many arguments: Max. 1 multimedia source" -[ -n "$NOAUDIO" ] || [ -z "$AINPUT$XINPUT" ] || MAYBEAUDIO=1 -[ -n "$NOVIDEO" ] || [ -z "$VINPUT$XINPUT" ] || MAYBEVIDEO=1 +[ -n "$NOAUDIO" ] || [ -z "$AINPUT$XINPUT" ] || HASAUDIO=1 +[ -n "$NOVIDEO" ] || [ -z "$VINPUT$XINPUT" ] || HASVIDEO=1 [ "$AINPUT$VINPUT$XINPUT" = "1" ] || TWOSOURCES=1 VSTREAMINDEX=1 [ -n "$AINPUT" ] || VSTREAMINDEX=0 @@ -91,7 +91,7 @@ ffmpeg -hide_banner -threads auto -re \ ${IIDC:+-f libdc1394 -video_size 640x480 -framerate 15 -thread_queue_size 256 -i "$IIDC"} \ ${VFILE:+-i "$VFILE"} \ ${LOGO:+-i "$LOGO"} \ - ${MAYBEVIDEO:+-filter_complex \ + ${HASVIDEO:+-filter_complex \ "[$VSTREAMINDEX:v]scale=-2:$HEIGHT${WATERMARK:-[v]}${WATERMARK:+[bg]${LOGO:+; [bg][$((VSTREAMINDEX+1)):v]overlay=main_w-overlay_w-20:main_h-overlay_h-20[v]}}"} \ ${SAVEDIR:+-map '0:' ${TWOSOURCES:+-map '1:'} \ @@ -99,10 +99,10 @@ 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"} \ - ${MAYBEAUDIO:+-map '0:a' \ + ${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"} \ - ${MAYBEVIDEO:+-map '[v]' \ + ${HASVIDEO:+-map '[v]' \ -pix_fmt yuv420p \ -codec:v vp8 -quality realtime -deadline 1000000 -cpu-used 15 \ -b:v "$VBITRATE" -minrate "$VBITRATE" -maxrate "$VBITRATE" \ |