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