How to get Google Photos in Android to read GPS information from iOS .MOV video

Started by HKSubstance, March 17, 2025, 07:35:44 AM

Previous topic - Next topic

HKSubstance

Hello,

I was wondering if someone could help me out with this.
I recently changed from an iOS device to an Android device.

After transferring the video files I had, I realized that the Google Photos app is not showing any location info.

For reference, below is the output from exiftool from one of the video files.

ExifTool Version Number         : 13.25
File Name                       : IMG_0824.MOV
Directory                       : C:/Users/Daniel/OneDrive/Pictures/Android
File Size                       : 15 MB
File Modification Date/Time     : 2023:02:19 16:37:07+09:00
File Access Date/Time           : 2025:03:17 20:33:44+09:00
File Creation Date/Time         : 2025:03:15 16:51:30+09:00
File Permissions                : -rw-rw-rw-
File Type                       : MOV
File Type Extension             : mov
MIME Type                       : video/quicktime
Major Brand                     : Apple QuickTime (.MOV/QT)
Minor Version                   : 0.0.0
Compatible Brands               : qt
Movie Header Version            : 0
Time Scale                      : 600
Duration                        : 9.30 s
Preferred Rate                  : 1
Preferred Volume                : 100.00%
Preview Time                    : 0 s
Preview Duration                : 0 s
Poster Time                     : 0 s
Selection Time                  : 0 s
Selection Duration              : 0 s
Current Time                    : 0 s
Next Track ID                   : 6
Track Header Version            : 0
Track Create Date               : 2023:02:19 07:37:07
Track Modify Date               : 2023:02:19 07:37:07
Track ID                        : 1
Track Duration                  : 9.30 s
Track Layer                     : 0
Track Volume                    : 0.00%
Image Width                     : 1920
Image Height                    : 1080
Clean Aperture Dimensions       : 1920x1080
Production Aperture Dimensions  : 1920x1080
Encoded Pixels Dimensions       : 1920x1080
Graphics Mode                   : ditherCopy
Op Color                        : 32768 32768 32768
Compressor ID                   : avc1
Source Image Width              : 1920
Source Image Height             : 1080
X Resolution                    : 72
Y Resolution                    : 72
Compressor Name                 : H.264
Bit Depth                       : 24
Video Frame Rate                : 30.005
Balance                         : 0
Audio Format                    : mp4a
Audio Channels                  : 1
Audio Bits Per Sample           : 16
Audio Sample Rate               : 44100
Purchase File Format            : mp4a
Warning                         : [minor] The ExtractEmbedded option may find more tags in the media data
Matrix Structure                : 1 0 0 0 1 0 0 0 1
Media Header Version            : 0
Media Create Date               : 2023:02:19 07:37:07
Media Modify Date               : 2023:02:19 07:37:07
Media Time Scale                : 600
Media Duration                  : 9.30 s
Media Language Code             : und
Gen Media Version               : 0
Gen Flags                       : 0 0 0
Gen Graphics Mode               : ditherCopy
Gen Op Color                    : 32768 32768 32768
Gen Balance                     : 0
Handler Class                   : Data Handler
Handler Vendor ID               : Apple
Handler Description             : Core Media Data Handler
Meta Format                     : mebx
Handler Type                    : Metadata Tags
Location Accuracy Horizontal    : 5.000000
GPS Coordinates                 : 35 deg 8' 36.24" N, 139 deg 38' 28.32" E, 45.075 m Above Sea Level
Make                            : Apple
Model                           : iPhone 8
Software                        : 16.2
Creation Date                   : 2023:02:19 16:37:07+09:00
Apple Photos Originating Signature: AfqhXNiR7qswTFhFnH4qCtLpQfgr
XMP Toolkit                     : Image::ExifTool 13.25
Create Date                     : 2023:02:19 16:37:07+09:00
Modify Date                     : 2023:02:19 16:37:07+09:00
Media Data Size                 : 1152
Media Data Offset               : 15041217
Image Size                      : 1920x1080
Megapixels                      : 2.1
Avg Bitrate                     : 12.9 Mbps
GPS Altitude                    : 45.075 m
GPS Altitude Ref                : Above Sea Level
GPS Latitude                    : 35 deg 8' 36.24" N
GPS Longitude                   : 139 deg 38' 28.32" E
Rotation                        : 0
GPS Position                    : 35 deg 8' 36.24" N, 139 deg 38' 28.32" E
-- press ENTER --

Is there a way to accomplish this using exiftool?

Best Regards,

Daniel

Phil Harvey

Hi Daniel,

As I remember, Google Photos is very picky about the number of decimal points in the GPS coordinates.  Here is one post I found by searching in the forum.  Also, use the -G1 option when extracting to show the location where these tags are stored -- apparently it should be Keys:GPSCoordinates.

