Ask a Question
GoPro Support Hub Ask a question. Share an answer. Find a solution. Stay stoked.
Announcements
Is your GoPro gear up to date? Check to see If it is on our Update page.
Cameras
Reply
Hiker
Posts: 25

GPS time discrepency between GoPro's

[ New ]

I've been trying to use the GPS timestamps to sync video clips from multiple GoPro's. It works well, except it is always off by up to a second. It seems somehow the GPS time is not consistent from one camera to the next. I threw together a video to demonstrate. It is basically split screen with my Hero 7 Black on the left, and my Max on the right. I've added the GPS timecodes as subtitles for each. When each timecode appears, that is the position it was originally muxed into the video by the GoPro camera.

 

I've stitched the Max video, but I verified that doesn't change the sync at all. Anyone have an idea what is going on? I know the GPS data is only written every second, but I assumed the GoPro wouldn't wait up to a second to write the data.

 

Nomad
Posts: 1,106

Re: GPS time discrepency between GoPro's

[ New ]

That's interesting. How are you extracting and syncing the data?

 

You might get a better answer at the gpmf repo issues section: https://github.com/gopro/gpmf-parser

Hiker
Posts: 25

Re: GPS time discrepency between GoPro's

[ New ]

I wrote Perl code to parse it using the documentation from that link and Apple's for the MP4 structure. I'm not that comfortable working with C. But the MP4/GPMF structure is pretty simple. There is no composition offset (ctts) for any of the tracks, and no edits (edts) for the GPMF track, so it starts at 0. The elapsed time position for each GPMF sample is determined by using the time-to-sample table (incremented by duration/scale seconds with each sample). Do you have C code that could do the same using gpmf-parser? I'm confident it would show the same results. But it would probably take me a long time to figure out C and their code and get a compiler working. Longer than it took me to write my own code anyway.

Nomad
Posts: 1,106

Re: GPS time discrepency between GoPro's

[ New ]

That's pretty much what I do with my own JavaScript implementation. I haven't seen such discrepancies, but I haven't been testing for sync between different cameras, really. The new ones (Hero8 and Max) encode som additional timestamp information in the gpmf track, and there you can see the samples do not start exactly at 0 (but it's pretty close).

 

I would maybe raise the issue on the gpmf repo, David Newman usually responds.

Hiker
Posts: 25

Re: GPS time discrepency between GoPro's

[ New ]

Thanks, I just posted an issue to gpmf-parser as you suggested:

https://github.com/gopro/gpmf-parser/issues/89#issue-598550801

 

What timestamp information are you referring to? I see the TSMP for both the Hero 7 and Max. That seems to be a running total of all the GPS samples it obtained which eventually rolls back to zero. I can see if the GPS timestamp doesn't change, neither does that number. I see STMP for the Max but not Hero 7, which apparently is a high-precision microsecond timestamp. Not much documented about it though, and I don't recognize a pattern to how that giant number changes.

Nomad
Posts: 1,106

Re: GPS time discrepency between GoPro's

[ New ]
Sorry, you're right, STMP does not play a role here. Those are microseconds since the video started