-
Notifications
You must be signed in to change notification settings - Fork 14
/
was_jpg_now_mp4.args
40 lines (30 loc) · 1.16 KB
/
was_jpg_now_mp4.args
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Fill in from Google's JSON for those MP4s that were originally JPEGs
# Start by looking at all MP4s
-ext
mp4
# Recursive
-r
# Show processed filenames
-v0
# Check if the corresponding JSON exists
-if
(-e "${Directory}/${Filename;s/\.mp4/.jpg.json/i}")
# Attempt to modify media only if the info doesn't already exist
-if
($Filetype eq "MP4" and not $quicktime:TrackCreateDate) or ($Filetype eq "MP4" and $quicktime:TrackCreateDate eq "0000:00:00 00:00:00")
# Attempt to read in the previous jpg.json. %f is without the extension
-tagsfromfile
%d%f.jpg.json
#
# Write out the tags. Use ConvertUnixTime to try and convert the UTC timestamp
# to a reasonable local EXIF string.
#
# EXIF for regular JPG photos
-AllDates<${PhotoTakenTimeTimestamp;$_=ConvertUnixTime($_,1)}
# Quicktime / MP4. Assume that timestamp is in UTC.
-QuickTime:TrackCreateDate<${PhotoTakenTimeTimestamp;$_=ConvertUnixTime($_,0)}
-QuickTime:TrackModifyDate<${PhotoTakenTimeTimestamp;$_=ConvertUnixTime($_,0)}
-QuickTime:MediaCreateDate<${PhotoTakenTimeTimestamp;$_=ConvertUnixTime($_,0)}
-QuickTime:MediaModifyDate<${PhotoTakenTimeTimestamp;$_=ConvertUnixTime($_,0)}
# Clobber everything
-overwrite_original