How to GeoTag video? (can't find any forum on this)

I know you can add the “date created” metadata when exporting mp4 with “meta.attr.creation_time.markup = …” command inside the box found in “advance” → “other”.

However, does anyone knows how to add GeoTag/location metadata to the exported video?

You’re on the right track. Add the meta.attr.location.markup tag to the Other box. The GPS string format does not have a comma or whitespace in it. The lat/long are smashed into each other. Here’s an example:

Step 1: Find a location in Google Maps, then right-click for menu, and click the GPS coordinates entry to copy them to the clipboard.

Step 2: Paste the coordinates into the Other box, removing the comma and all whitespace.
Step2

Export as normal, in this case as location.mp4.

Then I checked the metadata of the file:

ffprobe -i location.mp4

The response:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'location.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf59.16.100
    location-eng    : -49.2821+069.5061/
    location        : -49.2821+069.5061/
  Duration: 00:00:01.05, start: 0.000000, bitrate: 427 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 409 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]

I then added the exported MP4 file to a digiKam collection to verify it was being placed properly on a map, and it was.

It is possible but not required to add a third component to the GPS string to represent altitude.

1 Like

I have tried this method, but the location of the exported video doesn’t show in windows photos or MediaInfo (even though it shows in the Properties → Metadata in shotcut).


Is it because that the attribute name “location” isn’t recognised by windows photos? and is there any way to save the location metadata so that it appears on windows photos?

This topic was automatically closed after 90 days. New replies are no longer allowed.