Skip to main content

telemetrik

PyPI Python License: MIT

Extract GPS, gyroscope, accelerometer, and other sensor data from GoPro video files.

telemetrik is a pure-Python parser for the GoPro Metadata Format (GPMF) — no compiled dependencies, no FFmpeg, just pip install and go.

Install

pip install telemetrik

Usage

Python

from telemetrik import extract_all_telemetry

streams = extract_all_telemetry("GX010042.MP4")

# GPS track
for ts, (lat, lon, alt, spd2d, spd3d, fix, dop) in streams["GPS5"].data:
    if fix >= 3:  # 3D fix
        print(f"{lat:.6f}, {lon:.6f}  alt={alt:.0f}m")

# 200 Hz accelerometer
for ts, (x, y, z) in streams["ACCL"].data:
    print(f"{ts}ms  accel=({x:.2f}, {y:.2f}, {z:.2f}) m/s²")

# Camera orientation quaternions
for ts, (w, x, y, z) in streams["CORI"].data:
    print(f"{ts}ms  quat=({w:.4f}, {x:.4f}, {y:.4f}, {z:.4f})")

Command line

telemetrik GX010042.MP4                        # extract all streams
telemetrik --streams ACCL,GYRO,GPS5 *.MP4      # specific streams, batch

Each stream is saved as <stem>.<fourcc> (e.g. GX010042.accl, GX010042.gps5) in CSV format with millisecond timestamps.

Supported streams

FourCC Stream Shape
ACCL Accelerometer (x, y, z) m/s²
GYRO Gyroscope (x, y, z) rad/s
GPS5 GPS + quality (lat, lon, alt, speed_2d, speed_3d, fix, dop)
CORI Camera orientation (w, x, y, z) quaternion
IORI Image orientation (w, x, y, z) quaternion
GRAV Gravity vector (x, y, z)
SHUT Shutter speed scalar, microseconds
ISOE ISO scalar
WBAL White balance (temperature, tint)
TMPC Sensor temperature scalar, °C

Pass any GPMF FourCC to extract unlisted streams: extract_all_telemetry(path, streams=["MWET"]).

Timestamps

Every TelemetryStream carries two timestamp arrays:

  • data — (ms, value) pairs from the GPMF STMP clock (millisecond precision, always available)
  • pts_data — (seconds, value) pairs on the video presentation timeline (available when the MP4 has timing atoms)

Use pts_data to align telemetry with video frames.

GPS quality fields

The GPS stream includes two "sticky" metadata fields that persist across samples:

Field Values Meaning
fix 0 / 2 / 3 No lock / 2D / 3D
dop 0–9999 Dilution of precision (lower = better)

Filter on fix >= 3 and dop < 500 for reliable positions.

API reference

extract_all_telemetry(video_path, streams=None, max_readings=None)

Extract all (or selected) telemetry streams from an MP4 file.

Parameters:

  • video_path — path to a GoPro MP4 file
  • streams — list of FourCC strings, or None for all default streams
  • max_readings — optional cap on the total readings extracted across all streams; None (default) means unlimited

Returns: dict[str, TelemetryStream] — only streams with data are included.

Raises: ValueError if the file has no GPMF metadata track, or if the extraction exceeds max_readings.

Memory cost: the result is built entirely in RAM, as one Python tuple per reading. Measured on a synthetic metadata track, a 8.0 MB GPMF track peaks at ≈2.1 GiB resident memory while extracting one of its streams — roughly 270 bytes of RAM per byte of file (about 270×), and the CSV export amplifies the same way on disk (a 0.20 MB metadata track renders ≈2.1 MB of CSV, ≈10×). Parsing a hostile or unexpectedly huge metadata track can therefore cost far more memory than the file's size; pass max_readings to put a hard, catchable bound on it.

TelemetryStream

Attribute Type Description
key str GPMF FourCC
sample_count int Number of readings
name str Human-readable name (from STNM)
units str SI unit string (from SIUN)
data list[tuple[int, Any]] (timestamp_ms, value)
pts_data list[tuple[float, Any]] | None (pts_seconds, value)

get_stream_data(f, samples, stream_key, scale=True, time_base=None)

Low-level extraction of a single stream from an open file handle. Use this when you need control over file I/O or want to extract non-standard streams.

Attribution

Core MP4 box walking and GPMF binary parsing adapted from gopro-video-sync by Ethan Vo (MIT).

License

MIT

Metadata

Release files for telemetrik 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for telemetrik 0.1.1
File Size Uploaded Provenance Actions
telemetrik-0.1.1.tar.gz 74.8 kB With provenance Details for telemetrik-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for telemetrik 0.1.1
File Interpreter ABI Platform Actions
telemetrik-0.1.1-py3-none-any.whl Python 3 none any Details for telemetrik-0.1.1-py3-none-any.whl

Total release size: 94.1 kB

Release files / telemetrik-0.1.1.tar.gz

Download URL telemetrik-0.1.1.tar.gz
Size 74.8 kB
Tags Source
SHA-256 checksum
How to use checksums
dfe25597e968365e32216bfc7ce1c74175a45683de6d1736b2bab0384e1b75fe
BLAKE2b-256 checksum
How to use checksums
2584a177d782b87a3e4c302c056b19b70fb899015c94b0eefc1e16568b6c8218
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / telemetrik-0.1.1-py3-none-any.whl

Download URL telemetrik-0.1.1-py3-none-any.whl
Size 19.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c84d79d5dafb6412c8b6ead0444216f9fa68b2a1d7a9056a06975ff65cec8d9
BLAKE2b-256 checksum
How to use checksums
35e544ac3807e694ae6cac8bbc2645b52fb3b8e85d570aebbce837fbd684bd38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Security for telemetrik 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for telemetrik-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page