Google Photos sort by time - major problems

Started by boombass, January 12, 2018, 02:46:31 PM

Previous topic - Next topic

boombass

I am using Google Photos for my personal photo and video collection. It allows me to view my photos and videos anywhere from any computer or mobile device. It allows me to caption my photos and videos. It will automatically geotag my files based on location data from my phone. And it allows me to share them with friends and family easily.

But it is very frustrating, because it has a lot of bugs for how it sorts photos and videos. If I create an album and ask it to sort by oldest first, photo files are sorted with time zone information, and video files without. This leads to the album being out of order because the video files are ordered 7 hours later than they should be. I live in Edmonton, which is GMT-7. This happens with both my iPhone 7 and Canon S120.

With help from the wonderful people on these forums, I've been using two exiftool commands to fix the files. The commands are:

exiftool -P -overwrite_original_in_place '-createdate<creationdate' -if '($filetype eq "MOV")' DIR

exiftool -P -overwrite_original_in_place '-createdate<datetimeoriginal' -if '($filetype eq "MP4")' DIR


This works well if I make albums with photos and videos from only one camera - the albums sort correctly. But if I make an album with photos and video from both camera mixed together, the order gets all messed up again.

This morning I did an experiment. I took a photo or a video with each camera, one per minute (the S120 is about 14 seconds fast compared to the iPhone, so this should remove that problem). I renamed the files 1 through 8 with a C or an I after the number to signify if it came from the Canon or iPhone. Then I uploaded them to Google Photos without any exiftool processing.

Google Photos ordered them: 1C.jpg, 5C.jpg, 2I.jpg, 3C.mp4, 6I.jpg, 8C.mp4, 4I.MOV, 7I.MOV

I am attaching a csv file of the output from this command:

exiftool -csv -api QuickTimeUTC -time:all -a -G0:1 -s DIR > test.csv

I have also reordered the columns for readability and to put them in ascending order 1 through 8.

This is a big request, but can anyone dig deep into this file to try to see what the heck Google Photos is using to sort these files? And can I use exiftool to process the files before uploading them?

Google Photos is very useful, but these sorting problems have been around since day 1 and they really do not seem to be interested in fixing them.

Thank you so much.

StarGeek

First, one quick tweak. Instead of:
exiftool -P -overwrite_original_in_place '-createdate<creationdate' -if '($filetype eq "MOV")' DIR
exiftool -P -overwrite_original_in_place '-createdate<datetimeoriginal' -if '($filetype eq "MP4")' DIR

You can speed things up by using
exiftool -P -overwrite_original_in_place '-createdate<creationdate' -ext Mov DIR
exiftool -P -overwrite_original_in_place '-createdate<datetimeoriginal' -ext Mp4 DIR

Using the if Filetype construct, exiftool will read every file and extract all the metadata before checking to see if it needs to be processed.  The -ext option will only process those files indicated.

QuoteThis is a big request, but can anyone dig deep into this file to try to see what the heck Google Photos is using to sort these files? And can I use exiftool to process the files before uploading them?

See this post for the 12 tags that Google Photos uses to sort images. 

Unfortunately, I haven't tried testing various video files so I can't provide much advice in that area.

One thing that might throw the times off is the fact that if Google Photos ends up using FileModifyDate date, instead of using your local time zone, it may change to a different time zone, presumably that of the server it's been uploaded to.  I suspect that this may happen more often for videos, as parsing video metadata seems to be something that online services seem reluctant to do.

QuoteGoogle Photos is very useful, but these sorting problems have been around since day 1 and they really do not seem to be interested in fixing them.

They are doing something, though.  Whether it can be called fixing or not, hard to say.  As I mention in the above link, the order of timestamps read and if GPS timestamps account for UTC time differences has changed since I first tried figuring it out a couple years ago.
* 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).

StarGeek

Quote from: boombass on January 12, 2018, 02:46:31 PMI am attaching a csv file of the output from this command:

I don't see the attachment.
* 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).

boombass

Sorry! The csv file is now attached to my original message.

Thank you for your tweaks and for the information on the tags Google Photos uses to sort images. I am only modifying video files; I wonder if I should be modifying my photos as well.

It is also good to hear that Google is making changes, hopefully fixes, to how files are sorted. It makes me wonder if I should simply upload everything without modification, and hope they get around to making it work as it should. I could sort my photos and videos manually (ugh) in the meantime and maybe have less frustration!

I look forward to hearing your comments on what is in the csv file. Thank you very much for your help!

StarGeek

Quote from: boombass on January 12, 2018, 04:24:45 PMI look forward to hearing your comments on what is in the csv file.

Since you're on a mac (I assume), any statement I made regarding FileModifyDate can be suspect, as I don't have access to test.  But who knows.

Are those files still in that order after some time has passed?  Some times it takes Google Photos a bit to process the timestamps.

But otherwise, at this point, I have no clue.  My next step would be to look at each file, check the Info icon on Google Photos, and take note of the full Date and see how it compares.

* 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).

boombass

QuoteAre those files still in that order after some time has passed?  Some times it takes Google Photos a bit to process the timestamps.

Ah. This seems to be what was happening. Once I gave it some time, the pictures ended up in the right order. I had to sort again, but it worked. I'm too impatient!

Thanks again for your help!