From 784c8eeece8b9ffc224a4ef21f71761d07c50d2f Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 11 May 2017 08:27:46 +0200 Subject: Support only containers avi nut, and apply timestamps only for nut where added to each frame. --- bin/livedump | 32 +++++++++++++------------------- 1 file 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 -- cgit v1.2.3