trying to use exiftool -all= to delete all data, but it's not working

Started by DJDiva, April 11, 2016, 01:52:01 PM

Previous topic - Next topic

DJDiva

I have an image that for some reason google photos keeps thinking was created today (even though the original exif date was from 2008). I am trying to use exiftool -all=  to delete all tags/meta data on the file to manually add it back in. However, when I run the command it says: 1 image files updated, but then when I run exiftool -s all of that data is still in the file. It is not actually deleting any data from the file.

Phil Harvey

If this is a JPEG image, then the metadata should be deleted.  Are you looking at system information?  Use the -G1 option when extracting to see.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

DJDiva

After I did exiftool -all= image.jpg

I entered exiftool -s image.jpg to see if there was still any data in the file - and it was all still there.

I'm also having the same trouble on .mp4 files.

StarGeek

It the data you are seeing are similar to this output:
---- System ----
FileName                        : Test3.jpg
Directory                       : X:/!temp
FileSize                        : 447 kB
FileModifyDate                  : 2016:03:30 14:06:44-07:00
FileAccessDate                  : 2016:03:30 14:06:44-07:00
FileCreateDate                  : 2016:02:08 16:09:19-08:00
FilePermissions                 : rw-rw-rw-


then you are not seeing meta data in the file.  This info is part of the underlying filesystem.  This info isn't transferred when you upload the file to Google Photos.   My Apologies, Google is grabbing the system timestamp if there isn't any other info in the file to use when I uploaded files via drag and drop onto the Firefox.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

ExifTool only has limited write ability for MP4 videos, and can't be used to remove metadata from these files.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

I did some testing to try and figure out the priority of which metadata Google Photos uses as the date for images.  Here are the results from highest priority to lowest.

IPTC:DateCreated + IPTC:TimeCreated
EXIF:DateTimeOriginal
XMP:DateTimeOriginal
EXIF:CreateDate
XMP:CreateDate
EXIF:ModifyDate
XMP:ModifyDate
GPS:GPSDateStamp + GPS:GPSTimeStamp + TimeZone Modifier (-6 hours in my test)
System:FileModifyDate +Timezone modifier.  This one was odd, as it was different than the gps timezone modifier.  My computer's current timezone is -7 hours, but Google Photos set it to -4 hours and adjusted the time.  So, the file was set to 12:20 and changed it to 15:20.

Personally, I would suggest making sure that EXIF:DateTimeOriginal is set properly as that is a better standard in my opinion.   IPTC:DateCreated + IPTC:TimeCreated are not set as often in most pictures straight out of a camera in my experience.

Edit:  Checking for other metadata.  Google Photos seems to ignore everything else except a description.  It only checks IPTC:Caption-Abstract and XMP:Description, in that order.

Editing the data online, then downloading the image does not seem to change the metadata that was originally uploaded.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

Hi StarGeek,

You might consider adding this useful information to your Program metadata to TAG translation thread.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

I was going to, but realized  that the info there was which tags were being written to, while this is about which tags are being read.  I'll probably add it there anyway, though.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

DJDiva

Thank you for the information! The DateTimeOriginal was set properly and so was CreateDate and ModifyDate. I don't know why google photos was ignoring these. I set all of them to 00 and then reset them to the correct date/time. After I did this google photos recognized the proper time stamp.

DJDiva

Actually, I typed too soon - I thought making the update got google photos to recognize the proper date/time, but it still did not. This is the data in the file. All of the data is ignored and google photos puts today's date on the item and the wrong time stamp (it's 11:56am EDT and the time stamp in photos is 3:55pm) :

FileSize                        : 30 MB
FileModifyDate                  : 2008:11:14 10:00:00-05:00
FileAccessDate                  : 2016:04:12 11:53:49-04:00
FileInodeChangeDate             : 2016:04:12 11:52:36-04:00
FilePermissions                 : rw-r--r--
FileType                        : MP4
FileTypeExtension               : mp4
MIMEType                        : video/mp4
MajorBrand                      : MP4  Base Media v1 [IS0 14496-12:2003]
MinorVersion                    : 0.0.1
CompatibleBrands                : isom, avc1
MovieHeaderVersion              : 0
TimeScale                       : 600
Duration                        : 0:01:36
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                 : 2008:11:14 10:00:16
TrackModifyDate                 : 2008:11:14 10:00:16
TrackID                         : 1
TrackDuration                   : 0:01:36
TrackLayer                      : 0
TrackVolume                     : 0.00%
GraphicsMode                    : srcCopy
OpColor                         : 0 0 0
CompressorID                    : avc1
SourceImageWidth                : 1920
SourceImageHeight               : 1080
BitDepth                        : 24
BufferSize                      : 53805
MaxBitrate                      : 3839168
AverageBitrate                  : 2515344
MatrixStructure                 : 1 0 0 0 1 0 0 0 1
MediaHeaderVersion              : 0
MediaCreateDate                 : 2008:11:14 10:00:16
MediaModifyDate                 : 2008:11:14 10:00:16
MediaTimeScale                  : 48000
MediaDuration                   : 0:01:36
MediaLanguageCode               : und
HandlerType                     : Audio Track
HandlerDescription              : VID00067.mp4.vc.aac#audio - Imported with GPAC 0.5.1-DEV-rev4102M
Balance                         : 0
AudioFormat                     : mp4a
AudioChannels                   : 1
AudioBitsPerSample              : 16
MovieDataSize                   : 31754792
MovieDataOffset                 : 53195
XMPToolkit                      : Image::ExifTool 9.99
DateTimeOriginal                : 2008:11:14 10:00:16
ImageHeight                     : 1080
ImageWidth                      : 1920
XResolution                     : 72
YResolution                     : 72
CreateDate                      : 2008:11:14 10:00:16
ModifyDate                      : 2008:11:14 10:00:16
AudioSampleRate                 : 48000
VideoFrameRate                  : 30
AvgBitrate                      : 2.64 Mbps
ImageSize                       : 1920x1080
Megapixels                      : 2.1
Rotation                        : 0

