Compare commits

...

4 Commits

Author SHA1 Message Date
HugoPoi 484e3d050d 1.1.0 2021-02-20 00:05:29 +01:00
HugoPoi 407544412f feat: add csv export support 2021-02-20 00:05:19 +01:00
HugoPoi 124eb02e97 feat: export as json 2021-02-19 23:52:30 +01:00
HugoPoi 6d8c5e96c9 doc: minor README.md fix 2021-02-19 23:51:55 +01:00
4 changed files with 21 additions and 6 deletions

View File

@ -2,6 +2,12 @@
A cli tool to export GoPro metadatas from video files.
## Install
`npm install -g gopro-telemetry-exporter`
or just prefix command `npx`
## Usage
`gopro-telemetry-exporter --input GPX010001.MP4 --output GPX010001.gpx --GPS5Fix 3 --preset gpx --groupTimes 200`
@ -10,12 +16,15 @@ A cli tool to export GoPro metadatas from video files.
* `--output` is the path to metadatas output file ( can be gpx, kml,
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))
* All other options will be pass directly to [GoPro Telemetry](), you
* All other options will be pass directly to [GoPro Telemetry](https://www.npmjs.com/package/gopro-telemetry), you
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
* Check all the presets
* Implement progress
https://www.npmjs.com/package/gopro-telemetry

View File

@ -28,8 +28,14 @@ async function main(options) {
};
}
goproTelemetry(res, _.omit(options, ['_', 'input', 'output']), telemetry => {
fs.writeFileSync(options.output, telemetry);
goproTelemetry(res, _.omit(options, ['_', 'input', 'output']), telemetryData => {
if (options.preset === 'csv') {
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",
"version": "1.0.1",
"version": "1.1.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

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