How extract motion data from Caddx Peanut / Insta360 go2 mp4 files for Gyroflow?

Started by MikeCswe, April 13, 2022, 05:11:41 AM

Previous topic - Next topic

MikeCswe

Although Gyroflow can read motion data directly from smaller Peanut/360 go 2 mp4 files, it can't extract the data from larger files. I know there is windows memory issue here but I was hoping to be able to get around that with Perl (Oliver Betz package), but first I need to understand how to do this on smaller files and get it to work before I move on to this step. As a noob I have to say that the documentation for ExifTool is overwelming when just trying to figure out how to do one specific thing so I am hoping to get a little help here. I did try the search function but all I get is a database error.

What is the command line for extracting motion data from "video.mp4" to a file that I can load in Gyroflow? Gyroflow appears to support motion data files in format .csv which (from what I can tell) ExifTool can write. Other listed file formats on motion data file opening in Gyroflow are ".txt, .bbl, .bfl, .mp4, .mov, .mxf, .insv, .gcsv and .360".

Edit: I'm not sure about the Gyroflow csv file. In the documentation I can only find information about the specific Gyrolow format gcsv: https://docs.gyroflow.xyz/logging/gcsv/

Phil Harvey

The first step is to determine if ExifTool can extract the information you want.  Run this command on a file to see:

exiftool -ee3 -G3 FILE

- 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 ($).

MikeCswe

It looks like it can. I ran -ee without -g3 ealier and it appears to be the same result with the exception of ---- DocXXXX ---- entries.

The output files have a several thousand of these entries. I'm not yet sure if they are enough for Gyroflow though.

Time Code                       : 145.206
Accelerometer                   : 0.943359375 -0.077392578125 0.24267578125
Angular Velocity                : 0.366450965404511 0.0671116560697556 -0.105461180210114

and

Time Code                       : 292.179
Exposure Time                   : 1/50


Phil Harvey

OK, so it appears that ExifTool will be able to do what you want.  The challenge will be to format the output in a way that Gyroflow will accept.  The technique will be similar to the way this format file generates a GPX output from GPS data.

- 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 ($).

MikeCswe

Thanks. That looks a bit beyond me. I can at least try ExifTool output to .csv file and see if Gyraflow can accept it?

I was not able to figure out how to export from ExifTool to .csv. If I add -csv like this "exiftool -ee VID.mp4 -csv > out1.txt" then the output does not include the Accelerometer or Angular Velocity data.

Otherwise I guess I can try to find some simple text file re-formatter that I can hopefully understand a little. Any tips for a noob?

Phil Harvey

...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 ($).

MikeCswe

Could you help me out with the command line to use? I tried with -p csv and all I got was a huge file with only entries of "csv" in it.

MikeCswe

Don't worry about it. I tried the Oliver Betz package and the file I want to use is too large even with "-api largefilesupport", so ExifTool isn't for me. Thanks for your time.