one_second_diary icon indicating copy to clipboard operation
one_second_diary copied to clipboard

Ability to load geolocation from metadata

Open KyleKun opened this issue 2 years ago • 4 comments

When uploading a video from gallery, it would be nice to check metadata to see if there's location info, and load this by default.

KyleKun avatar May 25 '23 18:05 KyleKun

Hello @KyleKun I would really like this, can you give me some guidelines into how to start tackling this?

Also, it seems old OSD videos of mine (2023) had location metadata, but recent ones don't. How that was possible before?

arcstur avatar Mar 20 '25 18:03 arcstur

Hey @arcstur , we are adding location metadata in the code already if geotagging is enabled, here's the relevant code snippet for searching:

String locationMetadata = '';
    if (isGeotaggingEnabled) {
      final latitude = Utils.locationPositionToString(widget.userPosition?.latitude);
      final longitude = Utils.locationPositionToString(widget.userPosition?.longitude);
      final localeName = widget.userLocation?.replaceAll('"', '\\"');
      locationMetadata = ' -metadata location="$latitude$longitude/$localeName"';
    }

But if we add the video from gallery, we will likely need to implement the checking with ffprobe so we can grab its value, similar to how we check streams:

await executeFFprobe('-v quiet -print_format json -show_format -show_streams "$currentVideo"')

KyleKun avatar Mar 22 '25 18:03 KyleKun

Would it be possible to add the location metadata without geotagging text? I usually keep geotagging off because I don't like to add another text in the video, but I would like the metadata.

arcstur avatar Mar 22 '25 21:03 arcstur

Would it be possible to add the location metadata without geotagging text? I usually keep geotagging off because I don't like to add another text in the video, but I would like the metadata.

Yes, we can make an option in settings for this no problem

KyleKun avatar Mar 24 '25 10:03 KyleKun