py-gpmf-parser
Python bindings for the GoPro Metadata Format (GPMF) parser, allowing for easy extraction of telemetry data from GoPro videos.
Overview
This repository offers a Pythonic interface to the GPMF parser, enabling users to extract sensor data like ACCL, GYRO, GPS5, GRAV, and more from GoPro videos.
It provides access to most of the low-level functions (have a look at the src/gpmf_bindings.cpp), but also includes a simple python class to extract the telemetry data. Extending it to more low-level stuff should be easy, just follow the structure that I used.
Installation
To install the package, navigate to the root directory of the repository and run:
git clone --recursive https://github.com/urbste/py-gpmf-parser/
pip install build
python -m build --wheel
pip install dist/*.whl
(Optional) Using uv
If you use uv for environment and dependency management:
uv run setup.py build_ext --inplace
uv sync
Usage
Either extract single streams
filepath 'gpmf-parser/samples/max-heromode.mp4'
from py_gpmf_parser.gopro_telemetry_extractor import GoProTelemetryExtractor
extractor = GoProTelemetryExtractor(filepath)
extractor.open_source()
accl, accl_t = extractor.extract_data("ACCL")
gps, gps_t = extractor.extract_data("GPS5")
extractor.close_source()
or write multiple of them to a json file
extractor = GoProTelemetryExtractor(filepath)
extractor.extract_data_to_json(os.path.basename(filepath)+".json",
["ACCL", "GYRO", "GPS5", "GRAV", "MAGN", "CORI", "IORI"])
extractor.close_source()
To-Do List
- publish package
- document
Acknowledgements
This is my first project using ChatGPT4 to create Python bindings for a C library. I learned a lot in the process. I do have some experience with pybind11, however, this C library was challenging due to the use of pointers (especially the GPMF_stream struct). ChatGPT4 was able to solve all the hurdles in the process. I had to iterate some prompts and also prompt with specific errors, but in the end we figured it out ;) It also created the pip-publish.yml file to automatically publish the wheel on PyPI. It took me about 6-7 hours to write the library, which I would say is probably half of the time it would have taken me without ChatGPT.
Metadata
Release files for py-gpmf-parser 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 9.0 MB
Release files / py_gpmf_parser-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | py_gpmf_parser-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
4388b321e5d3d85614bb31650b17bddcf858ebae0f86c7c4a0ea81ccdf1dd085
|
|
BLAKE2b-256 checksum How to use checksums |
9f8bc3d5ea5ff587bb84f5b2f6a896b0a7c7b42e49db763f3b4f882aa686e2f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / py_gpmf_parser-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | py_gpmf_parser-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
1d874a1c4925ab371ccc2a5375257478f39ed84a7c8cc3eb8994a2933d4b8693
|
|
BLAKE2b-256 checksum How to use checksums |
4555b7d06b5fb83652479f95bd41468642b18b8c0614dd1791dd4f585fcf1af3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / py_gpmf_parser-0.1.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | py_gpmf_parser-0.1.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
993836967dc540f8419e69b94e23599944f71f70ffdc0b2c8ee1db037bd4cfbd
|
|
BLAKE2b-256 checksum How to use checksums |
5e0b2a00e75a281c0de0839a1e210eebee566cc62c35d59264c8fe00b6c75df3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / py_gpmf_parser-0.1.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | py_gpmf_parser-0.1.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.9 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
707d2b8e7aa93ed054082bc84965e4d9ed7a20221a2b3e3c95b694fca4d83356
|
|
BLAKE2b-256 checksum How to use checksums |
e3ea63b4b71949417e3ef7bc0a57f4899f2a21b688daee75840a395d99218da4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for py-gpmf-parser 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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.