Google Photos metadata

Started by wywh, September 17, 2020, 01:07:26 PM

Previous topic - Next topic

wywh

FYI. I maintain a public Google Photos album and have tried to insert all possible metadata to the images and lately also to movies.

With .jpg images ExifIFD:DateTimeOriginal works down to 1902-0101-0000-00. I have crowded images older than that at around January 1902 and set the filename and IPTC/XMP Caption to indicate the correct date.

I guess EXIF does not support earlier dates and that there are no other tags that Google Photos would support in .jpg? At least exiftool does not write Keys:CreationDate to .jpg.

With movies I must be aware of some date limits:

Movies after 1970-0101-0000-00 (limit at UTC midnight) work fine with only QuickTime tags with the "-api QuickTimeUTC=1" option.

Movies before 1970 then obey the Keys:CreationDate. .m4v and .mov display correct time combined with the timezone but in .mp4 the timezone must be subtracted from the time. I wonder why .mp4 behaves differently?

In my location .mp4 (not .m4v and .mov) before 1921-0501-0000-00 also need 20 minutes 11 seconds added to the previously calculated time combined with a modified timezone +01:40. This seems to be because that day our local time was adjusted forward 20 minutes 10,9 seconds. Many other European countries did a similar adjustment in the late 1800's. The computer clock seems to somehow check that date limit and for a long time I wondered if this was some kind of bug in older images and movies.

Before year 1902 Keys:CreationDate works even to year 0001 but then Google Photos might randomly display a wrong date and even if it displays the correct date, it might sort that movie incorrectly.

For example, the following .jpg, .m4v, .mov and .mp4 groups from 1970, 1921 and 1902 are sorted at the same time via the following tags:

exiftool -a -G1 -s -api QuickTimeUTC=1 -time:all .

======== 1970-0101-1200-00.jpg
[ExifIFD]       DateTimeOriginal                : 1970:01:01 12:00:00
======== 1970-0101-1200-00.m4v
[QuickTime]     CreateDate                      : 1970:01:01 12:00:00+02:00
======== 1970-0101-1200-00.mov
[QuickTime]     CreateDate                      : 1970:01:01 12:00:00+02:00
======== 1970-0101-1200-00.mp4
[QuickTime]     CreateDate                      : 1970:01:01 12:00:00+02:00


======== 1921-0501-1200-00.jpg
[ExifIFD]       DateTimeOriginal                : 1921:05:01 12:00:00
======== 1921-0501-1200-00.m4v
[Keys]          CreationDate                    : 1921:05:01 12:00:00+02:00
======== 1921-0501-1200-00.mov
[Keys]          CreationDate                    : 1921:05:01 12:00:00+02:00
======== 1921-0501-1200-00.mp4
[Keys]          CreationDate                    : 1921:05:01 10:00:00+02:00


======== 1902-0101-1200-00.jpg
[ExifIFD]       DateTimeOriginal                : 1902:01:01 12:00:00
======== 1902-0101-1200-00.m4v
[Keys]          CreationDate                    : 1902:01:01 12:00:00+02:00
======== 1902-0101-1200-00.mov
[Keys]          CreationDate                    : 1902:01:01 12:00:00+02:00
======== 1902-0101-1200-00.mp4
[Keys]          CreationDate                    : 1902:01:01 10:20:11+01:40


I set GPS for those movies that have a somewhat fixed location with the following command (Google Photos does not display elevation so that part can be omitted):

exiftool -m -P -overwrite_original_in_place -Keys:GPSCoordinates='29.9769, 31.1351, 50.5 m Above Sea Level' .

Currently Google Photos does not import ItemList:Description so I must manually paste the Description after uploading the movie.

Google Photos has poor search options for even .jpg Keywords inside shared albums so I have not used the ItemList:Keyword tag for movies.

- Matti

StarGeek

Quote from: wywh on September 17, 2020, 01:07:26 PM
I guess EXIF does not support earlier dates and that there are no other tags that Google Photos would support in .jpg?

