Adding Accurate OSM-Based Location Overlays to Race Track Video Edits

Hi everyone,

I’m working on editing some in-car race track videos using footage from my GoPro, and I’d like to overlay OpenStreetMap-based location data directly into the videos—for example, showing the driver’s position on a simplified map of the track as the video plays. I’ve seen similar features in apps like RaceChrono or Garmin overlays, but I’m trying to build something custom so I can include only relevant track segments and styling.

I’ve already exported GPS logs from my sessions, and I’ve looked into using Mapbox and Leaflet to render the OSM map views, but I’m running into two main issues:

  1. I can’t seem to find a way to extract or simplify just the race track section of the OSM data cleanly—I’m not sure whether to download vector tiles or use Overpass Turbo for this.
  2. Once I do have the map or route, I’m unsure how to sync the driver’s position to the video timeline frame by frame. I have GPS timestamps, but getting this to render cleanly in a video editing environment (like Adobe Premiere or DaVinci Resolve) is proving tricky.

Has anyone here tried something like this before? Is there a recommended way to extract high-quality OSM vector data of a track and turn it into a visual overlay synced to GPS logs for video editing? Any advice on workflow or tools would be greatly appreciated.

Thanks!

1 Like

Is there anyone who can help with this?

Maybe, but they might be away for the weekend :smile:

Perhaps you could try and share some of what you’ve tried so far?

Thanks for the response! Totally understand that folks might be away no rush at all. I just figured I’d get the ball rolling now in case someone has tackled something similar or could point me in the right direction when they’re back.

So far, I’ve managed to extract GPS logs from my GoPro footage using tools like RaceRender and DashWare, but I’m aiming for something more customized and map-based rather than the default gauges. I’ve imported the GPS data (in GPX and CSV formats) and experimented with rendering it over OpenStreetMap layers using Leaflet. The visual side works okay in a browser, but I’m stuck turning that into a clean overlay for video.

To isolate just the race track from OSM, I tried Overpass Turbo and wrote some queries to grab highway=track or leisure=track data, but results were noisy. I’m not sure if there’s a better tag or bounding box strategy to get just the relevant racing circuit data cleanly. I also looked at downloading vector tiles (via Mapbox or Geofabrik extracts), but simplifying them for overlay use especially if I want to animate movement along a path feels overkill without the right tooling.

As for syncing the GPS data to video frame-by-frame, I’m exploring whether I can script this in After Effects or export frame-based PNG overlays using something like ffmpeg + a custom Python script. It’s doable, but the pipeline gets complex fast. If anyone has advice on how to render a static or lightly animated track map in sync with telemetry data (e.g. position, speed), I’d love some pointers.

Appreciate any feedback or workflow ideas! Even if it’s just how to better extract and simplify track vector data from OSM, that would be a huge help. Happy to share screenshots or code snippets if anyone’s interested in what I’ve tried so far.

I’d imagine that in Overpass you’ll want to look for highway=raceway. Try having a look in OSM and see if what the track is tagged as. Here for example is part of Cadwell Park in the UK.

You may also have to watch out for whether the highway=raceway you’re interested in has been mapped as an area (or multipolygon) or as a series of linear ways. This is an example of an area (I’d suggest that that mapping is incorrect there, but that doesn’t mean that you won’t encounter it).

However, if you just want to show the driver’s position, isn’t it just about “showing a location as an icon on some sort of map?” The must be a bunch of Leaflet and MapLibre examples that do that already.