Compare commits

..

No commits in common. "484e3d050df1268361f356dd66741648bb7e589e" and "32481eb4ae770f730c309e95995197145abd50d8" have entirely different histories.

4 changed files with 6 additions and 21 deletions

View File

@ -2,12 +2,6 @@
A cli tool to export GoPro metadatas from video files. A cli tool to export GoPro metadatas from video files.
## Install
`npm install -g gopro-telemetry-exporter`
or just prefix command `npx`
## Usage ## Usage
`gopro-telemetry-exporter --input GPX010001.MP4 --output GPX010001.gpx --GPS5Fix 3 --preset gpx --groupTimes 200` `gopro-telemetry-exporter --input GPX010001.MP4 --output GPX010001.gpx --GPS5Fix 3 --preset gpx --groupTimes 200`
@ -16,15 +10,12 @@ or just prefix command `npx`
* `--output` is the path to metadatas output file ( can be gpx, kml, * `--output` is the path to metadatas output file ( can be gpx, kml,
geojson, csv, mgjson, virb, and other format that can be supported by geojson, csv, mgjson, virb, and other format that can be supported by
[GoPro Telemetry Presets](https://www.npmjs.com/package/gopro-telemetry#user-content-presets)) [GoPro Telemetry Presets](https://www.npmjs.com/package/gopro-telemetry#user-content-presets))
* All other options will be pass directly to [GoPro Telemetry](https://www.npmjs.com/package/gopro-telemetry), you * All other options will be pass directly to [GoPro Telemetry](), you
can check the list can check the list
### Example CSV export of GPS5 stream
`gopro-telemetry-exporter --input GPX010001.MP4 --output test.csv --GPS5Fix 3 --preset csv --groupTimes 200 --stream GPS5`
## TODO ## TODO
* Check all the presets * Check all the presets
* Implement progress * Implement progress
https://www.npmjs.com/package/gopro-telemetry

View File

@ -28,14 +28,8 @@ async function main(options) {
}; };
} }
goproTelemetry(res, _.omit(options, ['_', 'input', 'output']), telemetryData => { goproTelemetry(res, _.omit(options, ['_', 'input', 'output']), telemetry => {
if (options.preset === 'csv') { fs.writeFileSync(options.output, telemetry);
telemetryData = _.values(telemetryData)[0];
} else if (!_.isString(telemetryData)) {
telemetryData = JSON.stringify(telemetryData);
}
fs.writeFileSync(options.output, telemetryData);
}); });
} }

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "gopro-telemetry-exporter", "name": "gopro-telemetry-exporter",
"version": "1.1.0", "version": "1.0.1",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "gopro-telemetry-exporter", "name": "gopro-telemetry-exporter",
"version": "1.1.0", "version": "1.0.1",
"description": "A cli tool to parse telemetry from the GPMF track in GoPro cameras (Hero5 and later).", "description": "A cli tool to parse telemetry from the GPMF track in GoPro cameras (Hero5 and later).",
"keywords": [ "keywords": [
"GoPro", "GoPro",