Skip to content

Refuse again a GPX track far longer than a video without a GPS clock - #948

Open
caglarpir wants to merge 1 commit into
mapillary:mainfrom
caglarpir:refuse-unaligned-long-gpx
Open

caglarpir wants to merge 1 commit into
mapillary:mainfrom
caglarpir:refuse-unaligned-long-gpx

Conversation

@caglarpir

Copy link
Copy Markdown
Contributor

A video without a GPS clock of its own gives nothing to place a GPX track by, so the track is assumed to start with the video. A track that runs on past the end of the video for longer than the whole video was not recorded for the video alone: the video could start anywhere along it. Sampling refused such a track from #841 until #944. Since #944 it only warns that the video start time needs aligning with the track, and video_process samples the video along the start of whatever the track recorded, such as the first trip of a log of several, months away from the video.

This brings the refusal back in sampling, by distance and by interval (--geotag_source gpx), with the MapillaryGPXVideoStartUnknownError and the message it had before #944:

The GPX track in 3.gpx lasts 12.1 hours and the video only 10.8 minutes, so the video could start anywhere along the track. If the video is a timelapse, specify --video_duration_ratio. If the GPS logger was started with the video and left running, specify --video_start_time 2025_02_21_20_45_56_000, when the track starts. If the track covers more than this video, specify the time the video started as --video_start_time instead

For a track of a day or more, the advice is instead: "A track that long covers more than this video: specify the time the video started as --video_start_time".

process takes neither --video_start_time nor --video_duration_ratio, and the track of a timelapse runs on past the end of its video by design, so it keeps uploading such a track with the alignment warning (listed in the process report since #945). The exception is a track of a day or more, a log of several trips whose start is that of the first, which it now refuses unless the video lasts more than half as long:

The GPX track in GPX Babel Converted.gpx lasts 208.1 days and the video only 3.0 minutes, so the video could start anywhere along the track. A track that long covers more than this video: trim the GPX to the video, or sample the video with video_process and --video_start_time

Video without a GPS clock, GPX given main This PR
video_process by distance or by interval, track runs on past the video for longer than the video lasts sampled from the start of the track, with the alignment warning refused, MapillaryGPXVideoStartUnknownError (exit 7)
the same, with --video_start_time, with --interpolation_offset_time, or with a --video_duration_ratio at which the track fits placed by the option unchanged
video_process, track shorter than the video, or longer by less than the video lasts the alignment warning (past a minute, and 1.5 times for a longer track) unchanged
process, track shorter than a day uploaded whole, with the alignment warning unchanged
process, track of a day or more, video less than half as long uploaded whole, with the alignment warning refused, MapillaryGPXVideoStartUnknownError

The creation time of the video still places nothing (#946). --interpolation_use_gpx_start_time refuses as before.

Not changed: interval sampling with --video_geotag_source gpx reads the track through the video sources, and a refused track leaves its samples ungeotagged, with the refusal logged as a warning, as before #944.

Tests: the unit and integration suites. Sampled videos from many cameras before and after: only the five runs with such a track changed, from samples along the wrong part of the track to the refusal.

A video without a GPS clock of its own gives nothing to place a GPX track
by, and the track is assumed to start with it. A track that runs on past the
end of the video for longer than the whole video was not recorded for the
video alone: the video could start anywhere along it. Sampling refused such
a track from mapillary#841 until mapillary#944, which only warns that the video start time
needs aligning with the track. Since then, sampling places the video at the
start of whatever the track recorded, such as the first trip of a log of
several.

Sampling refuses it again, by distance and by interval alike, with the
MapillaryGPXVideoStartUnknownError and the message it gave before, which
for a track of a day or more says that the track covers more than the
video. Nothing is refused when --video_start_time places the video along
the track, when --interpolation_offset_time looks the video up along it, or
when the video spans the track at --video_duration_ratio. A track shorter
than the video, or longer by less than the video lasts, keeps the warning.

process, which takes neither --video_start_time nor --video_duration_ratio,
still uploads such a track whole, with the warning, as the track of a
timelapse runs on past the end of its video too. It refuses only a track of
a day or more, a log of several trips whose start is that of the first,
unless the video lasts more than half as long.

The creation time of the video still places nothing.
@meta-cla meta-cla Bot added the cla signed label Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant