GoPro Fusion Binary Data

Started by Katsuro, April 09, 2019, 01:00:36 AM

Previous topic - Next topic

Katsuro

Attached is a sample txt file by running the following command.
exiftool.exe -ee .\GPFR1472.MP4 > u1472.txt

Before going into what I'm asking for and hopefully someone would be able to help I'll give some backstory.

There is a parasailing business that uses GoPro Fusion cameras on their boats. When the customers of said parasailing business goes up in the air the GoPro fusion is mounted onto the seating equipment and records the clients and their parasailing experience.

After that the pair of SD cards are plugged into a computer and one of the employees execute a python script that was created that will copy the files, render the videos, name them, and then upload the rendered videos to YouTube. This works pretty well and haven't really had much problems with this workflow except for the occasional video that is upside down. So much for working well? Haha.

I have done quite a bit of searching across the internet for solutions with the GoPro Fusion recording upside down and haven't had much info. The manual states that you can change the Fusion orientation to Auto Mode, Rightside up, or Upside down within the GoPro App on your mobile device. It would of been a perfect solution to disable the auto rotate function and tell it to always record in a specific orientation. Except.. it seems like despite being in the manual they removed the setting from the Android and iOS App. There is a few posts in regards to this on GoPro's forums but the most anyone over there on their team can do is shrug or say "I'll suggest it" to the development team. I don't really expect much to be done here since I'm sure the Fusion users are a minority group.

So I'm seeking out some way that we can detect a video being upside down within the video metadata. The gyroscope information came to mind and I know it could be pulled. I came across this wonderful tool and seems totally what we need. Now I'm not exactly sure if viewing the gyroscope information would be helpful but I would like to compare the info between rightside up and upside down videos to see if there is something there. If it works then we would make the python script detect the orientation of the video file and turn it right side up and resolve the issue with the buggy cameras.

These GoPro Fusion files are about 2.3GB each chapter and about 7min of video data in each file. If I run the -b flag to extract the binary data I would get a 150MB+ file from the multiple measurements that is made during the duration of the 7min chapter file. I was wondering how I would go about only extracting a single Gyroscope measurement out of a large file.

The other thing that has come up in my head as I write this is even if I was to get a single gyroscope measurement and it is in this 'binary' form - will I be able to make sense of it by just looking at it? Or will I need to do something further to be able to read any sort of rotation rates among the x, y, z axis? When running the -b flag I get tons of text in this form: -0.226837060702875 -0.323748668796592 0.0851970181043663 -0.218317358892439 -0.35356762513312 0.101171458998935 -0.217252396166134 -0.34185303514377 0.080937167199148 -0.280085197018104 -0.354632587859425 0.122470713525027 -0.349307774227902 -0.34185303514377 0.0745473908413206 -0.406815761448349 -0.349307774227902 0.122470713525027 -0.4419595314164 -0.338658146964856 0.0990415335463259 -0.469648562300319 -0.345047923322684 0.115015974440895 -0.431309904153355 -0.347177848775293 0.134185303514377 -0.397231096911608 -0.326943556975506 0.0830670926517572 -0.322683706070288 -0.338658146964856 0.117145899893504 -0.257720979765708 -0.331203407880724 0.0926517571884984 -0.195953141640043 -0.33013844515442 0.104366347177849 -0.171458998935037 -0.306709265175719 0.0958466453674121 -0.185303514376997 -0.358892438764643 0.0851970181043663 -0.234291799787007 -0.266240681576145 0.0745473908413206 -0.269435569755059 -0.333333333333333 0.0681576144834931 -0.336528221512247

But don't know how I would go about reading that..

This is kind of a shot in the dark but it is the only thing I can think of in regards to figuring out some way to have the python script figure out if a video is upside down or rightside up. Unless someone has any suggestion in terms of figuring this out video orientation without user interaction? Any help or point in the right direction would be appreciated.

Phil Harvey

I believe the gyroscope data gives rotational velocity, which may not be what you want.  Units are radians/second, and the data is in groups of 3 values for rotation around the X/Y/Z axes.

Do this to extract a single gyroscope record (although it contains many sets of the 3 values):

exiftool -ee -b -copy1:gyroscope FILE

But I think the Accelerometer data may be more appropriate for determining the orientation.  This gives the acceleration along each axis in m/s2.  The axis that is close to 10 m/s2 is up/down.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Katsuro

Hey Phil,

Thanks a lot for the info! I'm looking into the Accelerometer. Now that I'm looking at the data I think the first sample of the data isn't that accurate as they are most likely touching the device and stuff like that. In this case I might want to take a look at the whole set of Accelerometer data and I see that -copy1: is used and I tried to exclude the 1 value to hopefully get all measurements for the duration of the clip but that didn't spit out any output or error. I do see doing -copy2: and so on will give me different sets of data. I didn't find any usage with the copy flag within the exiftool documentation so I suppose I would ask here in regards to that. What would I do to get the info for the duration of the whole video?

Regards,
-Mark

Phil Harvey

Just use -Accelerometer without a copy number to get all of it.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).