missing GPS information when copy from one file to anther

Started by aerolite, January 14, 2024, 12:00:44 AM

Previous topic - Next topic

aerolite

Hello9,

I use the command
exiftool -tagsfromfile 2024-01-07_11-32-05.mov "-gps*" 2024-01-07_11-32-05.png"
 to copy the GPS information. but the result is different. the North and West are missing.

exiftool -tagsfromfile 2024-01-07_11-32-05.mov "-gps*" 2024-01-07_11-32-05.png                                                          Sat Jan 13, 23:51:42
Warning: [minor] The ExtractEmbedded option may find more tags in the media data - 2024-01-07_11-32-05.mov
    1 image files updated
fzhou@macBook/Volumes/DATA2/Videos/2023-U13BB %
> exiftool 2024-01-07_11-32-05.png | grep -i GPS                                                                                          Sat Jan 13, 23:51:56
GPS Version ID                  : 2.3.0.0
GPS Latitude                    : 44 deg 2' 38.04"
GPS Longitude                   : 79 deg 26' 18.96"
GPS Altitude Ref                : Above Sea Level
GPS Altitude                    : 256.4 m Above Sea Level
GPS Position                    : 44 deg 2' 38.04", 79 deg 26' 18.96"
fzhou@macBook/Volumes/DATA2/Videos/2023-U13BB %
> exiftool 2024-01-07_11-32-05.mov | grep -i GPS                                                                                          Sat Jan 13, 23:52:12
GPS Coordinates                 : 44 deg 2' 38.04" N, 79 deg 26' 18.96" W, 256.419 m Above Sea Level
GPS Altitude                    : 256.419 m
GPS Altitude Ref                : Above Sea Level
GPS Latitude                    : 44 deg 2' 38.04" N
GPS Longitude                   : 79 deg 26' 18.96" W
GPS Position                    : 44 deg 2' 38.04" N, 79 deg 26' 18.96" W

StarGeek

Because video GPS coordinates and image GPS coordinates are saved in the file differently. In a video, all the data is saved in a single tag, GPSCoordinates.  In an image, they are saved in six separate tags, three tags that hold the numerical location and three tags that the referance direction.  These tags are GPSLatitude, GPSLatitudeRef, GPSLongitude, GPSLongitudeRef, GPSAltitude, and GPSAltitudeRef.

When you are copying the GPS tags, you are not copying the Latitude and Longitude reference directions.  You have copy that data explicently.  You can do this by adding this to your command
'-GPSLatitude*<GPSLatitude' '-GPSLongitude*<GPSLongitude'
This uses the tag name wildcard feature to copy to both the coordinate tags as well as the reference tags at the same time.

Use this variation on the command in FAQ #3 to see all the tags, including the ones with duplicated names, and the groups they belong to.
exiftool -G1 -a -s '-GPS*' /path/to/files/
* 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

I have used this to copy almost all tags from a movie to an image:

exiftool -m -sep ',' -overwrite_original -api QuickTimeUTC=1 -api LargeFileSupport=1 -tagsFromFile movie.mp4 '-AllDates<QuickTime:CreateDate' '-FileCreateDate<QuickTime:CreateDate' '-FileModifyDate<QuickTime:CreateDate' '-Composite:GPSPosition<Composite:GPSPosition' '-GPSAltitude<GPSAltitude' '-XMP-photoshop:Headline<Keys:DisplayName' '-XMP-dc:Title<Keys:Title' '-XMP-photoshop:CaptionWriter<Keys:Author' '-XMP-xmp:Rating<Keys:UserRating' '-XMP-dc:Subject<Keys:Keywords' '-XMP-dc:Description<Keys:Description' '-IFD0:Make<Keys:Make' '-IFD0:Model<Keys:Model' '-IFD0:Software<Keys:Software' '-ExifIFD:LensMake<XMP-exifEX:LensMake' '-ExifIFD:LensModel<XMP-exifEX:LensModel' '-ExifIFD:LensInfo<XMP-exifEX:LensInfo' '-ExifIFD:LensModel<XMP-aux:Lens' '-ExifIFD:LensInfo<XMP-aux:LensInfo' image.jpg
The last two XMP-aux:* lens tags might be redundant and might be deleted?

That command works otherwise for GPS but does not copy movie altitude. Could the Composite tag generate also it?

[Keys]          GPSCoordinates                  : -36.6101 -66.91515 119.9
[Composite]     GPSPosition                     : -36.6101 -66.91515

- Matti