Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discrepancy in video frame and GPS data #204

Open
bphilli7 opened this issue Aug 9, 2024 · 1 comment
Open

Discrepancy in video frame and GPS data #204

bphilli7 opened this issue Aug 9, 2024 · 1 comment

Comments

@bphilli7
Copy link

bphilli7 commented Aug 9, 2024

Exploring this a bit more and I am not sure what causes the synchronization issues, but here is where my debugging has taken me:

Video clips: 4k timewarp video with auto timescale ("timewarp.mp4") and 1080p 30fps video ("normal.mp4")
Camera: gopro hero 10

Both videos have multiple segments, but for debugging I am only looking at a single segment from each video (not using the joined video).

The timestamps from timewarp.mp4 are "jittery". I used exiftool to extract the GPS timestamps, and then did some processing in excel. I converted the timestamps to a ms count subtracted each element n from n-1 to get a diff(vector).

image

In the class GPS5EntryConverter point_count is always 1 for the entire timewarp video. For the normal video it is usually 10 (though sometimes 9 and sometimes 11). I believe earlier gopros collect GPS data at 18Hz, but the GPMF github readme appears to note that the GoPro11 is collecting at 10 Hz. I wonder if a firmware update (my gopro 10 is on the most recent firmware) also changed the gopro 10 to a 10Hz collection rate? The timewarp also appears to be trying to collect at 10Hz, but the jitter is very pronounced.

In any case, I have commented out the _short_packet_count error messages from the function.
https://github.com/gopro/gpmf-parser/blob/main/README.md
image

I would like to investigate how the code is processing these "jittery" gps timestamps in the timewarp video, to see if that is the cause of the video/overlay synchronization issues I have. I believe I read some messages about the interpolation function (to convert 18Hz GPS data to 10Hz overlay frame metadata), and wonder if that is being challenged by 1 point_count GPS data that is also jittery.

For the normal video, if the gopro is sampling GPS data at 10 Hz, it means that little/no interpolation is necessary to create the 10 fps overlay video. Just a thought.

@bphilli7
Copy link
Author

bphilli7 commented Aug 9, 2024

interpolation is never called when rendering the timewarp video... so I am doubtful it has to do with interpolation.

This looks like it could be the cause:
image

If the timelapse correction algorithm assumed a constant framerate instead of the jittery timestamps, it could be miscalculating the overlay data for a given frame of video, perhaps?

Update: non-issue... this factor is the total duration of metadata/timestamps divided by the total length of the video.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant