All Projects → stilldavid → Gopro Utils

stilldavid / Gopro Utils

Licence: bsd-2-clause
Tools to parse metadata from GoPro Hero 5 & 6 cameras

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Gopro Utils

Gpmf Parser
Parser for GPMF™ formatted telemetry data used within GoPro® cameras.
Stars: ✭ 282 (+47.64%)
Mutual labels:  gps, telemetry
HPR-Rocket-Flight-Computer
A flight computer for high-powered rockets based on the Teensy platform. 4 programmable pyro outputs, Mach immune flight events, air-start & two-stage capable w/ tilt-sensing safety features, GPS & live telemetry. High-rate data logging at 1000 samples per second. 4.0in x 1.25in x 0.5in fits in a 38mm tube coupler.
Stars: ✭ 33 (-82.72%)
Mutual labels:  gps, telemetry
Luatelemetry
FrSky SmartPort(S.Port), D-series, F.Port and TBS Crossfire telemetry on all Taranis and Horus transmitters
Stars: ✭ 206 (+7.85%)
Mutual labels:  gps, telemetry
Gps Overlay On Video
Telemetry (GPS) data overlay on videos
Stars: ✭ 136 (-28.8%)
Mutual labels:  gps, telemetry
Lwgps
Lightweight GPS NMEA parser for embedded systems
Stars: ✭ 172 (-9.95%)
Mutual labels:  gps
Ffwdme.js
[DEPRECATED!] 🛑 A JavaScript toolkit that aims to bring interactive GPS driving directions to the mobile browser
Stars: ✭ 150 (-21.47%)
Mutual labels:  gps
Traccar Client Ios
Traccar Client for iOS
Stars: ✭ 149 (-21.99%)
Mutual labels:  gps
Telemetry metrics
Collect and aggregate Telemetry events over time
Stars: ✭ 144 (-24.61%)
Mutual labels:  telemetry
Ublox
A driver for ublox gps
Stars: ✭ 189 (-1.05%)
Mutual labels:  gps
Meshtastic Android
Android companion application for the Meshtastic ski/hike/fly/Signal-chat GPS radio
Stars: ✭ 179 (-6.28%)
Mutual labels:  gps
Windows
💎 tweaks & fixes for windows 10 - mostly powershell
Stars: ✭ 169 (-11.52%)
Mutual labels:  telemetry
Hitrava
Convert your Huawei Health sport activities and import them in Strava.
Stars: ✭ 156 (-18.32%)
Mutual labels:  gps
Marine Api
Java Marine API - NMEA 0183 library for Java
Stars: ✭ 174 (-8.9%)
Mutual labels:  gps
Prom ex
An Elixir Prometheus metrics collection library built on top of Telemetry with accompanying Grafana dashboards
Stars: ✭ 149 (-21.99%)
Mutual labels:  telemetry
React Geolocated
React Higher-Order Component for using Geolocation API
Stars: ✭ 185 (-3.14%)
Mutual labels:  gps
Ygot
A YANG-centric Go toolkit - Go/Protobuf Code Generation; Validation; Marshaling/Unmarshaling
Stars: ✭ 147 (-23.04%)
Mutual labels:  telemetry
Speedmeter
Display the gps speed [Android]
Stars: ✭ 169 (-11.52%)
Mutual labels:  gps
Winslap
Swiftly configure a fresh Windows 10 installation with useful tweaks and antispy settings.
Stars: ✭ 175 (-8.38%)
Mutual labels:  telemetry
Ulogger Android
μlogger • android application for real-time collection and publishing of geolocation data
Stars: ✭ 168 (-12.04%)
Mutual labels:  gps
Gpslogger
A GPS logger for Android mobile devices
Stars: ✭ 164 (-14.14%)
Mutual labels:  gps

GoPro Metadata Format Parser

TLDR:

  1. ffmpeg -y -i GOPR0001.MP4 -codec copy -map 0Ⓜ️handler_name:" GoPro MET" -f rawvideo GOPR0001.bin
  2. gopro2json -i GOPR0001.bin -o GOPR0001.json
  3. There is no step 3

I spent some time trying to reverse-engineer the GoPro Metadata Format (GPMD or GPMDF) that is stored in GoPro Hero 5 cameras if GPS is enabled. This is what I found.

Extracting the Metadata File

The metadata stream is stored in the .mp4 video file itself alongside the video and audio streams. We can use ffprobe to find it:

[computar][100GOPRO] ➔ ffprobe GOPR0008.MP4
ffprobe version 3.2.4 Copyright (c) 2007-2017 the FFmpeg developers
[SNIP]
    Stream #0:3(eng): Data: none (gpmd / 0x646D7067), 33 kb/s (default)
    Metadata:
      creation_time   : 2016-11-22T23:42:41.000000Z
      handler_name    : 	GoPro MET
[SNIP]

We can identify it by the gpmd in the tag string - in this case it's id 3. We can then use ffmpeg to extract the metadata stream into a binary file for processing:

ffmpeg -y -i GOPR0001.MP4 -codec copy -map 0:3 -f rawvideo out-0001.bin

This leaves us with a binary file with the data.

Data We Get

  • ~400 Hz 3-axis gyro readings
  • ~200 Hz 3-axis accelerometer readings
  • ~18 Hz GPS position (lat/lon/alt/spd)
  • 1 Hz GPS timestamps
  • 1 Hz GPS accuracy (cm) and fix (2d/3d)
  • 1 Hz temperature of camera

The Protocol

Data starts with a label that describes the data following it. Values are all big endian, and floats are IEEE 754. Everything is packed to 4 bytes where applicable, padded with zeroes so it's 32-bit aligned.

  • Labels - human readable types of proceeding data
  • Type - single ascii character describing data
  • Size - how big is the data type
  • Count - how many values are we going to get
  • Length = size * count

Labels include:

  • ACCL - accelerometer reading x/y/z
  • DEVC - device
  • DVID - device ID, possibly hard-coded to 0x1
  • DVNM - devicde name, string "Camera"
  • EMPT - empty packet
  • GPS5 - GPS data (lat, lon, alt, speed, 3d speed)
  • GPSF - GPS fix (none, 2d, 3d)
  • GPSP - GPS positional accuracy in cm
  • GPSU - GPS acquired timestamp; potentially different than "camera time"
  • GYRO - gryroscope reading x/y/z
  • SCAL - scale factor, a multiplier for subsequent data
  • SIUN - SI units; strings (m/s², rad/s)
  • STRM - ¯\_(ツ)_/¯
  • TMPC - temperature
  • TSMP - total number of samples
  • UNIT - alternative units; strings (deg, m, m/s)

Types include:

  • c - single char
  • L - unsigned long
  • s - signed short
  • S - unsigned short
  • f - 32 float

For implementation details, see reader.go and other corresponding files in telemetry/.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].