diff options
author | Jonas Smedegaard <dr@jones.dk> | 2017-04-28 03:50:51 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2017-04-28 03:50:51 +0200 |
commit | 9834d95d5f04fa198697851bc18ddae6e00f149d (patch) | |
tree | 75977886e6a5ca1ba2a9665d22969dc9820d251f | |
parent | c9889f639d8d4a48e3358816c1f7dba923b96954 (diff) |
Fix save only A/V (not also watermark when only a single true source).
-rwxr-xr-x | bin/stream | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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' \ |