Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Gopro Py Api | 1,355 | 4 | a year ago | 41 | September 24, 2021 | 97 | mit | Python | ||
Unofficial GoPro API Library for Python - connect to GoPro via WiFi. | ||||||||||
Gyroflow | 564 | a year ago | 40 | gpl-3.0 | Python | |||||
[INACTIVE LEGACY VERSION, FIND THE PROJECT HERE: https://github.com/gyroflow/gyroflow] Video stabilization using IMU motion data from internal or external logs | ||||||||||
Gpmf Parser | 448 | 5 months ago | 17 | apache-2.0 | C | |||||
Parser for GPMF™ formatted telemetry data used within GoPro® cameras. | ||||||||||
Gopro_as_webcam_on_linux | 408 | a month ago | 25 | apache-2.0 | Shell | |||||
Allows to use your GoPro camera as a webcam on linux | ||||||||||
Awesome Opensourcephotography | 371 | 2 years ago | ||||||||
A list of awesome free open source software & libraries for photography. Also tools for video. | ||||||||||
Gopro Linux | 283 | 3 years ago | 10 | gpl-3.0 | Shell | |||||
Bash script which helps with post production for GoPro cameras in Linux, can be used as a replacement for GoPro Studio | ||||||||||
Gopro Telemetry | 271 | 14 | a month ago | 140 | November 06, 2023 | 3 | mit | JavaScript | ||
Reads telemetry from the GPMF track in GoPro cameras (Hero5 and later) and converts it to multiple formats | ||||||||||
Goprohero | 257 | 6 | 7 years ago | 6 | December 15, 2021 | 14 | apache-2.0 | Python | ||
A Python library for controlling GoPro cameras over http. | ||||||||||
Goprostream | 247 | 4 years ago | 30 | Python | ||||||
Tools for handling/displaying GoPro HTTP/UDP stream (Python/Ruby) | ||||||||||
Esp32 Cam Video Recorder Junior | 196 | 3 months ago | 13 | gpl-3.0 | C++ | |||||
Simple fast version of ESP32-CAM-Video-Recorder |
Parses telemetry from the GPMF track in GoPro cameras (Hero5 and later).
Created for Telemetry Overlay and the Telemetry Extractor for GoPro.
Here's a gallery with cool uses of the GoPro telemetry.
Accepts an object with binary data and timing data. Returns a promise that resolves to a JavaScript object (or optionally to other file formats) with a key for each device that was found. See samples/example.js for a basic implementation.
You must extract the raw GMPF data from the video file first. You can do so with gpmf-extract.
gopro-telemetry expects, as the mandatory first parameter, an object with the following properties:
An options object and a callback function are additional optional parameters. If a callback is provided, it will receive the extracted data, and the promise will not resolve the result.
Install:
$ npm i gopro-telemetry
Use as promise:
const goproTelemetry = require('gopro-telemetry');
const telemetry = await goproTelemetry(input, options); //Get your input with gpmf-extract
Use with callback:
const goproTelemetry = require('gopro-telemetry');
function callback(data) {
// Do something with the data
}
const telemetry = await goproTelemetry(input, options, callback);
The options must be an object. The following keys are supported.
All options default to null/false. Using filters to retrieve the desired results reduces the processing time.
Example:
const telemetry = await goproTelemetry(
{ rawData, timing },
{ stream: ['ACCL'], repeatSticky: true }
);
This slightly more comprehensive example includes the data extraction step with gpmf-extract.
const gpmfExtract = require('gpmf-extract');
const goproTelemetry = require(`gopro-telemetry`);
const fs = require('fs');
const file = fs.readFileSync('path_to_your_file.mp4');
gpmfExtract(file)
.then(extracted => {
goproTelemetry(extracted, {}, telemetry => {
fs.writeFileSync('output_path.json', JSON.stringify(telemetry));
console.log('Telemetry saved as JSON');
});
})
.catch(error => console.error(error));
timing object structure:
{ frameDuration: 0.03336666666666667,
videoDuration: 480,
start: 2017-04-17T19:27:57.000Z,//Date object
samples:
[ { cts: 0, duration: 1001 },//Starting point and duration in milliseconds
{ cts: 1001, duration: 1001 },
{ cts: 2002, duration: 1001 },
{ cts: 3003, duration: 1001 },
{ cts: 4004, duration: 1001 } ] }
The output with the default options looks like this:
{ deviceId : {
data about the device : values,
streams : {
stream_key : {
data about the samples : values,
samples : [
{
cts : time from start,
date : time and date,
value : sample
sticky : {
name : value
}
},
{
cts : time from start,
date : time and date,
value : sample
}
]
}
}
}
}
Sticky values apply to all successive samples. You can export them to the outer object of all samples with the repeatSticky option.
Depending on the camera, model, settings and accessories, these are some of the available data:
This project is possible thanks to the gpmf-parser documentation, open sourced by GoPro.
These are the available preset formats:
GoPros split very long videos in multiple files. In order to generate a single metadata output you can provide the data as an array of objects with data and timing information. Note that usually the last 1-2 seconds of a video file do not include metadata. In some cases this might create a noticeable gap.
const telemetry = await goproTelemetry([
{ rawData: file1Data, timing: file1Timing },
{ rawData: file2Data, timing: file2Timing }
]);
The first step in the parsing process is usually the most resource-intensive. To avoid repeating it if you want to apply different options to the same input, you can retrieve the parsed data by using the raw option and pass it to in the successive calls as parsedData instead of rawData.
const parsedData = await goproTelemetry({ rawData, timing }, { raw: true });
const telemetry = await goproTelemetry({ parsedData, timing });
The 'raw' data option is sensitive to the options: device, stream, deviceList, streamList, tolerant, debug and indirectly to some presets. Meaning this approach should not be used if any of these options is going to change between calls.
Altitude data in old cameras was not recorded as mean-sea-level. The library tries to correct for this automatically, or if requested through the options. For altitude correction to work the optional peer dependency egm96-universal must be installed.
Additionally to the GPMF track, the mp4 header contains a GPMF atom embedded within the 'udta' atom. It contains, for example, manual and atomated highlight tags and video settings. Its structure is slightly different to the common GPMF track, so some different (and opinionated) interpretation is applied when the mp4header option is used.
If you liked this you might like some of my app prototyping.
Please make your changes to the dev branch, so that automated tests can be run before merging to master. Also, if possible, provide tests for new functionality.