Generates a chroma-key-ready (green background) speedometer video from GoPro GPS telemetry data exported by gopro2gpx.
I didn't find a tool that just gives me plain old greenscreen video feed that i can key into my original video. I've built this tool on top of gopro2gpx. Gopro 2 Gpx has an overlay feature. but I found that the time taken for it to process was ~20 mins for an 8 minute video & I ran out of ram (8GB on my macbook air M3). Feel free to criticize it or add to it. I hope 1 person finds this helpful. If you are that 1 person, A Star in this repo is appreciated.
pip install opencv-python-headless Pillow numpy
Use gopro2gpx to extract telemetry from your .MP4 file:
pip install git+https://github.com/juanmcasillas/gopro2gpx
# Or Download the repository at https://github.com/juanmcasillas/gopro2gpx unpack it and install with
python -m pip install .
# Export all three formats at once
gopro2gpx -s GH010001.MP4 output
# Produces: output.csv output.gpx output.kmlTip: The
.csvand.gpxoutputs contain speed data. The.kmlfile does NOT include speed — use CSV or GPX.
python speedometer.py output.csv -o speedometer.mp4usage: speedometer.py [-h] [-o OUTPUT] [--fps FPS] [--unit {km/h,mph}]
[--size SIZE] [--max-speed MAX_SPEED]
[--smoothing SMOOTHING]
input
positional arguments:
input Path to gopro2gpx output (.csv, .gpx, or .kml)
options:
-o OUTPUT Output video path (default: <input>_speedometer.mp4)
--fps FPS Frames per second (default: 18 — matches GoPro GPS rate)
--unit {km/h,mph} Speed unit on the dial (default: km/h)
--size SIZE Canvas size in pixels, square (default: 400)
--max-speed MAX_SPEED Max speed shown on dial (auto-calculated if omitted)
--smoothing N Rolling-average window to smooth needle (default: 3, 1=off)
# Basic usage (km/h, auto dial range)
python speedometer.py output.csv
# Miles per hour, larger overlay, custom dial max
python speedometer.py output.gpx --unit mph --size 500 --max-speed 60
# Silky smooth needle, 30fps sync
python speedometer.py output.csv --fps 30 --smoothing 5
# Full control
python speedometer.py output.csv \
-o my_ride_speedometer.mp4 \
--fps 60 \
--unit km/h \
--size 600 \
--max-speed 120 \
--smoothing 5The output video has a pure green (#00FF00) background — compatible with:
| Editor | How to apply chroma key |
|---|---|
| DaVinci Resolve | Color → Qualifier → pick green, or Fusion → ChromaMatte |
| Adobe Premiere | Effects → Keying → Ultra Key |
| Final Cut Pro | Effects → Keying → Keyer |
| CapCut / mobile | Overlay → Chroma Key |
| OBS Studio | Filters → Chroma Key |
Drag the speedometer clip as an overlay track above your GoPro footage and apply the chroma key effect. Resize and reposition as needed.
| Speed range | Arc colour |
|---|---|
| 0 – 60 % of max | 🟢 Green |
| 60 – 85 % of max | 🟡 Yellow |
| 85 – 100 % of max | 🔴 Red |
The needle turns orange-red (GoPro style) and the digital readout updates every frame.
| Format | Speed data | Notes |
|---|---|---|
.csv |
✅ speed column (m/s) |
Best option |
.gpx |
✅ <gpxtpx:speed> extension |
Works perfectly |
.kml |
❌ No speed embedded | Warning shown; use CSV/GPX |