Skip to main content

Overlay graphics dashboards onto GoPro footage

Project description

Overlaying Dashboard onto GoPro MP4 Files

  • Overlaying exciting graphics
  • Converting to GPX files

Examples

Example Dashboard Image

Requirements

  • Python3.8
  • ffmpeg
  • Unixy machine (probably, untested on Windows)

How to use

  • Install with pip
python -m venv venv
venv/bin/pip install gopro-overlay

Converting to GPX files

venv/bin/gopro-to-gpx.py <input-file> [output-file]

Overlaying a dashboard

venv/bin/gopro-dashboard.py

The GPS track in Hero 9 (at least) seems to be very poor. If you supply a GPX file from a Garmin or whatever, the program will use this instead for the GPS.

Privacy allows you to set a privacy zone. Various widgets will not draw points within that zone.

usage: gopro-dashboard.py [-h] [--font FONT] [--gpx GPX] [--privacy PRIVACY] [--no-overlay]
                          [--map-style {osm,tf-cycle,tf-transport,tf-landscape,tf-outdoors,tf-transport-dark,tf-spinal-map,tf-pioneer,tf-mobile-atlas,tf-neighbourhood,tf-atlas}]
                          [--map-api-key MAP_API_KEY] [--layout {default,speed-awareness}] [--show-ffmpeg]
                          [--output-size OUTPUT_SIZE]
                          input output

Overlay gadgets on to GoPro MP4

positional arguments:
  input                 Input MP4 file
  output                Output MP4 file

optional arguments:
  -h, --help            show this help message and exit
  --font FONT           Selects a font (default: Roboto-Medium.ttf)
  --gpx GPX             Use GPX file for location / alt / hr / cadence / temp (default: None)
  --privacy PRIVACY     Set privacy zone (lat,lon,km) (default: None)
  --no-overlay          Only output the gadgets, don't overlay (default: True)
  --map-style {osm,tf-cycle,tf-transport,tf-landscape,tf-outdoors,tf-transport-dark,tf-spinal-map,tf-pioneer,tf-mobile-atlas,tf-neighbourhood,tf-atlas}
                        Style of map to render (default: osm)
  --map-api-key MAP_API_KEY
                        API Key for map provider, if required (default OSM doesn't need one) (default: None)
  --layout {default,speed-awareness}
                        Choose graphics layout (default: default)
  --show-ffmpeg         Show FFMPEG output (not usually useful) (default: False)
  --output-size OUTPUT_SIZE
                        Vertical size of output movie (default: 1080)

Example

venv/bin/gopro-dashboard.py --gpx ~/Downloads/Morning_Ride.gpx --privacy 52.000,-0.40000,0.50 ~/gopro/GH020073.MP4 GH020073-dashboard.MP4

Performance

No attempt has been made to optimise this program! Right now, on my machine, it renders an 11 minute file in about 7 mins.

Known Bugs / Issues

  • Only tested on a GoPro Hero 9, that's all I have. Sample files for other devices are welcomed.
  • Aligning overlay with video - not exact! - Start garmin first, and wait for GPS lock before recording
  • Multiple GoPro files concatentated and overlayed. Current limit of 10 mins (in 1080p/60) is annoying.

Controlling the dashbord layout / controlling widgets

Its all hard coded right now.

Icons

Icon files in icons are not covered by the MIT licence

Map Data

Data © OpenStreetMap contributors

Some Maps © Thunderforest

References

https://github.com/juanmcasillas/gopro2gpx

https://github.com/JuanIrache/gopro-telemetry

https://github.com/gopro/gpmf-parser

Project details


Release history Release notifications | RSS feed

This version

0.9.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gopro-overlay-0.9.0.tar.gz (212.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page