- 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 ($).

HKSubstance

Hello Phil,

Thanks for the quick reply.
I ran exiftool with the -G1 option; I suppose the "[Keys] GPS Coordinates ..." line corresponds to the Keys:GPSCoordinates you mentioned?

[Keys]PS C:\Users\Daniel\Downloads\exiftool-13.25_64> ./exiftool -G1 C:\Users\Daniel\OneDrive\Pictures\Android\IMG_0824.MOV
[ExifTool]      ExifTool Version Number         : 13.25
[System]        File Name                       : IMG_0824.MOV
[System]        Directory                       : C:/Users/Daniel/OneDrive/Pictures/Android
[System]        File Size                       : 15 MB
[System]        File Modification Date/Time     : 2023:02:19 16:37:07+09:00
[System]        File Access Date/Time           : 2025:03:18 20:07:03+09:00
[System]        File Creation Date/Time         : 2025:03:15 16:51:30+09:00
[System]        File Permissions                : -rw-rw-rw-
[File]          File Type                       : MOV
[File]          File Type Extension             : mov
[File]          MIME Type                       : video/quicktime
[QuickTime]     Major Brand                     : Apple QuickTime (.MOV/QT)
[QuickTime]     Minor Version                   : 0.0.0
[QuickTime]     Compatible Brands               : qt
[QuickTime]     Movie Header Version            : 0
[QuickTime]     Time Scale                      : 600
[QuickTime]     Duration                        : 9.30 s
[QuickTime]     Preferred Rate                  : 1
[QuickTime]     Preferred Volume                : 100.00%
[QuickTime]     Preview Time                    : 0 s
[QuickTime]     Preview Duration                : 0 s
[QuickTime]     Poster Time                     : 0 s
[QuickTime]     Selection Time                  : 0 s
[QuickTime]     Selection Duration              : 0 s
[QuickTime]     Current Time                    : 0 s
[QuickTime]     Next Track ID                   : 6
[QuickTime]     Handler Type                    : Metadata Tags
[QuickTime]     Media Data Size                 : 1152
[QuickTime]     Media Data Offset               : 15041217
[Track1]        Track Header Version            : 0
[Track1]        Track Create Date               : 2023:02:19 07:37:07
[Track1]        Track Modify Date               : 2023:02:19 07:37:07
[Track1]        Track ID                        : 1
[Track1]        Track Duration                  : 9.30 s
[Track1]        Track Layer                     : 0
[Track1]        Track Volume                    : 0.00%
[Track1]        Image Width                     : 1920
[Track1]        Image Height                    : 1080
[Track1]        Clean Aperture Dimensions       : 1920x1080
[Track1]        Production Aperture Dimensions  : 1920x1080
[Track1]        Encoded Pixels Dimensions       : 1920x1080
[Track1]        Graphics Mode                   : ditherCopy
[Track1]        Op Color                        : 32768 32768 32768
[Track1]        Compressor ID                   : avc1
[Track1]        Source Image Width              : 1920
[Track1]        Source Image Height             : 1080
[Track1]        X Resolution                    : 72
[Track1]        Y Resolution                    : 72
[Track1]        Compressor Name                 : H.264
[Track1]        Bit Depth                       : 24
[Track1]        Video Frame Rate                : 30.005
[Track2]        Balance                         : 0
[Track2]        Audio Format                    : mp4a
[Track2]        Audio Channels                  : 1
[Track2]        Audio Bits Per Sample           : 16
[Track2]        Audio Sample Rate               : 44100
[Track2]        Purchase File Format            : mp4a
[Track3]        Warning                         : [minor] The ExtractEmbedded option may find more tags in the media data
[Track5]        Matrix Structure                : 1 0 0 0 1 0 0 0 1
[Track5]        Media Header Version            : 0
[Track5]        Media Create Date               : 2023:02:19 07:37:07
[Track5]        Media Modify Date               : 2023:02:19 07:37:07
[Track5]        Media Time Scale                : 600
[Track5]        Media Duration                  : 9.30 s
[Track5]        Media Language Code             : und
[Track5]        Gen Media Version               : 0
[Track5]        Gen Flags                       : 0 0 0
[Track5]        Gen Graphics Mode               : ditherCopy
[Track5]        Gen Op Color                    : 32768 32768 32768
[Track5]        Gen Balance                     : 0
[Track5]        Handler Class                   : Data Handler
[Track5]        Handler Vendor ID               : Apple
[Track5]        Handler Description             : Core Media Data Handler
[Track5]        Meta Format                     : mebx
[Keys]          Location Accuracy Horizontal    : 5.000000
[Keys]          GPS Coordinates                 : 35 deg 8' 36.24" N, 139 deg 38' 28.32" E, 45.075 m Above Sea Level
[Keys]          Make                            : Apple
[Keys]          Model                           : iPhone 8
[Keys]          Software                        : 16.2
[Keys]          Creation Date                   : 2023:02:19 16:37:07+09:00
[Keys]          Apple Photos Originating Signature: AfqhXNiR7qswTFhFnH4qCtLpQfgr
[XMP-x]         XMP Toolkit                     : Image::ExifTool 13.25
[XMP-xmp]       Create Date                     : 2023:02:19 16:37:07+09:00
[XMP-xmp]       Modify Date                     : 2023:02:19 16:37:07+09:00
[Composite]     Image Size                      : 1920x1080
[Composite]     Megapixels                      : 2.1
[Composite]     Avg Bitrate                     : 12.9 Mbps
[Composite]     GPS Altitude                    : 45.075 m
[Composite]     GPS Altitude Ref                : Above Sea Level
[Composite]     GPS Latitude                    : 35 deg 8' 36.24" N
[Composite]     GPS Longitude                   : 139 deg 38' 28.32" E
[Composite]     Rotation                        : 0
[Composite]     GPS Position                    : 35 deg 8' 36.24" N, 139 deg 38' 28.32" E

