Code Monkey home page Code Monkey logo

gopro-utils's People

Contributors

barclayo avatar bit avatar brianfoshee avatar bright-light-in-the-night avatar juanirache avatar laeyoung avatar mlouielu avatar stilldavid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gopro-utils's Issues

[Help request / Improvement ] Write metadata to mp4 file

Hello there! Thank you for this great tool!
I'm trying to write a tool that read the telemetry track, process it and write it back in the input file.
Have you ever tried something like that?
Do you know if it's possible to mux the bin file in a mp4 video with ffmpeg?

Any suggestion would be greatly appreciated :)

Stream handler_name has changed again on Hero6 files

So, apparently the stream handler_name has changed again in Hero6 files. And that makes automated data extraction difficult for those of us who use ffmpeg. If I'm not wrong, for Hero5 files up to 60 fps, it was something like

Stream #0:3(eng): Data: none (gpmd / 0x646D7067), 33 kb/s (default)
Metadata:
creation_time : 2017-11-25T15:46:16.000000Z
handler_name : GoPro MET

Which could be extracted via

ffmpeg -y -i VIDEOFILE.MP4 -codec copy -map 0:3 -f rawvideo DATA.BIN

Then, over 60 fps the Stream was:

Stream #0:2(eng): Data: none (gpmd / 0x646D7067), 66 kb/s (default)
Metadata:
creation_time : 2017-11-25T15:46:48.000000Z
handler_name : GoPro MET

So this call, despite the awkward tabulator character before "GoPro MET" would work for both:

ffmpeg -y -i VIDEOFILE.MP4 -codec copy -map 0:m:handler_name:" GoPro MET" -f rawvideo DATA.BIN

Now, Hero6 files don't have the tabulator character:

Stream #0:3(eng): Data: none (gpmd / 0x646D7067), 37 kb/s (default)
Metadata:
creation_time : 2017-11-21T22:25:40.000000Z
handler_name : GoPro MET

So they can be retrieved with the 0:3 of the H5 sub 60fps command, but not with the previously universal 0:m:handler_name:" GoPro MET" and 0:m:handler_name:"GoPro MET" does not work either for some reason I don't comprehend.

Does anyone know how to solve this? Maybe using regular expressions or looking for the "(gpmd / 0x646D7067)" bit?

new Labels : MTRX

It seems that HERO 6 last firmware (v02.01) add new labels : MTRX, ORIN, ORIO
Error reading telemetry file Could not find label in list: MTRX (4d545258)

Is it possible to manage it ?
Thanks

Support GP5. Data Type

Based on a tweet, I think it's got camera data like EXIF including shutter speed and ISO.

Printing it out on screen as strings looks something like:

2.00.00LAE6091614106816
y�4z8�~�N�
          ��(�C3161325340567HERO5 Black
��Ey�4z8�~�N�
             ��(�VA�g
So�+40.0371-105.2213/���8
�8��d�cv�X�B
G�	�
5'd*�4��"~\�
���������yq������
����E(�80
GPV
GP�i�GPUGP�
GPUGP@��GPVGP
CH�GPUGP�i�GP
UGP�GPVGP
�(�GPUGP�Z�GPU
GP���GPVGP��
�GPUGP���GPU
GP�k�GPVGP��
GPUGP�R�GPU
GP�/�GPVGP�6�GP
UGP�T�GPUGP
�d�GPVGP�=�GP
UGP���GPUGP�P
�GPVGP�8�GPU

... which I don't recognize off hand, but it does have the firmware version, serial and model number of the camera, and at least cursory GPS coordinates. The rest seems meaningful and I bet matches a well-known metadata format.

Will dig.

Invalid GPS coordinates on GoPro 6 - coords completely off track

Please see #27 for the background information.

A further problem I'm facing are coordinate which are completely off track.

BIN file:

GX010039.bin.zip

This is the GPX track I'm getting:

GX010039.gpx.zip

The tracks looks "exploded" in a few places:

qgis-1

This part here is completely off the track. Quite sure I did not drive there:

qgis-4

Same here:

qgis-3

Check the "vertical" part here in the middle. Looks quite consistent. Except there's no road there and I did not drive there. Also consider the part in the upper right corner.

qgis-3

Also get severely inprecise coordinates along the track:

qgis-2

Quik shows a somewhat better looking track:

quik

However Quik does not show almost the half of the drack I actually drove.

I don't think these "explosions" of the track can't be explained by the imprecision of GPS. Ok, I'm fine with a few meters, but I see jumps of several hundreds meters if not kilometers here. Also, this is not visible in Quik.

Instructions to build?

As someone new to GO, there doesn't seem to be a build file or instructions on how to build the project? Could you add a section on build instructions? Thank you!

gopro fusion gives out empty files

Hi
I tested it on the gopro fusion and it gives out empty cvs files.
If you want I could send you short vids for testing?

Cheers
G

ps. thanks for the app. used it already on gopro 5!

Request: Add options to trim seconds

Seems like ffmpeg does not create the correct bin file when using the parameters -ss (to start extraction at a specific second) and -t (the length of video to take from the start point).
Thus it would be interesting to be able to tell gopro2gpx to trim the GPX file with the same 2 parameters instead.
./gopro2gpx -i tmp.bin -ss 20 -t 10 -o tmp.gpx
would extract the GPS starting at second 00:20 for a length of 10 seconds

Hero 7

Thanks for the library

I had to add labels "UNIF" & "SROT" for the Hero 7
I haven't investigated what they are for, but my data requirement is very basic - just GPS.
Will look to ignore missing additional labels at some stage when I work out the best way to do it

Cheers

Errr

» ./gopro2json -i ~/Desktop/GOPR0005.bin -o GOPR0005.json zsh: permission denied: ./gopro2json

'track' variable in json

Hi there,
firstly I want to thank you very much for this code. Saves me a lot of time!

Could you please explain to me what the variable 'track' in the json file from gopro2json exactly is?

Thank you very much,
Patrick

Build and run instructions

After cloning the repo I can not figure out how to build and run on Mac. Please include build / run instructions assuming Go is installed.

go install github.com/stilldavid/gopro-utils/bin/gopro2json@latest
did not work

Stream map '0:m:handler_name: GoPro MET' matches no streams.

When I try to run the example command, I get:

$ ffmpeg -y -i GOPR1265.MP4 -codec copy -map 0:m:handler_name:" GoPro MET" -f rawvideo GOPR1265.bin
ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with Apple clang version 12.0.5 (clang-1205.0.22.9)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.4_2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-avresample --enable-videotoolbox
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'GOPR1265.MP4':
  Metadata:
    major_brand     : mp41
    minor_version   : 538120216
    compatible_brands: mp41
    creation_time   : 2017-12-11T06:45:48.000000Z
    location        : +09.7930+123.3768/
    location-eng    : +09.7930+123.3768/
    firmware        : HD5.02.02.60.00
  Duration: 00:08:41.36, start: 0.000000, bitrate: 30185 kb/s
  Chapters:
    Chapter #0:0: start 415.320000, end 521.360000
  Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 30000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2017-12-11T06:45:48.000000Z
      handler_name    : 	GoPro AVC
      vendor_id       : [0][0][0][0]
      encoder         : GoPro AVC encoder
      timecode        : 06:45:49:05
  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      creation_time   : 2017-12-11T06:45:48.000000Z
      handler_name    : 	GoPro AAC
      vendor_id       : [0][0][0][0]
      timecode        : 06:45:49:05
  Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default)
    Metadata:
      creation_time   : 2017-12-11T06:45:48.000000Z
      handler_name    : 	GoPro TCD
      timecode        : 06:45:49:05
  Stream #0:3(eng): Data: bin_data (gpmd / 0x646D7067), 38 kb/s (default)
    Metadata:
      creation_time   : 2017-12-11T06:45:48.000000Z
      handler_name    : 	GoPro MET
  Stream #0:4(eng): Data: none (fdsc / 0x63736466), 9 kb/s (default)
    Metadata:
      creation_time   : 2017-12-11T06:45:48.000000Z
      handler_name    : 	GoPro SOS
Stream map '0:m:handler_name: GoPro MET' matches no streams.
To ignore this, add a trailing '?' to the map.
$

Any ideas?

Error reading telemetry file Could not find label in list: STMP

I am trying to extract the UTC time from a Gopro fusion camera. I created the binary GPMD from its stream using ffmpeg. However, upon converting bin to json using telemetry I receive the following error:
**
Error reading telemetry file Could not find label in list: STMP (53544d50
exit status 1
**
this is the command I used to convert bin to json:
go run gopro-utils\gopro-utils\bin\gopro2json\gopro2json.go -i GS010805.bin -o GS010805.json

the script works on regular gorpro Hero 6 and Hero 7 videos, but not on the Fusion.
Any help is very much appreciated.

Add HiLight Tags

Hi, I am trying to add a hilight tag write out to the program, here is my progress. Hilight tags are time (in milliseconds) pinpoints in the video. I do not have a HERO5 to test the integration, I found this repo which reads HiLight tags and works with my HERO4 Black footage. To tag a new hilight tag press the side button during a recording or use the GoPro App.

Invalid GPS coordinates on GoPro 6

I am trying to export a GPX track from an MP4 video filmed on GoPro 6.

Somehow I'm getting invalid coordinates. I see several problems which appear on the exported GPX track - but which I don't see on the GPS gauge in Quik.
I will create a separate issue per problem.

First problem is that I'm getting completely off-the track coordinates. Here's a example:

qgis-3

The video is filmed in Germany (around 8.663, 50.232). A few first points on the exported GPX track lie north of Canada (-128.4998971, 80.8641778). Also the elevation for these points is exported as 20841.167 (in reality should be around 202).

Quik seem to show this track correctly:

quik

The complete video is ca. 3.4GB so I can't reasonably share it. I also don't know how can I cut it while keeping all the streams including GoPro MET.

Below is the .bin file I've exported from the video:

GX030039.zip

This is how I've exported it:

ffmpeg -y -i GX030039.MP4 -codec copy -map 0:3:handler_name:" GoPro MET" -f rawvideo  GX030039.bin

Below is the (zipped due to GitHub) GPX track:

GX030039.gpx.zip

Exported using:

gopro2gpx -i GX030039.bin -o GX030039.gpx

Invalid points look like:

			<trkpt lat="80.8641778" lon="-128.4998971">
				<ele>20841.167</ele>
				<time>2018-09-29T10:20:53Z</time>
			</trkpt>
			<trkpt lat="80.8641778" lon="-128.4998971">
				<ele>20841.167</ele>
				<time>2018-09-29T10:20:54Z</time>
			</trkpt>

First valid point:

			<trkpt lat="50.2319754" lon="8.6630605">
				<ele>202.121</ele>
				<time>2018-09-29T10:23:51Z</time>
			</trkpt>

Error running ffmpeg

screen shot 2017-03-31 at 9 40 03 am

Not sure why I receive:

Stream map '0:3' matches no streams.
To ignore this, add a trailing '?' to the map.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.