diff options
-rwxr-xr-x | bin/livedump | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/bin/livedump b/bin/livedump index 77daac3..44276e6 100755 --- a/bin/livedump +++ b/bin/livedump @@ -16,9 +16,6 @@ # device, some of which apparently sustaining streams max. 17 minutes. # # Depends: ffmpeg -# -# TODO: Add formats mkv and avi, the latter possibly most suitable: -# http://trac.ffmpeg.org/wiki/Concatenate#binconcat set -eu @@ -28,23 +25,20 @@ 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 ${OUTPUTFORMAT#dv-} \ - -timecode "$(date +%H:%M:%S.00)" -codec copy + set -- -f iec61883 -i auto \ + -f dv -codec copy + SUFFIX=dv + ;; + dv-avi) + set -- -f iec61883 -i auto \ + -f avi -codec copy + SUFFIX=avi + ;; + dv-nut) + set -- -f iec61883 -i auto \ + -f nut -codec copy -f_strict experimental -syncpoints timestamped -write_index 0 + SUFFIX=mkv ;; esac |