Set Video File Name to Date Made

Using: Linux, exiftool, mediainfo
Requires- Intermediate LINUX skills and Google.
Further Reference:
You MAY want to clean up file naming with DETOX

I have lots of small MP4 video files with arbitrary sequence numbers like:
dji_001.mp4, dji_002.mp4.. etc etc- making it hard to divide them into folders later for particular filmed events with maybe a dozen files with similar time stamps… The file dates themselves are unreliable as it may be much later and the date of the copy not the filming.
These video files contain realistic  internal metadata of all sorts tagged when the video was made that’s VERY interesting including GPS info, altitude and way more:
Hey, try it yourself!
for any movie
Note: that EXIF Timestamps are very reasonably in UTC so consider that when you wonder why your videos are tagged hours off–
Unless you are near 0 longitude (Western Europe..) ; )
My exif data DOES store lat/long but that’s another Project : )

To batch rename an entire folder of arbitrarily named files and recursively, everything below::
(No Line Break, BTW!)

exiftool “‘-filename<CreateDate” -d %Y_%b_%d_%a_@_%I:%M_%p%%-c.%%le -r -ext mp4 *

(I fear Spaces so tend to use the Underbar _ character)

exiftool “-filename<CreateDate” -d %Y-%b-%d-%a_@_%I:%M:%S_%p%%-c.%%le -r -ext mp4 *

(Note: If meant for Windows these filenames contain things like Colon “:” which it May NOT like)

exiftool “-filename<CreateDate” -d %Y_%b_%d_%a_%I.%M.%S_%p%%-c.%%le -r -ext mp4 *
gives: 2018_Aug_13_Mon_07.44.08_PM.mp4

the DATE/TIME variables can be studied by using:
man date
man exiftool
will remind you the “-r” option is to be Recursive, which you may not want… and more.

exiftool can also work on still images. Very useful!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.