For curiosity's sake, I examined one of the videos shot with the Android phone. Google Photos is able to show the location information for these ones.

PS C:\Users\Daniel\Downloads\exiftool-13.25_64> ./exiftool -G1 C:\Users\Daniel\OneDrive\Pictures\Android\VID_20250302_115111.mp4
[ExifTool]      ExifTool Version Number         : 13.25
[System]        File Name                       : VID_20250302_115111.mp4
[System]        Directory                       : C:/Users/Daniel/OneDrive/Pictures/Android
[System]        File Size                       : 117 MB
[System]        File Modification Date/Time     : 2025:03:02 11:51:37+09:00
[System]        File Access Date/Time           : 2025:03:18 20:13:15+09:00
[System]        File Creation Date/Time         : 2025:03:15 17:36:33+09:00
[System]        File Permissions                : -rw-rw-rw-
[File]          File Type                       : MP4
[File]          File Type Extension             : mp4
[File]          MIME Type                       : video/mp4
[QuickTime]     Major Brand                     : MP4 v2 [ISO 14496-14]
[QuickTime]     Minor Version                   : 0.0.0
[QuickTime]     Compatible Brands               : isom, mp42
[QuickTime]     Media Data Size                 : 115222600
[QuickTime]     Media Data Offset               : 405190
[QuickTime]     Movie Header Version            : 0
[QuickTime]     Create Date                     : 2025:03:02 02:51:36
[QuickTime]     Modify Date                     : 2025:03:02 02:51:36
[QuickTime]     Time Scale                      : 10000
[QuickTime]     Duration                        : 23.83 s
[QuickTime]     Preferred Rate                  : 1
[QuickTime]     Preferred Volume                : 100.00%
[QuickTime]     Preview Time                    : 0 s
[QuickTime]     Preview Duration                : 0 s
[QuickTime]     Poster Time                     : 0 s
[QuickTime]     Selection Time                  : 0 s
[QuickTime]     Selection Duration              : 0 s
[QuickTime]     Current Time                    : 0 s
[QuickTime]     Next Track ID                   : 3
[UserData]      GPS Coordinates                 : 34 deg 38' 55.68" N, 138 deg 52' 21.72" E
[UserData]      Preview Image                   : (Binary data 1407526 bytes, use -b option to extract)
[Keys]          Android Version                 : 14
[Track1]        Track Header Version            : 0
[Track1]        Track Create Date               : 2025:03:02 02:51:36
[Track1]        Track Modify Date               : 2025:03:02 02:51:36
[Track1]        Track ID                        : 1
[Track1]        Track Duration                  : 23.83 s
[Track1]        Track Layer                     : 0
[Track1]        Track Volume                    : 0.00%
[Track1]        Image Width                     : 3840
[Track1]        Image Height                    : 2160
[Track1]        Graphics Mode                   : srcCopy
[Track1]        Op Color                        : 0 0 0
[Track1]        Compressor ID                   : hvc1
[Track1]        Source Image Width              : 3840
[Track1]        Source Image Height             : 2160
[Track1]        X Resolution                    : 72
[Track1]        Y Resolution                    : 72
[Track1]        Bit Depth                       : 24
[Track1]        Color Profiles                  : nclx
[Track1]        Color Primaries                 : BT.709
[Track1]        Transfer Characteristics        : BT.709
[Track1]        Matrix Coefficients             : BT.709
[Track1]        Video Full Range Flag           : Limited
[Track1]        Video Frame Rate                : 29.876
[Track2]        Matrix Structure                : 1 0 0 0 1 0 0 0 1
[Track2]        Media Header Version            : 0
[Track2]        Media Create Date               : 2025:03:02 02:51:36
[Track2]        Media Modify Date               : 2025:03:02 02:51:36
[Track2]        Media Time Scale                : 48000
[Track2]        Media Duration                  : 23.79 s
[Track2]        Handler Type                    : Audio Track
[Track2]        Handler Description             : SoundHandle
[Track2]        Balance                         : 0
[Track2]        Audio Format                    : mp4a
[Track2]        Audio Channels                  : 2
[Track2]        Audio Bits Per Sample           : 16
[Track2]        Audio Sample Rate               : 48000
[Composite]     Image Size                      : 3840x2160
[Composite]     Megapixels                      : 8.3
[Composite]     Avg Bitrate                     : 38.7 Mbps
[Composite]     GPS Latitude                    : 34 deg 38' 55.68" N
[Composite]     GPS Longitude                   : 138 deg 52' 21.72" E
[Composite]     Rotation                        : 0
[Composite]     GPS Position                    : 34 deg 38' 55.68" N, 138 deg 52' 21.72" E

