mapillary / mapillary/mapillary_tools

Images sampled from GoPro split videos repeat the timestamps for each video segment

Open
#505 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
Python
Stars
315
Forks
145
Avg merge
3d 10h
Merged PRs (30d)
2

Description

Basic information
Steps to reproduce behavior
  1. Have a video recorded on GoPro Hero 8 long enough to be split into 2+ files, i.e. videos/GH01####.MP4, videos/GH02####.MP4, etc.
  2. Run image sampling from video, for example mapillary_tools sample_video "videos/" "images/" --video_sample_interval 1
Expected behavior

images/GH01####.MP4/ folder has image files with EXIF timestamps 2022-05-28 18:00:00, 2022-05-28 18:00:01, etc.
images/GH02####.MP4/ folder has image files with EXIF timestamps 2022-05-28 18:09:10, 2022-05-28 18:09:11, etc.
etc.

Actual behavior

images/GH01####.MP4/ folder has image files with EXIF timestamps 2022-05-28 18:00:00, 2022-05-28 18:00:01, etc.
images/GH02####.MP4/ folder has image files with EXIF timestamps 2022-05-28 18:00:00, 2022-05-28 18:00:01, etc.
etc.

Additional information

I believe the problem is that my GoPro 8's split video segments all have the same stream/track creation date metadata. For instance, both videos in the above example would have "Media Create Date" set to "2022:05:28 18:00:00". So my GoPro doesn't actually record each segment's creation time, but only the creation time of the whole recording.

I tried various parameters and combinations, but didn't get anything to work. I tried seeing if there was some place where the code would handle something like this, but also didn't see anything.

What I did locally to fix this (https://github.com/RudyTheDev/mapillary_tools/commit/75620445aca75f662dab6f3f94fe1e0a498feff3) is to keep the total elapsed time and offset every consecutive video by that amount. This is a quick-and-dirty fix that doesn't know anything about the video sequence or GoPro logic, but this does produce the correct/expected timestamps for me.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the sample_video command and split GoPro files, then trace the timestamp handling used by that entry point. Done means successive video segments produce continuous EXIF timestamps rather than repeating the first segment's start time.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.