summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/livedump21
1 files changed, 18 insertions, 3 deletions
diff --git a/bin/livedump b/bin/livedump
index 1485621..77daac3 100755
--- a/bin/livedump
+++ b/bin/livedump
@@ -6,8 +6,10 @@
#
# Examples: livedump
# livedump dv ./dump /%Y%m%d/%H%M%S /%H%M%S
+# livedump dv-avi
#
-# (examples are effectively identical, the latter showing defaults)
+# First two examples effectively identical, using defaults.
+# Third example using AVI container instead
#
# Description: Save live source to file and append if interupted.
# By default captures IEC61883 DVCPRO stream from IEEE1394 (Firewire)
@@ -26,14 +28,27 @@ SESSIONPATTERN=${3:-/%Y%m%d/%H%M%S}
SEGMENTPATTERN=${4:-/%H%M%S}
case $FORMAT in
+ dv|dv-*)
+ INPUTFORMAT=dv
+ SUFFIX=${FORMAT#dv-}
+ OUTPUTFORMAT=${FORMAT#dv-}
+ ;;
+esac
+
+case $SUFFIX in
+ mkv) OUTPUTFORMAT=matroska;;
+esac
+
+case $INPUTFORMAT in
dv)
set -- \
-f iec61883 -i auto \
- -f dv -timecode "$(date +%H:%M:%S.00)" -codec copy
- SUFFIX=dv
+ -f ${OUTPUTFORMAT#dv-} \
+ -timecode "$(date +%H:%M:%S.00)" -codec copy
;;
esac
+
LINKPATH="$BASESTEM.$SUFFIX"
SESSIONSTEM=$(date +"$SESSIONPATTERN")
SESSIONPATH="$BASESTEM$SESSIONSTEM.$SUFFIX"