summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/stream3
1 files changed, 2 insertions, 1 deletions
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' \