# External GPX support for videos in mapillary\_tools 0.11.0b2

**URL:** https://forum.mapillary.com/t/external-gpx-support-for-videos-in-mapillary-tools-0-11-0b2/7373
**Category:** Contributing and equipment
**Created:** [September 8, 2023, 10:24am UTC](https://forum.mapillary.com/t/external-gpx-support-for-videos-in-mapillary-tools-0-11-0b2/7373 "2023-09-08T10:24:13Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![adalvit](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@adalvit](https://forum.mapillary.com/u/adalvit)
#### Post date: [September 8, 2023, 10:24am UTC](https://forum.mapillary.com/t/external-gpx-support-for-videos-in-mapillary-tools-0-11-0b2/7373/1 "2023-09-08T10:24:13Z")

</div>

Hello everybody,

A beta release of mapillary\_tools is available for download at [Release v0.11.0b2 · mapillary/mapillary\_tools · GitHub](https://github.com/mapillary/mapillary_tools/releases/tag/v0.11.0b2) or through pip. It brings experimental support for using external tracks in GPX and NMEA format to geotag videos, and for extracting data using exiftool automatically (must be installed in the system).

The new features should be especially useful for Insta360 ONE X cameras - but note that timelapse videos won’t work yet. In short, after you stitch the videos and export the GPX with Insta360 Studio you can process all of them with:

```auto
mapillary_tools process --video_geotag_source gpx STITCHED_VIDEOS_FOLDER

```

If you forgot to export the GPX while stitching, but have exiftool installed in your system and in the global path, you can also extract the data from the original .insv files. Assuming they reside in the parent directory of where you stitched your videos:

```auto
mapillary_tools process --video_geotag_source '{"source": "exiftool_runtime", "pattern": "../%g.insv"}' STITCHED_VIDEOS_FOLDER

```

As always, you can then upload the videos with

```auto
mapillary_tools upload FOLDER

```

At this time, since the features are beta, we suggest testing with a few videos first. More documentation is available in the README:

> **[GitHub - mapillary/mapillary\_tools: Command line tools for processing and...](https://github.com/mapillary/mapillary_tools/#new-video-geotagging-features-experimental)**
>
> Command line tools for processing and uploading Mapillary imagery - GitHub - mapillary/mapillary\_tools: Command line tools for processing and uploading Mapillary imagery

We are here to help in case you encounter difficulties. Looking forward to feeback and bug reports!

Alessandro

---

<div class="post-metadata">

### Author: ![Intersection99](https://avatars.discourse-cdn.com/v4/letter/i/c57346/32.png) [@Intersection99](https://forum.mapillary.com/u/Intersection99)
#### Post date: [September 10, 2023, 1:33am UTC](https://forum.mapillary.com/t/external-gpx-support-for-videos-in-mapillary-tools-0-11-0b2/7373/2 "2023-09-10T01:33:35Z")

</div>

Does the insta360 app export gpx of sufficient resolution or is it better to pre-extract the gpx with exiftools or let mapillary do it?

---

<div class="post-metadata">

### Author: ![adalvit](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@adalvit](https://forum.mapillary.com/u/adalvit)
#### Post date: [September 11, 2023, 2:14pm UTC](https://forum.mapillary.com/t/external-gpx-support-for-videos-in-mapillary-tools-0-11-0b2/7373/3 "2023-09-11T14:14:42Z")

</div>

In short: I’d privilege `exiftool_runtime` over `gpx`.

What I see is that exiftool extracts 10 or 11 points/second, but they are all duplicates - the coordinates actually change once per second. The GPX generated by Insta360 Studio has only one point/s, and the track seems to be smoothed - exiftool in orange, insta360 studio in blue:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/mapillary/original/3X/6/a/6a9ec529f58951af523976406df44dc22d6fe533.png)

I hope the smoothing would be better if the whole curve were recorded. Tomorrow I will check the effect on a longer track. Anyway I think getting the raw data from exiftool is better, but more for power users (because it’s more straightforward to just process the stitched MP4s and the GPXs on the side).

Regarding gps data vs moving speed, a points per second while driving at 120 km/h means one every 33m, which should still be fine given that the trajectory at that speed shouldn’t have sudden changes and we can interpolate effectively.

If someone wants, it would actually be interesting to get an upload in both the GPX and exiftool version. We can delete the worst sequence afterwards. In case: after the first upload, to be able to process the same video again one must remove its entry from the history (MacOS ~/Library/Application Support/mapillary\_tools, Windows C:\Users\<username\>\AppData\Local\Mapillary, linux ~/.local/share/mapillary\_tools/ )

---

<div class="post-metadata">

### Author: ![Hopen111](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/hopen111/32/71866_2.png) [@Hopen111](https://forum.mapillary.com/u/Hopen111)
#### Post date: [September 11, 2023, 11:40pm UTC](https://forum.mapillary.com/t/external-gpx-support-for-videos-in-mapillary-tools-0-11-0b2/7373/4 "2023-09-11T23:40:09Z")

</div>

![image](https://us1.discourse-cdn.com/flex015/uploads/mapillary/original/3X/d/4/d43cce909027f8b671598c54af38ab6efa5e46f6.png)  
I got a new error I have never seen before. How do I fix this?

![image](https://us1.discourse-cdn.com/flex015/uploads/mapillary/original/3X/0/e/0ee3cebd2bf7de3aa14018749fcbc4cc2976d8e7.png)  
It outputs this too.

What I am trying to do is geotag the MP4 video with the GPX exported from Insta360 Studio.

---

<div class="post-metadata">

### Author: ![Hopen111](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/hopen111/32/71866_2.png) [@Hopen111](https://forum.mapillary.com/u/Hopen111)
#### Post date: [September 11, 2023, 11:57pm UTC](https://forum.mapillary.com/t/external-gpx-support-for-videos-in-mapillary-tools-0-11-0b2/7373/5 "2023-09-11T23:57:04Z")

</div>

I just managed to do this:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/mapillary/original/3X/2/a/2a025cfbaa28b4eddcbded3ba4508da30cd12380.png)  
Is this what it is meant to look like?

---

<div class="post-metadata">

### Author: ![Hopen111](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/hopen111/32/71866_2.png) [@Hopen111](https://forum.mapillary.com/u/Hopen111)
#### Post date: [September 12, 2023, 12:07am UTC](https://forum.mapillary.com/t/external-gpx-support-for-videos-in-mapillary-tools-0-11-0b2/7373/6 "2023-09-12T00:07:58Z")

</div>

IT WORKS YEESS  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/mapillary/original/3X/b/7/b795357c9d1c3ded811111c07e802e678cd27169.png)

---

<div class="post-metadata">

### Author: ![adalvit](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@adalvit](https://forum.mapillary.com/u/adalvit)
#### Post date: [September 12, 2023, 7:04am UTC](https://forum.mapillary.com/t/external-gpx-support-for-videos-in-mapillary-tools-0-11-0b2/7373/7 "2023-09-12T07:04:29Z")

</div>

> [@Hopen111](#):
>
> I got a new error I have never seen before. How do I fix this?

Good that now it’s working 🙂 Did you sort out what the error was about?

---

<div class="post-metadata">

### Author: ![Hopen111](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/hopen111/32/71866_2.png) [@Hopen111](https://forum.mapillary.com/u/Hopen111)
#### Post date: [September 14, 2023, 2:04am UTC](https://forum.mapillary.com/t/external-gpx-support-for-videos-in-mapillary-tools-0-11-0b2/7373/8 "2023-09-14T02:04:49Z")

</div>

I basically just typed in the command incorrectly. It seems everything is fine with the geotagging feature for now!

I will have to try and use the exiftool to extract the GPX since it’s VERY inaccurate right now with the GPX file from insta360 studio.

---

<div class="post-metadata">

### Author: ![Hopen111](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/hopen111/32/71866_2.png) [@Hopen111](https://forum.mapillary.com/u/Hopen111)
#### Post date: [September 14, 2023, 3:33am UTC](https://forum.mapillary.com/t/external-gpx-support-for-videos-in-mapillary-tools-0-11-0b2/7373/9 "2023-09-14T03:33:00Z")

</div>

Look at this!

Insta360 Studio: Blue  
Exiftool/UL2GSV: Green

 ![image](https://us1.discourse-cdn.com/flex015/uploads/mapillary/original/3X/5/6/5664adbb23a4e39d0117c7245812e2afe88c16e6.png)  
Somehow they managed to make the GPX file so terrible when exported from Insta360 Studio. I will test Exiftool upload soon and see if there’s any issues with duplicates. If anyone wants to know how to get the Exiftool GPX file easily then comment here!

---

<div class="post-metadata">

### Author: ![boris](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/boris/32/71767_2.png) [@boris](https://forum.mapillary.com/u/boris)
#### Post date: [September 14, 2023, 11:18am UTC](https://forum.mapillary.com/t/external-gpx-support-for-videos-in-mapillary-tools-0-11-0b2/7373/10 "2023-09-14T11:18:59Z")

</div>

@Hopen111 - it would be great if you could submit this feedback directly to insta360 so hopefully they can work to improve insta360 studio gpx extraction in future releases.

Also, as Alessandro wrote above:

> “If you forgot to export the GPX while stitching, but have exiftool installed in your system and in the global path, you can also extract the data from the original .insv files. Assuming they reside in the parent directory of where you stitched your videos:”
> 
> `mapillary_tools process --video_geotag_source '{"source": "exiftool_runtime", "pattern": "../%g.insv"}' STITCHED_VIDEOS_FOLDER`

---

<div class="post-metadata">

### Author: ![nikola](https://avatars.discourse-cdn.com/v4/letter/n/a88e57/32.png) [@nikola](https://forum.mapillary.com/u/nikola)
#### Post date: [September 14, 2023, 2:07pm UTC](https://forum.mapillary.com/t/external-gpx-support-for-videos-in-mapillary-tools-0-11-0b2/7373/11 "2023-09-14T14:07:08Z")

</div>

Hi all! This update is now also used in the new beta version of Mapillary Desktop Uploader (4.1.0) which is ready for testing. It will pick up GPX files that are in the folder with the video and have the same file name. You will be able to see the route on the map before upload.

You can download the latest beta version for [Windows](https://tools.mapillary.com/uploader/download/win-beta), [Mac](https://tools.mapillary.com/uploader/download/mac-beta) & [Linux](https://tools.mapillary.com/uploader/download/linux-beta).
