summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-05-10 13:19:51 +0200
committerJonas Smedegaard <dr@jones.dk>2017-05-10 13:19:51 +0200
commita05dc46d611abb0ff231294c2bd66d40acb99512 (patch)
tree1dced5217097378d46ce96cf1344664d30eeed23
parent100d12d8fd940bd03fd0e7f1d6ae53afaa0106cd (diff)
Support use of container.
-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"