Last active
July 1, 2020 00:43
-
-
Save yoonbae81/8ae102aa461f4d5940746923ea5046ae to your computer and use it in GitHub Desktop.
Rename photo and movie files with created date from 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
exiftool "-FileName<CreateDate" -d "%Y%m%d %H%M%S.%%e" . | |
exiftool "-FileModifyDate<FileName" "-FileCreateDate<FileName" "-AllDates<FileName" -overwrite_original -P -r -ext jpg ./ | |
exiftool "-FileModifyDate<FileName" "-FileCreateDate<FileName" "-AllDates<FileName" -overwrite_original -P -r -ext mov ./ | |
exiftool "-FileModifyDate<FileName" "-FileCreateDate<FileName" "-AllDates<FileName" -overwrite_original -P -r -ext mp4 ./ | |
# Regenerate broken movie files | |
# exiftool -time:all -a -G0:1 -s "20130607 190850.m4v" | |
# ffmpeg -i "20130607 190850.m4v" -acodec copy -vcodec copy -f mov "20130607 190850.mov" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment