diff options
Diffstat (limited to 'bin/livedump')
-rwxr-xr-x | bin/livedump | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/livedump b/bin/livedump index 3120aff..6e4c0b8 100755 --- a/bin/livedump +++ b/bin/livedump @@ -1,6 +1,6 @@ #!/bin/sh # -# Usage: livedump [FORMAT [BASEPATH [SESSIONPATTERN [SEGMENTPATTERN]]]] +# Usage: livedump [FORMAT [BASESTEM [SESSIONPATTERN [SEGMENTPATTERN]]]] # # Patterns are fed through "date +PATTERN" # @@ -21,7 +21,7 @@ set -eu FORMAT=${1:-dv} -BASEPATH=${2:-./dump} +BASESTEM=${2:-./dump} SESSIONPATTERN=${3:-/%Y%m%d/%H%M%S} SEGMENTPATTERN=${4:-/%H%M%S} @@ -34,16 +34,16 @@ case $FORMAT in ;; esac -LINKPATH="$LINKSTEM.$SUFFIX" +LINKPATH="$BASESTEM.$SUFFIX" SESSIONSTEM=$(date +"$TARGETPATTERN") -SESSIONPATH="$SESSIONSTEM.$SUFFIX" +SESSIONPATH="$BASESTEM$SESSIONSTEM.$SUFFIX" mkdir -p "$(dirname "$LINKPATH" "$SESSIONPATH")" touch "$SESSIONPATH" [ -z "$LINKPATH" ] | ln -fs "$SESSIONPATH" "$LINKPATH" while true; do SEGMENTSTEM=$(date +"$SEGMENTPATTERN") - LOGPATH="$BASEPATH$SESSIONSTEM$SEGMENTSTEM.log" + LOGPATH="$BASESTEM$SESSIONSTEM$SEGMENTSTEM.log" mkdir -p "$LOGPATH" FFREPORT="file=$LOGPATH" \ ffmpeg -hide_banner "$@" pipe: \ |