EXIF does support dates earlier than that, though I've never checked to see how early.  As a test, I just set the tag to 0001:01:01 00:00:00 and there was no problem.

Whether Google photos supports that early of a date is another matter.

These are the time stamps that Google photos supports in image files (haven't checked videos) as of the last time I checked in 2018 (looks like I'm due to check again)
IPTC:DateCreated+IPTC:TimeCreated
EXIF:DateTimeOriginal
XMP-photoshop:DateCreated
XMP-exif:DateTimeOriginal
IPTC:DigitalCreationDate+IPTC:DigitalCreationTime
EXIF:CreateDate
XMP-xmp:CreateDate
XMP-exif:DateTimeDigitized
EXIF:ModifyDate
XMP-xmp:ModifyDate
GPS:GPSDateStamp+GPS:GPSTimeStamp (adjusted for local timezone)
System:FileModifyDate

Timezones in a timestamp (such as the XMP tags) are ignored in favor of GPS coord or local TZ.  So if you want the time zone to be absolutely correct, set a GPS coordinate to a location in that time zone.

QuoteAt least exiftool does not write Keys:CreationDate to .jpg.

That's because KEYS tags are Quicktime tags, which are video only (except for CR3, I think, which are Quicktime based)

QuoteGoogle Photos has so poor search options for Keywords inside shared albums so I have not used the ItemList:Keyword tag.

I don't recall Google Photos even displaying keywords, though I haven't checked recently.

Other data from the last time I checked.

Google Description populated from: XMP-tiff:ImageDescription, XMP-dc:Description, IPTC:Caption-Abstract, Ducky:Comment (who the heck uses Ducky tags?)
Model: EXIF:Model,
FNumber: EXIF:FNumber, XMP-exif:FNumber, XMP-exif:ApertureValue, EXIF:MaxApertureValue, XMP-exif:MaxApertureValue
ExposureTime: EXIF:ExposureTime, XMP-exif:ExposureTime, EXIF:ShutterSpeedValue, XMP-exif:ShutterSpeedValue
FocalLength: EXIF:FocalLength, XMP-exif:FocalLength
ISO: EXIF:ISO, XMP-exif:ISO
GPSLatitude/GPSLongitude: EXIF GPS tags, ignores XMP GPS tags
Orientation: EXIF:Orientation[/tt
* 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).

wywh

Quote from: StarGeek on September 17, 2020, 01:29:54 PM
EXIF does support dates earlier than that, though I've never checked to see how early.  As a test, I just set the tag to 0001:01:01 00:00:00 and there was no problem.

Whether Google photos supports that early of a date is another matter.

Thanks for the reminder. I was so used to the Google Photos 1902 date limit that I misremembered it being also EXIF date limit. I'll test how those other date tags are supported.

BTW macOS 10.15 Photos.app 5.0 supports 1904-01-01 01.39.50 or later movies for QuickTime:CreateDate and year 0001 or later for Keys:CreationDate and UserData:DateTimeOriginal tags although I have not very much tested those very old dates.

Quote from: StarGeek on September 17, 2020, 01:29:54 PM
I don't recall Google Photos even displaying keywords, though I haven't checked recently.

It does not display Keywords but it seems to be able search them. But annoyingly search is only possible at the Google Photos main window, not inside albums. To do a Caption or Keyword search (I haven't tested if it searches both) users have to add the album to their own photos and do the search there, or download and open the album in other apps and do the search there (and annoyingly modified metadata is not inserted to the downloaded files). This is a great pity because I have an album with dozens of carefully picked Keywords per image. Currently other users don't have an easy access to filter those 1000 images via Keyword searches. Or at least that's how it worked the last time I tried.

- Matti

wwcanoer

Matti,

To get the Google Photo keywords into the actual images, then :

1. Use Google Takeout that provides json file of the keywords
2. Copy the json info to the images using exiftool, as described here: https://exiftool.org/forum/index.php?topic=11064.0
    (and using the info above in this thread to choose the viable exif fields.)
3. Re-upload to Google Photos.  (Before June 1st if you want free High Quality storage.)

Caveat: I haven't tried it but it should work.