gopro-utils icon indicating copy to clipboard operation
gopro-utils copied to clipboard

Support GP5. Data Type

Open stilldavid opened this issue 7 years ago • 19 comments

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.

stilldavid avatar Apr 05 '17 23:04 stilldavid

Hi David,

Not sure if here's where I should post this, but after the firmware update to v2.0 the .bin files of my H5 Session (extracted with ffmpg) are not readable by your gpmdinfo. Probably you were already aware of this, but just in case.

Could not find label in list: GPRO (4750524f)

JuanIrache avatar Apr 06 '17 22:04 JuanIrache

Thanks, Juan! The update I just pushed added the two new types (GPRO and GP5.) to the list of "known" telemetry types so it will now parse the files again, but there's still some figuring to do to get at the new stuff in the firmware update (like ISO and shutter speed and whatnot).

stilldavid avatar Apr 06 '17 23:04 stilldavid

That was quick. Thanks!

JuanIrache avatar Apr 06 '17 23:04 JuanIrache

Will dig deeper myself when I get a chance, but still after updating your code my new files cannot be read.

fmt.println(t.Gyro) in gpmdinfo gives me

[] &{[] [] [] {0} {0} {0001-01-01 00:00:00 +0000 UTC} {0}}

And sometimes

Could not find label in list: TICK (5449434b)

JuanIrache avatar Apr 06 '17 23:04 JuanIrache

Can you send me a copy of an .mp4, or at least the .bin file associated with a file that has a TICK in it?

stilldavid avatar Apr 06 '17 23:04 stilldavid

Apparently the data should fine on Session's v2.00: https://twitter.com/David_Newman/status/852211507584741377

I have uploaded some samples that don't work for me, from both firmware versions. Bins: tailorandwayne.com/sessionbins.zip Mp4s: tailorandwayne.com/sessionmp4s.zip

Hope it helps

Edit: I just realised in framerates over 60fps sensor data appears to be in Stream #0:2 instead of Stream #0:3

JuanIrache avatar Apr 12 '17 18:04 JuanIrache

Ok, so I've seen how to ignore the undefined labels (from v2.00 files) and get to the data anyway. These are the ones I've found: TICK, STNM (appears to list settings, maybe a header?), ISOG, SHUT (ISO value and shutter speed, presumably).

You can find this in file v2.00-90fps.bin from the previous post

JuanIrache avatar Apr 12 '17 21:04 JuanIrache

In the ffmpeg command, you can replace

-map 0:3

with

-map 0:m:handler_name:" GoPro MET"

And the metadata will always load, even if it's not in Stream 0:3 (which happens in high framerate files). Note that the string starts with a TAB, not spaces.

(should I post this somewhere else? It's not related to GP5)

JuanIrache avatar Apr 13 '17 13:04 JuanIrache

should I post this somewhere else

If you want to make a pull request that updates the docs, I'd be happy to merge it :) I'll see if I can find time today or tomorrow to go through the ISOG and SHUT codes as well!

stilldavid avatar Apr 13 '17 15:04 stilldavid

If you want to make a pull request that updates the docs

Hopefully I did that right. First time I use Github for more than commenting.

I created a small package with ffmpeg, a modified version of your gpmdinfo that extracts data to csv and a script that puts it all together. Is it ok if I share it? I've put your attribution + license in a readme.txt, not sure if that's the right way to do it. Thanks

JuanIrache avatar Apr 13 '17 16:04 JuanIrache

Here is the GoPro official public GPMF parser https://github.com/gopro/gpmf-parser

dnewman-gpsw avatar Apr 24 '17 17:04 dnewman-gpsw

Hi I am facing this error - Could not find label in list: TYPE (54595045)

Could someone please help.

Thanks

shuchitagupta avatar Nov 25 '17 08:11 shuchitagupta

@shuchitagupta which camera are you using?

JuanIrache avatar Nov 25 '17 12:11 JuanIrache

@JuanIrache GoPro Hero 6

shuchitagupta avatar Nov 25 '17 12:11 shuchitagupta

@shuchitagupta If you can share a very shor clip sample with us, I'll have a look

JuanIrache avatar Nov 25 '17 12:11 JuanIrache

@JuanIrache This is a small clip - goo.gl/LshnvQ

shuchitagupta avatar Nov 25 '17 12:11 shuchitagupta

@shuchitagupta Thanks. I added the missing labels an created a pull request.

JuanIrache avatar Nov 25 '17 13:11 JuanIrache

Thanks for the sample Shuchita and for the quick response, Juan! Merged.

stilldavid avatar Nov 25 '17 16:11 stilldavid

@JuanIrache Thanks for the quick fix.

shuchitagupta avatar Nov 26 '17 07:11 shuchitagupta