Created
October 23, 2016 03:16
-
-
Save tksst/4f43085fd852b73f875863b66c0a558c to your computer and use it in GitHub Desktop.
SONYのビデオカメラで撮影してPlayMemories Homeで取り込んだとき、4GB超えるファイルが結合されるが、その更新時刻をEXIF時刻に変更する。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
touch_date=$( exif --ifd=EXIF --tag=0x9003 -i -m "$1.THM" | perl -pe 's/(\d+):(\d+):(\d+) (\d+):(\d+):(\d+)/$1$2$3$4$5.$6/' ) | |
target_file="$1.mp4" | |
echo "target file: ${target_file}" | |
echo "date: ${touch_date}" | |
touch -t "$touch_date" "$target_file" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment