If I use mapillary_tools to convert videos into geotagged images, and the GPS file starts too far after the start of the video, or ends too far before the end of the video, all images from that video not get geotagged. I would expect that only the images outside the GPS file coverage would not be geotagged.
Here’s what appears on the screen:-
Deriving frame capture time: 100%|███████████████████████████████████████████████| 300/300 [00:00<00:00, 149975.11it/s]
Inserting frame capture time: 300it [00:00, 946.15it/s] | 0/300 [00:00<?, ?it/s]
Extracting video frames: 100%|███████████████████████████████████████████████████████████| 1/1 [00:20<00:00, 20.83s/it]
Logging: 100%|███████████████████████████████████████████████████████████████████| 2400/2400 [00:01<00:00, 1299.15it/s]
Processing image import properties: 100%|████████████████████████████████████████| 2400/2400 [00:02<00:00, 1074.35it/s]
Inserting gps data into image EXIF: 96%|███████████████████████████████████████▌ | 2313/2400 [00:04<00:00, 506.59it/s]
Traceback (most recent call last):
File "mapillary_tools\processing.py", line 367, in geotag_from_gps_trace
File "mapillary_tools\processing.py", line 393, in get_geotag_properties_from_gps_trace
File "mapillary_tools\geo.py", line 235, in interpolate_lat_lon
mapillary_tools.geo.MapillaryInterpolationError: Unable to interpolate the point captured at 2021-08-07 18:36:49.328000 because it is beyond the trace end time 2021-08-07 18:36:39 by 10.328 seconds
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "\\vmware-host\Shared Folders\Mapillary\mapillary_tools\pyinstaller\main.py", line 4, in <module>
File "mapillary_tools\__main__.py", line 93, in main
File "mapillary_tools\commands\video_process.py", line 416, in run
File "mapillary_tools\process_geotag_properties.py", line 70, in process_geotag_properties
File "mapillary_tools\processing.py", line 371, in geotag_from_gps_trace
RuntimeError: Failed to interpolate image c:\Users\user2\AppData\Local\mapillary\20210807e\mapillary_sampled_video_frames\2021_0807_183315_CF0630\2021_0807_183315_CF0630_000214.jpg with the geotag source file c:\Users\user2\OneDrive\backups\GPX\2021-08-07_13-45-31.gpx. Try the following fixes:
1. Specify --local_time to read the timestamps from the geotag source file as local time
2. Use --use_gps_start_time to align the start time
3. Manually shift the timestamps in the geotag source file with --offset_time OFFSET_IN_SECONDS
[23564] Failed to execute script main
Here’s my command line (run in PowerShell):-
& .\mapillary_tools.exe video_process --video_import_path "$($FileToProcess.FullName)" --advanced --geotag_source "gpx" --geotag_source_path "$($GPXPath)" --user_name "$($MapillaryUserName)" --offset_time "0" --offset_angle $OffSetAngle --video_start_time "$($UNIXDate)" --import_path "$($Destination)" --device_make "$($Make)" --device_model "$($Model)" --overwrite_all_EXIF_tags --rerun --video_sample_interval $VideoSampleInterval)