From 38fa86129b1128f7d4eb826b1b9803e33a3cc8ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Wed, 10 Aug 2016 08:49:54 +0000 Subject: [PATCH] added check for movies for avprobe --- scripts/mvfotos.conf | 1 + scripts/mvfotos.in | 3 +++ 2 files changed, 4 insertions(+) diff --git a/scripts/mvfotos.conf b/scripts/mvfotos.conf index bc5c4dd..4816836 100644 --- a/scripts/mvfotos.conf +++ b/scripts/mvfotos.conf @@ -48,6 +48,7 @@ path[9]="bilder3d.mpo" # file name extensions that contain exif information exif="jpg jps mpo jpeg" +movie="mp4 mov 3gp avi m2t mpeg mpg mts mxf" # number of the clipinfo file type, ${ext[$cpi]} must contain "cpi" cpi=4 diff --git a/scripts/mvfotos.in b/scripts/mvfotos.in index 45572c8..e06b956 100755 --- a/scripts/mvfotos.in +++ b/scripts/mvfotos.in @@ -44,6 +44,9 @@ while [ $# -gt 0 ]; do postfix=$(basename "$1" | tr '[:upper:]' '[:lower:]' | sed 's,[/ ],_,g;s,[][(){}],,g') type=${globaltype:-${postfix##*.}} date= + if [ "${movie//${type}/}" != "${movie}" ]; then + date=$(avprobe "$1" 2>&1 | sed -n 's,^ *creation_time *: *\([0-9][0-9][0-9][0-9]\)-\([0-9][0-9]\)-\([0-9][0-9]\) *\([0-9][0-9]\):\([0-9][0-9]\):\([0-9][0-9]\) *$,\1\2\3-\4\5\6,p' | sort | uniq | head -1) + fi if [ "${exif//${type}/}" != "$exif" ]; then date=$(exif -t 0x132 "$1" | sed -n 's/.*Value: \([0-9]*\):\([0-9]*\):\([0-9]*\) \([0-9]*\):\([0-9]*\):\([0-9]*\)/\1\2\3-\4\5\6/p' | uniq) if [ -z "$date" ]; then