I noticed that the "[Keys] GPS Coordinates ..." is missing from this one ...

I'm now wondering about the 2 points below:

1) Do you think adding something corresponding to the "[UserData]      GPS Coordinates  ..." to the .MOV file would be a solution?

2) Regarding the number of decimal points in the coordinates, is there a way to convert from the minute:second format to decimal within exiftool, and at the same time truncate the decimal data?

Or would I need to fashion some kind of script to accomplish this.

Thanks for any feedback,

Daniel

Phil Harvey

Hi Daniel,

The output coordinate format you see is governed by the -c option.  You would have to use the -v option to see what is actually stored.

The first thing I would try is writing UserData:GPSCoordinates.  Try this to copy the value from Keys:GPSCoordinates:

exiftool "-userdata:gpscoordinates<keys:gpscoordinates" 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 ($).

HKSubstance

Hello Phil,

First, using the -v option I checked the Keys:GPSCoordinates of the .MOV video, and both coordinates only had 4 decimal places.

I then tried writing UserData:GPSCoordinates as you suggested, but Google Photos is still not showing the coordinates.

This is what exiftool reports with regarding UserData:GPSCoordinates after the operation:

   UserData (SubDirectory) -->
  | + [UserData directory]
  | | XMP (SubDirectory) -->
  | | + [XMP directory, 2874 bytes]
  | | | XMPToolkit = Image::ExifTool 13.25
  | | | CreateDate = 2023-02-19T16:37:07+09:00
  | | | ModifyDate = 2023-02-19T16:37:07+09:00
  | | GPSCoordinates = .+35.1434+139.6412+45.075/

For reference, this is what is reported for the video taken in Android

UserData (SubDirectory) -->
  | + [UserData directory]
  | | GPSCoordinates = ...+34.6488+138.8727/

Could it perhaps be that Google Photos doesn't like it when there the information regarding the altitude is included?

Regards,

Daniel

wywh

The last time 5/2024 I checked this Google Photos shows GPSCoordinates positions only if there is in decimal degrees DD 3-5 decimals after the dot (no more, no less!), and altitude must be max 4 decimals. But you seem to be compatible in that regard. Both Keys:GPSCoordinates and UserData:GPSCoordinates should work.

Does rebuilding metadata help:

exiftool -All= -tagsFromFile @ -All:All movie.mov
Notice that ffmpeg corrupts such movie metadata when encoding but I guess that does not apply to this issue?

- Matti

HKSubstance

Hello Matti,

I tried rebuilding the metadata as you suggested, but it didn't seem to affect the issue.

QuoteNotice that ffmpeg corrupts such movie metadata when encoding but I guess that does not apply to this issue?

I guess. These are just movies from my iPhone, so I don't think ffmpeg has touched any of the data up to now.

Best Regards,

Daniel

wywh

Quote from: HKSubstance on March 22, 2025, 07:30:27 AMI tried rebuilding the metadata as you suggested, but it didn't seem to affect the issue.
I'd then try to delete and re-add GPS to a test movie (with those pesky Google Photos decimal restrictions in mind and using exiftool -n switch which handles decimals), then delete those same movies form Google Photos, empty Google Photos trash, and upload the movies, and see it it then works. If that fails, then delete all possible metadata from a test movie and re-do the GPS test.

I tested this a few days ago and at least on that day Google Photos accepted both Keys and UserData GPSCoordinates and preferred Keys. Surprisingly it accepted also GPS that had gone through ffmpeg which macOS 15 QuickTime Player and Photos do not read unless fixed with exiftool. (While testing, I was surprised that in Google Photos Keys:CreationDate overrides QuickTime:CreateDate but somehow UserData:DateTimeOriginal does not and seemed to be ignored. Anyways, I use only Keys GPSCoordinates and CreationDate for pre-1970 dates in Google Photos).

- Matti