Phil Harvey

This is an MP4 video, which is very different.  We haven't established what date/time information Google reads from these.

Also, it would be more useful to see the output of this command so can see all of the date/time information and where it is stored:

exiftool -a -G1 -time:all FILE

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

DJDiva

This is the output from that command:

[System]        File Modification Date/Time     : 2008:11:14 10:00:00-05:00
[System]        File Access Date/Time           : 2016:04:12 13:04:59-04:00
[System]        File Inode Change Date/Time     : 2016:04:12 12:06:46-04:00
[QuickTime]     Create Date                     : 2008:11:14 10:00:16
[QuickTime]     Modify Date                     : 2008:11:14 10:00:16
[Track1]        Track Create Date               : 2008:11:14 10:00:16
[Track1]        Track Modify Date               : 2008:11:14 10:00:16
[Track1]        Media Create Date               : 2008:11:14 10:00:16
[Track1]        Media Modify Date               : 2008:11:14 10:00:16
[Track2]        Track Create Date               : 2008:11:14 10:00:16
[Track2]        Track Modify Date               : 2008:11:14 10:00:16
[Track2]        Media Create Date               : 2008:11:14 10:00:16
[Track2]        Media Modify Date               : 2008:11:14 10:00:16
[XMP-exif]      Date/Time Original              : 2008:11:14 10:00:16
[XMP-xmp]       Create Date                     : 2008:11:14 10:00:16
[XMP-xmp]       Modify Date                     : 2008:11:14 10:00:16

Phil Harvey

OK.  CreateDate and ModifyDate exist in both QuickTime and the XMP metadata.  But they have the same values, so this shouldn't pose a problem.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

I tested out a small mp4 and it looks like the only item that Google Photos is reading is the System:FileModifyDate.  The date that Google Photos showed was Dec 25, 2015, 9:46 AM and here's the time data in the mp4. 

---- System ----
FileModifyDate                  : 2015:12:25 09:46:15-08:00
FileAccessDate                  : 2015:12:25 09:46:15-08:00
FileCreateDate                  : 2016:04:12 13:01:11-07:00
---- QuickTime ----
CreateDate                      : 2015:12:25 15:46:15
ModifyDate                      : 2015:12:25 15:46:15
---- Track1 ----
TrackCreateDate                 : 0000:00:00 00:00:00
TrackModifyDate                 : 2015:12:25 14:46:15
MediaCreateDate                 : 0000:00:00 00:00:00
MediaModifyDate                 : 2015:12:25 16:46:15
---- Track2 ----
TrackCreateDate                 : 2015:12:25 15:46:15
TrackModifyDate                 : 2015:12:25 14:46:15
MediaCreateDate                 : 2015:12:25 15:46:15
MediaModifyDate                 : 2015:12:25 16:46:15
---- XMP-microsoft ----
DateAcquired                    : 2010:10:10
---- XMP-exif ----
DateTimeOriginal                : 2014:11:11 11:11:11
---- XMP-xmp ----
CreateDate                      : 2003:03:03 03:03:03
MetadataDate                    : 2011:11:11 11:11:11-08:00


The only matching item is FileModifyDate (and FileAccessDate, which I believe ExifTool can't change and will automatically change to be the same as FileModifyDate).

It looks like your only options for mp4s is to set FileModifyDate.  So you could use ExifTool "-FileModifyDate<CreateDate" -ext mp4 to set the dates of your mp4s before you upload them.

Edit: Actually, what OS are you using.  The info I mentioned above is for windows and upon reexamining your output, I'm guessing that you're not using Windows, since I've never seen System:FileInodeChangeDate/Time before.  Also, your example has the correct FileModifyDate, but it sounds like it wasn't used.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

DJDiva

I'm on a Mac. It's strange (and really annoying) google photos ignores what is clearly the correct data.

Google photos finally added the feature to let you edit the date/time stamp. Until recently you couldn't edit date/time at all - which was terrible since google photos ignores the proper exif data that I worked hard to make sure it was accurate. Now I can at least manually update it, but it's a complete pain to update each and every video and photo in google photos to show the proper date/time stamp.