Skip to content

Commit

Permalink
WIP: Add HiLight tags
Browse files Browse the repository at this point in the history
  • Loading branch information
KonradIT committed May 25, 2017
1 parent b3671b3 commit caf8c26
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Expand Up @@ -3,9 +3,9 @@ GoPro Metadata Format Parser

TLDR:

1. `ffmpeg -y -i GOPR0001.MP4 -codec copy -map 0:m:handler_name:" GoPro MET" -f rawvideo GOPR0001.bin`
2. `gopro2json -i GOPR0001.bin -o GOPR0001.json`
3. There is no step 3
1. `ffmpeg -y -i GOPR0001.MP4 -codec copy -map 0:3 -f rawvideo GOPR0001.bin`
2. `gopro2json -i GOPR0001.bin -o GOPR0001.json` or `gpmdinfo -i GOPR0001.bin`
3. Use the csv/json, you can use [this](http://www.convertcsv.com/csv-to-kml.htm) to convert the gps.csv to a KML map.

---

Expand Down Expand Up @@ -80,6 +80,7 @@ Labels include:
* `TMPC` - temperature
* `TSMP` - total number of samples
* `UNIT` - alternative units; strings (deg, m, m/s)
* `HMMT` - HiLight Tags (if there are any)

Types include:

Expand Down
8 changes: 8 additions & 0 deletions telemetry/reader.go
Expand Up @@ -29,6 +29,7 @@ func Read(f io.Reader) (*TELEM, error) {
"GPSU",
"GYRO",
"HD5.",
"HMMT",
"SCAL",
"SIUN",
"STRM",
Expand Down Expand Up @@ -145,6 +146,13 @@ func Read(f io.Reader) (*TELEM, error) {
return nil, err
}
t.Gyro = append(t.Gyro, g)
} else if "HMMT" == label_string {
g := HMMT{}
err := g.Parse(value)
if err != nil {
return nil, err
}
t.Hilight = g
} else if "GPSP" == label_string {
g := GPSP{}
err := g.Parse(value)
Expand Down
1 change: 1 addition & 0 deletions telemetry/telemetry.go
Expand Up @@ -15,6 +15,7 @@ type TELEM struct {
GpsAccuracy GPSP
Time GPSU
Temp TMPC
Hilight HMMT
}

// the thing we want, json-wise
Expand Down

0 comments on commit caf8c26

Please sign in to comment.