From 9834d95d5f04fa198697851bc18ddae6e00f149d Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 28 Apr 2017 03:50:51 +0200 Subject: Fix save only A/V (not also watermark when only a single true source). --- bin/stream | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/stream b/bin/stream index f20c589..7688f95 100755 --- a/bin/stream +++ b/bin/stream @@ -64,6 +64,7 @@ fi [ -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 +[ "$AINPUT$VINPUT$XINPUT" = "1" ] || TWOSOURCES=1 VSTREAMINDEX=1 [ -n "$AINPUT" ] || VSTREAMINDEX=0 @@ -91,7 +92,7 @@ ffmpeg -hide_banner -threads auto -re \ ${MAYBEVIDEO:+-filter_complex \ "[$VSTREAMINDEX:v]scale=-1:$HEIGHT${WATERMARK:-[v]}${WATERMARK:+[bg]${LOGO:+; [bg][$((VSTREAMINDEX+1)):v]overlay=main_w-overlay_w-20:main_h-overlay_h-20[v]}}"} \ - ${SAVEDIR:+-map ':a?' -map ':v?' \ + ${SAVEDIR:+-map '0:' ${TWOSOURCES:+-map '1:'} \ -codec copy \ -f matroska "file:$SAVEDIR/$(date +%Y%m%d-%H%M%S).mkv"} \ ${MAYBEAUDIO:+-map '0:a' \ -- cgit v1.2.3