on 01-30-2018 02:25 AM
on 01-30-2018 04:56 AM
@kajuna I recorded a 10 sec sample video with the GPS turned on. The GPS data is present in the CSV. I compared the location data with that of my iPhone. The Latitude and Longitude seem correct but I'm not sure about the Elevation. The Elevaton according to the Compass app on my phone is 730 ft. Converting to meters that is approx 222 m. The Elevation in the CSV varies from 152-190 even though the camera location did not change much since I held it stationary.
Also, there are 3 others fields in the GPS file the with zero data -- Speed, Speed3D and TX. Is that because they are not present in the sample?
The tmp file seems correct. I don't know how to validate the accl and gyro files. Below is a link to the CSV files.
I would appreciate any help.
on 01-30-2018 06:24 AM
Altitude seems fine, GPS altitude is never very accurate, I believe. Drones use a barometer for that purpose instead.
01-30-2018 09:31 AM - edited 01-30-2018 09:35 AM
@kajuna Here you go. See link below. Interesting that this one has the other GPS values -- Speed, Speed3D -- but not TX. Thank you!
on 01-30-2018 10:39 AM
on 01-31-2018 08:01 AM
Just jumping in here; I have a Fusion, and I want to stitch the raw footage using CaraVR in NUKE. This isn't a problem, but I know I will be losing the excellent on-board stabilization that comes from the gyro and accelerometer.
I've read through this thread and have a grasp on extracting the data from the video stream, but I need some help moving from there.
Is it possible to utilize the extracted .csv to stabilize my footage in AE or NUKE? Thanks.
on 01-31-2018 08:37 AM
Also, I suspect stabilising the Fusion is going to be extra tedious compared to the Black and Session cameras...
Just to summarise: I extract the data to CSV using GPMD2CSV, then fine-tune the Processing sketch to fit my needs and the footage, then Processing exports new CSV files that I can paste into an After Effects layer.
on 01-31-2018 09:00 AM
Keep in mind that axis do change between cameras, so you might want to start by doing simple tests. Then reflect the changes you detect in the code (columns assigned to what variables?) or rename the CSV columns
on 01-31-2018 09:54 AM
It is an intensive process, both workflow and hardware wise, but well worth it!
on 01-31-2018 10:11 AM
03-05-2018 02:25 PM - edited 03-05-2018 02:25 PM
Thanks for the work on getting metadata from gopro cam.
Does someone write a go file that extract data from hero 5 or 6 black with all informations and the associated Dashware data profile ?
on 03-13-2018 04:46 PM
on 06-01-2018 04:48 PM
I have Gopro Fusion. It will be apprecite it if anyone guides me Step-by-Step to extract the GPS data and use it with Dashware. I tried to follow the steps in the 1st post but without success.
on 06-03-2018 07:26 AM
Please, check the additional steps If you are interesting to have the telemetry data in GPX format.
These are the additional steps to export the telemetry data in gpx format:
15: Create a folder in %USERPROFILE%\go\src\github.com\tkrajina\ (replace %USERPROFILE% with you user profile folder, usually something like c:\Users\yourName\) You can get more help on this here: https://golang.org/doc/
16: Download the gpxgo from https://github.com/tkrajina/gpxgo by clicking on the green "Clone or download" button. Download as zip.
17: Unzip what you just downloaded, open the new folder and copy its content (it's also a folder named "gpxgo-master") in the \tkrajina\ folder that you just created.
18: Remove the "-master" part from the folder name, so that it becomes "gpxgo".
19: GGo to your folder \go\src\github.com\stilldavid\gopro-utils\bin\gopro2gpx\, unselect any file and do SHIFT+RIGHT MOUSE CLICK and select "Open command window here"
20: In the command prompt, write "go build", withouth the quotes and press ENTER. This should create a gopro2gpx.exe file.
21: copy both the .bin and your .mp4 video files to the \gopro2gpx\ folder of step 8. Paste them.
22: Open a command prompt and type: "gopro2gpx -i filename.bin". This will create .gpx data file. Copy it somewhere safe with the original video file, as the next file you process will overwrite them.
Note: For Gopro Fusion, the telemetry data is stored in Fusion FRONT camera video file.
@kajuna You may add them in the 1st page if you think it will better.
09-28-2018 01:29 AM - edited 09-28-2018 01:30 AM
RaceRender 3 free version it is possible to export maximum 5 minutes, is it other software for export gpx or kml file, please?
09-29-2018 06:31 AM - edited 09-29-2018 06:31 AM
on 10-01-2018 09:02 AM
I just tried the Tailor and Wayne extraction program. Very good, except that there are problems.
The program creates gpx, kml and json, and some csv files. Of the first 3, I can only open the gpx file in GPSU.
Dashware creates a large csv file as well. Comparing the Dashware csv file with the gpx file produced by the GPMD2CSV program, there are 2 major problems. GPMD2CSV takes the wrong column of information for the elevation. It uses the field Elevation_i, which is about 34 to 38 below the actual elevation, rather than the column: Elevation Meters. I have tested this thoroughly using the gps program on my cell phone, looking at the results in DashWare, as well as elevations produced by GoogeEarth and OpenStreetMaps (OpenTopoMap). Where I live, at about 26 m above sea level, GPMD2CSV has me below sea level, whereas my gps, Dashware, GoogleEarth and OpenTopoMap all have me at the correct elevation.
RaceRender also uses the same incorrect data. For the distance, there is a distance column in the Dashware csv file and it also shows up on the timeline of Dashware. The distance given in the gpx file by GPMD2CSV is 10 to 15% too long. RR gives a similar excessive distance. This, too, I tested against my cell phone gps program.
Below is a link to a thread on the RaceRender HPTuners forum. See message #10 for my detailed explanation.
Have you done any testing to validate the results of the conversion program?
on 10-01-2018 12:45 PM
I have not tested my tool thoroughly for GPS data, as I own a Hero 5 Session, which only includes IMU data, not GPS. I have only worked with sample data. The fields you are referring to (Elevation_i, Elevation Meters...), though, are not data that can be found in the GoPro video files, as far as I know. I believe they are computed values created by Dashware, and I have no idea how they deduce those values from the existing data. Regarding elevation, they probably try to convert altitude (relative to the floor) to elevation (relative to sea level), but I don't know how. My tool just extracts the existing data to a bunch of common formats. I can only access one altitude value from the raw binary data. I just tested a bunch of sample files and they all return negative altitude values, could it be that they need to be turned positive?
Also, keep in mind that GPS altitude is very, very inaccurate. Barometer altitude is much better, but it is relative to the starting point (it does not know where the sea is, so to speak). Probably GoPro combines a barometer and the GPS antenna to deduce a value, but dont know really, and even if they do it could be off.
Regarding distance. What do you mean? I don't include a distance field in my files.
Sorry I can't be of much help.
10-01-2018 01:39 PM - edited 10-01-2018 01:40 PM
Thanks for starting this conversation and all the work you (and others) have done with the Metadata from the GoPro cameras. While I understand, at a very high/gross level what you are doing the details are beyond me at this time. And, my needs are much simpler than yours and most people in this conversation. So, excuse this set of simple questions.
It seems all your tools don't work on a MacBook Pro (I'm assuming that based solely on the file extensions used). While the results can be used with other programs (Google Maps) and exported to devices such as Garmin, my need is much simpler. I need what Quik is supposed to do, maybe a bit more after reading the extent of the data that GoPro records in the metadata of their videos. Also, you (or someone) mentions time (of day). The GoPro Quik app is always completely wrong, and I need it.
What I am trying to do is have the basic information: Speed (and changes graphed), direction (GPS map overlay on a Google map segment - able to zoom in and out?), altitude, elevation gain, distance (mileage - across video files, since GoPro creates numerous video files limited in time), average speed. Rotation, G-Forces are not important. The most important part is that this information is overlayed and oviously sync'd with the video. I use the GoPro in my coaching to do video analysis of runners, cyclist and swimmers. I know that GPS signals don't penatrate water or are available indoors, but I can live with that.
Also, any idea of GoPro's intent and progress in fixing the problems they have, which I suspect are with the Quik app?
on 10-02-2018 06:26 AM
and thanks for this great conversation which could solve my longtime problem with gopro rotation upside-down while kitesurfing and the cam positionend in the kitelines.
The rollercoaster effekt is amazing and represents exactly what I am looking for: a possibilty to level the horizon permanently. All the gps data is not important for me, it's all about the gyro.
For a better understanding of my problem here two clips: The first is straight out of cam and makes headaches watching and the second is using kind of gimbal (which is positioned behind the cam in the lines but unfortunately not waterproof) but makes footage great for viewing.
Now I followed the instructions mentioned from these great people here who create such genies codes and got an export folder with 7 files (.gpx, .json, kml, accl, gps, gyro, temp).
It is written: „Once your data is exported to csv, open the file, copy the content and you can paste it to an After Effects layer.“
Now the problem starts. Which file is meant with csv and how do I open it and how to paste it in an AE layer?
Could somebody explain me this?
Excuse me for kind of „hijacking“ this thread,(and my bad english btw) but it seamed the exact right one to post my questions and find finally/hopefully (after a very long time and lots of online hours and keyframing) a solution for my problem.
on 10-02-2018 06:39 AM
My tools allow you to extract the data in some useful formats, but they don't create the kind of graphs you are after. You can probably use the extracted files to create the visuals with other software, but I'm not sure which one. Maybe Dashware or RaceRender work better for your needs, they should read the data in the video files directly, and create the graphs, but I don't have much experience using them. If I were to do that myself, I would convert the data files to use them in after effects and greate the graphs there, but that requires some technical knowledge of coding and the program itself.
My tools are for Windows indeed. There's nothing preventing someone from using my code to compile Mac versions, but that's not my field so I can't do it right now.
No idea if they're working on solving things. I wouldn't hold my breath, but we'll see.
on 10-02-2018 06:44 AM
Amazing videos, @silkem552!
In order to paste the data in After Effects, you need to be using the Processing sketch:
I know the workflow is a pain in the ass. I created this for my own experiments and it's not easy to use if you're not familiar witht these tools.
So after you've exported the files with the GPMD2CSV tool, you need to (configure and) run the Processing sketch, which will produce the CSV files with information to be pasted in After Effects. And even then you'll need to tweak keyframes here and there, especially when changing direction.
on 10-02-2018 10:16 AM
thanks for your reply and support.
So this means, that there will be no possibility to simply drag&drop my unrotated file and get via the gyro information a fine rotated/horizon levelled output? With you rollercoaster clip you also had to do keyframing?
Do have another idea, how I could achieve my goal without too much of keyframing. Keyframing a 2 hour kite session is an awful lot of work :-)
By the way I have the Gopro hero 7 black. The fact, that the display can rotate doen't change anything, right?
I heard about a feature called warp stabilizer in Premiere - does anybod has experienced with this? It is supposed to level also the horizon, but takes an eternity to do this...
on 10-02-2018 12:52 PM
@silkem552 Yes, that's what it means. It would be possible to create a software that does a good job at leveling the horizon, but I personally am too busy, and it would take too many work hours for the little demand there is. The rollercoaster video needed some keyframing every now and then because gyros have drift and my z-rotation values changed when the coaster would turn in another axis (using the accelerometer data and/or a magnetometer it should be possible to make up for the drift, and maybe there are better rotation equations that I don't know of), but the fine adjustments in the rotation axis are very accurate just using the gyro.
I think you should disable image rotation, that's what I do on my Hero5 to prevent it from rotating 180º when upside down. I guess it's the same with the portrait mode on the 7.
I've used the warp stabilizer on After Effects. I don't think it levels the horizon. It probably has no access to gyro data, just image-based vibration. Maybe if you tell it to create "no movement" you'll get something similar, but I expect it to be messy when filming on moving water
10-02-2018 12:57 PM - edited 10-02-2018 01:01 PM
Thanks for taking a look at this.
"I just tested a bunch of sample files and they all return negative altitude values, could it be that they need to be turned positive?"
No. In the many files that I have looked at, the elevation that you are using is always 33 to 38m too low. Using the Dashware csv file and comparing the columns Elevation_i and Elevation Meters, the different between the column is not constant within one file. Dashware elevation readout uses the correct information. Somehow, there must be something in the video file that gets the correct information. Column Elevation Meters is close to what I get with my GPS (cell phone) and reality. RaceRender uses the incorrect elevation information, particularly when exporting the information obtained from the GoPro file to GPX.
"Regarding distance. What do you mean? I don't include a distance field in my files."
Attached is a screen shot of the GPX file created by GPMD2CSV and opened in GPSU. You can see that the second last column is m, which is a distance (598m). Where does this come from if you didn't include it in the program that creates the GPX file.
Dashware shows the distance at the end as 470m.
The distance in the Dashware csv file corresponds to a column in the csv file, and this distance is used in the graphical displays/readouts in Dashware. This is quite close to what I get using my GPS. The distance that gets calculated by programs using your GPX data, including GPMD2CSV output, or using the GPX data exported by RaceRender, is significantly longer than the actual distance. I don't know how the programs calculate the distance traveled using the coordinates (and elevations) from a GPX file.
As kajuna mentioned, the best for you would be Dashware. GoPro and Dashware are working together; in fact, Dashware support is with GoPro and this present forum is the one to use for Dashware. Dashware has a multitude of gauges that can be used. It's free. However, DashWare is a Windows PC application, but it also runs on Macs under VMware, Parallels or Boot Camp. Are you able to do this?
Alternatively, RaceRender works with PC or Mac. For more than exporting 3 minutes, you have to pay. There are various levels.
Both can use a green screen as background so that the resulting video can be used in a video editing program - the green becomes transparent using Chromakey green. I stabilize, clean up, colour-correct and edit my GoPro files, something that Quik, RaceRender and Dashware can't do. Then I superimpose the gauges from the green screen video over the modified GoPro footage.
RaceRender Advanced Edition allows you to import a map and place it as background for the route, and you can zoom on it. This requires some work in a photo/graphics editor to get it right. There are other methods that I use.
Try both. Quik is definitely not the program to use. It is only for making quick and dirty videos, and getting files from a GoPro to a computer.
If you want more help on this, I suggest that you open a separate thread.
on 10-02-2018 01:34 PM
@jcbvideos I might be wrong, because my work is based on another repository ( https://github.com/stilldavid/gopro-utils ) and I'm no expert in Go, the language initially used to read the data. But I still believe there is only one source for altitude. Also looking at the official GoPro documentation it looks like so: https://github.com/gopro/gpmf-parser
Dashware might be taking into account the elevation of the ground at any given latitude and longitude, or something like that (after reading the same data). There could be more data I'm missing in the binaries, but I would be unable to extract it at the moment (and looking at the source code I don't think there is).
You're welcome to open an Issue so that other developers look into this: https://github.com/JuanIrache/gopro-utils/issues
Regarding the distance, I think the column "m" in your screenshot was created by "GPS utility" by computing latitude, longitude, and probably altitude, which would explain why it is different in Dasware (altitude is different). Open the gpx file in a text editor and you'll see that the M (and m/s) values are not there.
on 10-04-2018 08:24 AM
Github - This is beyond my limited computing capabilities, including posting an issue on their forum.
The author of GPSU confirmed that it creates the last few columns, including the distance column, from the points. Here is his reply:
"The distance figures are always calculated from the coordinate data (and the speed data from the distance/time data). In GPSU they are just meant to be a comment and nothing more than that.
The actual calculation used depends upon whether you have a Lat/Long projection or a Grid projection (e.g.UTM) and on the setting you have set in the Options|General dialog for the 'Earth Model'. (See the Help topic on that dialog for info).
Many programs have a 'Digital Elevation Model' (DEM) built in and so can derive elevations from the coordinate data. GPSU does not come with DEM data, but you can get the data from online sources and GPSU can then make use of it to generate elevation data - see the Help in GPSU on 'DEM' for more information on this subject."
GPSU allows smoothing of the data by reducing the number of points. Doing this brings the distance travelled much closer to reality.
So, I will use a combination of GPMD2CSV, Dashware, RaceRender, GPSU, and GoogleEarth, depending on my needs. If I want gauges, I'll use Dashware or RaceRender. For just getting the gpx file, I'll probably use GPMD2CSV, and then massage the results, same for combining files.
Split GoPro mp4 files can be handled either by using GPMD2CSV plus merging using GPSU, or using RaceRender, which recognizes them and merges/joins them.
I am presuming that GPMD2CSV does not recognize split GoPro files (i.e. when the recording exceeded 4GB, a second file is created by GoPro). Is this correct?
on 10-04-2018 08:35 AM
"Many programs have a 'Digital Elevation Model' (DEM) built in and so can derive elevations from the coordinate data."
That makes sense. Dashware might be using something like that to derive more accurate elevation values and create the Elevation_i column. Although that would be cool to implement, it is beyond GPMD2CSV's scope. I just created to export the raw(ish) data from the video files, how you interpret it or use it is another (interesting) subject.
"I am presuming that GPMD2CSV does not recognize split GoPro files (i.e. when the recording exceeded 4GB, a second file is created by GoPro). Is this correct?"
Correct. You can drop multiple files on the tool and it will create separate files. Initually the tool was created for CSV files (as its name implies), and merging two CSVs is really easy, you just copy and paste the second batch of rows at the bottom of the first one. You can probably do the same to the GPX files if you open them with a text editor (and look carefully where you should paste the additional data), and there probably are tools that merge a bunch of GPX files easily.
Thanks for posting your conclusions here :)
on 10-04-2018 10:19 AM
Google Earth seems to do a good job at providing reasonably accurate elevation data using the gpx imported file. As you point out, one can correct data in the csv file, but the easiest is to use GPSU.
Thanks for replying about multiple files.
Multiple files can also be handled in:
1. Dashware by clicking on the merge button >> instead of the + button. A merged csv file is created.
2. RaceRender recognizes them automatically, asks, then merges into one file. The exported gpx file will be the merged information.
3. GPSU by selecting File, Merge files, from the menu and selecting each of the individual gpx files.
I have used my GoPro on some walks with multiple files, but they were created by starting and stopping the camera at various points (rest points or viewpoints) along the way. The files were merged as above, except for RaceRender in which they first had to be imported and then joined. Worked well.
My only problems have been the distance and elevation information, which, as I pointed out in my other post and above, can be handled by smoothing the data (reducing the number of points, mainly those that have sudden deviations from what looks like the track), and using Google Earth.
There is one last problem that I asked about in another thread, that of identifying Hilight points. It would be helpful if GoPro would tell us how to do this....other than listening to the video recording and locating where in the video one says "GoPro Hilight."
Again, thanks for your replies and assistance.
on 10-04-2018 10:37 AM
on 10-12-2018 04:36 PM
I spent a couple of hours trying to get gpmd2csv to work. I followed kajuna's steps. Yet when I drag a GoPro MP4 file to gpmd2csv I get file not found errors (e.g., Windows cannot find '.\bin\ffmeg''; same thing for gpmd2.csv and a host of others). I created the directories as indicated and put the needed folders in such directories as indicated. Any suggestions?
on 10-13-2018 07:01 AM
Ahhh, that explains it. I was mixing apples & oranges (doing the build & using the pre-built tool). Once I used just the pre-built tool, all worked. Thanks for quick and helpful response!
10-13-2018 07:33 AM - edited 10-13-2018 07:35 AM
I spoke to soon. I no longer get file not found errors, but when I drop the GoPro MP4, THM, and LRV files (I've also tried only dropping in the MP4 file) into GPMD2CSV, and then I load the MP4 and resulant GPX file into VIRB Edit, the GPX file comes up in the Google Maps section as a route traversing the Atlantic Ocean??
FYI, when the bat file is running, I get hundreds of reports of "Could not find label in list: ALLD (414c4c44)"
on 10-13-2018 08:00 AM
Are you using the latest bundle of the gpmd2csv tool? It should filter out most of those bad locations. Could you upload the exported files (or the .bin files) for me to have a look?
on 10-13-2018 06:08 PM
Appreciate all your help kajuna. All has worked well, Created 3 GPX files for 3 consecutive GoPro MP4 files. Now I'm going to try and use Virb Edit to stitch all 3 together into, presumably, a single MP4 and single GPX file. I you have any tips on doing that, I'd be grateful, When done, I'll be uploading it to bkool.com so that I can do the virtual ride using my indoor bike trainer.
on 10-13-2018 08:02 PM
GPX files are XML files, which means you can edit them in a text editor. I use Notepad++ on Windows and TextWrangler on OSX, but you should be able to use the built-in Notepad or TextEdit. Don't use a word processor like Word or OpenOffice.
Open the second GPX file in a text editor. Copy all the stuff between <trk> and </trk> inclusive.
Open the first GPX file in a text editor. Paste the copied stuff after the </trk> line near the end of the first file and save.
If you have more files, repeat.