diff options
author | Jonas Smedegaard <dr@jones.dk> | 2017-05-11 08:27:46 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2017-05-11 08:27:46 +0200 |
commit | 784c8eeece8b9ffc224a4ef21f71761d07c50d2f (patch) | |
tree | 6485610b50e046fb38abb90f4d3cc215a376291b | |
parent | a05dc46d611abb0ff231294c2bd66d40acb99512 (diff) |
Support only containers avi nut, and apply timestamps only for nut where added to each frame.
-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 |