I use Dropbox to automatically upload my iPhone photos and then Hazel to rename and file them based on Date and GPS Location.
Using the "mdls" command in Terminal I can see that Dropbox changes the Date information to the time/date of import to Dropbox.
I have written a bash script to "touch" each file with exiftool's "CreateDate" Tag and this solves the problem of Dropbox changing the dates.
Additionally, when the file is a .MOV, the "mdls" results have no GPS data even though an "exiftool" of the file reveals that the info is still there. (.JPG files HAVE the GPS data in "mdls".)
I cannot figure out how to get the exiftool GPS tags into the "mdls" results of the file on Dropbox.
This is important because Hazel uses the Spotlight MDLS info for renaming my files with the date and GPS location.
Does anyone have any suggestions how to get the exiftool GPS data into the Spotlight-able metadata of the file?
ExifTool can not do this, but it sounds like you may be able to script it yourself using ExifTool and the mdls command together.
But I thought spotlight should search EXIF information, no?
- Phil
Negative, Spotlight doesn't unfortunately.
I took a test movie.
Here is the exiftool result...
ExifToolVersion : 9.57
FileName : IMG_0829.MOV
Directory : /Users/kevin/Desktop
FileSize : 11 MB
FileModifyDate : 2014:05:09 14:51:36-07:00
FileAccessDate : 2014:05:09 14:55:34-07:00
FileInodeChangeDate : 2014:05:09 14:53:11-07:00
FilePermissions : rw-r--r--
FileType : MOV
MIMEType : video/quicktime
MajorBrand : Apple QuickTime (.MOV/QT)
MinorVersion : 0.0.0
CompatibleBrands : qt
MovieDataSize : 11758329
MovieDataOffset : 36
MovieHeaderVersion : 0
ModifyDate : 2014:05:09 21:51:36
TimeScale : 600
Duration : 4.34 s
PreferredRate : 1
PreferredVolume : 100.00%
PreviewTime : 0 s
PreviewDuration : 0 s
PosterTime : 0 s
SelectionTime : 0 s
SelectionDuration : 0 s
CurrentTime : 0 s
NextTrackID : 3
TrackHeaderVersion : 0
TrackCreateDate : 2014:05:09 21:51:31
TrackModifyDate : 2014:05:09 21:51:36
TrackID : 1
TrackDuration : 4.34 s
TrackLayer : 0
TrackVolume : 0.00%
ImageWidth : 1920
ImageHeight : 1080
CleanApertureDimensions : 1920x1080
ProductionApertureDimensions : 1920x1080
EncodedPixelsDimensions : 1920x1080
GraphicsMode : ditherCopy
OpColor : 32768 32768 32768
CompressorID : avc1
SourceImageWidth : 1920
SourceImageHeight : 1080
XResolution : 72
YResolution : 72
CompressorName : H.264
BitDepth : 24
VideoFrameRate : 24
CameraIdentifier : Back
FrameReadoutTime : 31104 microseconds
MatrixStructure : 1 0 0 0 1 0 0 0 1
MediaHeaderVersion : 0
MediaCreateDate : 2014:05:09 21:51:31
MediaModifyDate : 2014:05:09 21:51:36
MediaTimeScale : 44100
MediaDuration : 4.37 s
MediaLanguageCode : und
Balance : 0
HandlerClass : Data Handler
HandlerVendorID : Apple
HandlerDescription : Core Media Data Handler
AudioFormat : mp4a
AudioChannels : 1
AudioBitsPerSample : 16
AudioSampleRate : 44100
PurchaseFileFormat : mp4a
Model : iPad
SoftwareVersion : 7.1.1
CreateDate : 2014:05:09 14:51:31-07:00
GPSCoordinates : 33 deg 30' 27.36" N, 112 deg 1' 54.12" W, 358 m Above Sea Level
Make : Apple
HandlerType : Metadata Tags
Make-und-US : Apple
CreationDate-und-US : 2014:05:09 14:51:31-07:00
GPSCoordinates-und-US : 33 deg 30' 27.36" N, 112 deg 1' 54.12" W, 358 m Above Sea Level
Software-und-US : 7.1.1
Model-und-US : iPad
CreationDate : 2014:05:09 14:51:31-07:00
Software : 7.1.1
AvgBitrate : 21.7 Mbps
GPSAltitude : 358 m
GPSAltitudeRef : Above Sea Level
GPSLatitude : 33 deg 30' 27.36" N
GPSLongitude : 112 deg 1' 54.12" W
GPSPosition : 33 deg 30' 27.36" N, 112 deg 1' 54.12" W
ImageSize : 1920x1080
Rotation : 90
Here is the mdls result...
kMDItemAudioBitRate = 64
kMDItemAudioChannelCount = 1
kMDItemCodecs = (
"H.264",
AAC
)
kMDItemContentCreationDate = 2014-05-09 21:51:36 +0000
kMDItemContentModificationDate = 2014-05-09 21:51:36 +0000
kMDItemContentType = "com.apple.quicktime-movie"
kMDItemContentTypeTree = (
"com.apple.quicktime-movie",
"public.movie",
"public.audiovisual-content",
"public.data",
"public.item",
"public.content"
)
kMDItemDateAdded = 2014-05-09 21:52:56 +0000
kMDItemDisplayName = "IMG_0829.MOV"
kMDItemDurationSeconds = 4.34
kMDItemEncodingApplications = (
"7.1.1"
)
kMDItemFSContentChangeDate = 2014-05-09 21:51:36 +0000
kMDItemFSCreationDate = 2014-05-09 21:51:36 +0000
kMDItemFSCreatorCode = ""
kMDItemFSFinderFlags = 0
kMDItemFSHasCustomIcon = (null)
kMDItemFSInvisible = 0
kMDItemFSIsExtensionHidden = 0
kMDItemFSIsStationery = (null)
kMDItemFSLabel = 0
kMDItemFSName = "IMG_0829.MOV"
kMDItemFSNodeCount = (null)
kMDItemFSOwnerGroupID = 20
kMDItemFSOwnerUserID = 502
kMDItemFSSize = 11764329
kMDItemFSTypeCode = ""
kMDItemKind = "QuickTime movie"
kMDItemLogicalSize = 11764329
kMDItemMediaTypes = (
Video,
Sound
)
kMDItemPhysicalSize = 11767808
kMDItemPixelHeight = 1920
kMDItemPixelWidth = 1080
kMDItemProfileName = "HD (1-1-1)"
kMDItemStreamable = 0
kMDItemTotalBitRate = 21501
kMDItemVideoBitRate = 21436
There is NO gps info in the mdls even though there would be if the file was a .jpg.
I tried to do a spotlight search of the folder in which the movie resides (the ONLY movie in the folder).
I used "Kind is movie" and "Longitude" and spotlight found nothing.
I used every variation of longitude: equals, is greater than, is less than with the exact longitude of the movie including negative and positive values to no avail.
I have tried using the "xattr -w" command to write kMDItemLatitude (Longitude, Altitude) into the mdls but it writes it in as a string (in double quotation marks), not a value.
I tried converting the gps info to hex and using "xattr -wx" and that does not work.
I don't have any other ideas. I suggest appealing to an Apple forum. The ExifTool forum probably isn't the best place to ask about Spotlight/mdls/GPS problems.
- Phil