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

EXIF time problem when extracting photos from split videos #606

Closed
PierreSerpe opened this issue Mar 14, 2023 · 3 comments
Closed

EXIF time problem when extracting photos from split videos #606

PierreSerpe opened this issue Mar 14, 2023 · 3 comments

Comments

@PierreSerpe
Copy link

Basic information

  • Release version: mapillary_tools version 0.10.0
  • System: Windows WSL2 Linux
  • Capture Device: GoPro Hero 11

Steps to reproduce behavior

  1. Record a movie with GoPro Hero11 lasting long enough to have an automatic file split
  2. Use the following command to extract photos from the videos: mapillary_tools video_process MY_VIDEO_DIR MY_SAMPLES --video_sample_distance 5
  3. Check the EXIF time of the last photo extracted from the first and second video. Compare EXIF times of photos extracted from both videos.

Expected behavior

The EXIF time of the first photo extracted from the second video should be equal to the EXIF time+~1sec of the last photo extracted from the first video.

Actual behavior

The time of the last photos from both videos is the same. As a result, the EXIF time of the photos extracted from the second video is already in use in the photos extracted from the first video.
This becomes a problem when synchronising GPS position with a GPX file in geosetter.

Corresponding data

  • sample images
    GX010106_0_038257

GX020106_0_013289

...

Additional information

...

Exif time of the last photo exported from the first video is 8:27:21 :
image

Exif time of the last photo exported from the second video is 8:27:20 :
image

@ptpt
Copy link
Member

ptpt commented Mar 15, 2023

It's likely to be the split videos have the same video timestamp. See #505

Can you check the tags -> creation_time of the video track, and see if they are the same?

ffprobe -show_streams -print_format json video1.mp4
ffprobe -show_streams -print_format json video2.mp4

@PierreSerpe
Copy link
Author

PierreSerpe commented Mar 15, 2023

Both video track have the same creation time indeed. Would merging the video track into a single long track (before extracting) help to avoid timestamp problems?

@ptpt
Copy link
Member

ptpt commented Mar 15, 2023

The plan was to find all video segments in a folder (by name pattern) and calculate the video time shift. No need to combine videos (which is expensive).

Thanks for the feedback. Let's track the updates in #505

@ptpt ptpt closed this as completed Mar 15, 2023
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

2 participants