Command Line Tools query (video process/upload)

Hi,

Having some issues using the Command Line Tools (on Windows 10) with videos from my Garmin Dashcam and hoping someone can help. I have managed to get 1 gpx file per video (with some help from the program ExifTool). In a folder I have the following:

20190908/video_name0001.gpx

20190908/video_name0001.mp4

20190908/video_name0002.gpx

20190908/video_name0002.mp4

I want to take the date and time from the gpx files rather than from the videos (as trying it with the videos is giving me an error and all the resulting JPEGs were taken in 1970!).

Here’s the code I have been trying but I’m not sure how to process all files in the folder in one go (each is 1 min long so feeding in the name of each mp4/gpx file combination manually would take forever):

…..\mapillary_tools.exe sample_video --video_import_path “20190908” --advanced

…..\mapillary_tools.exe process --advanced --import_path “20190908\mapillary_sampled_video_frames” --user_name “X” --geotag_source “gpx” --geotag_source_path “20190908/???” --overwrite_all_EXIF_tags

As you can see the mapillary_tools.exe is 2 folders above the working folder where I have put the code in a Windows batch file. The mp4/gpx files are in folder “20190908” in this working folder.

Is it possible to automatically work out the name of the gpx file from the name of each mp4 file? I have put in “???” above as I don’t know what to put in here.

Thanks!

The tools cannot do that, but you could write a script. Unfortunately I cannot help on Windows :frowning:

Thanks for your suggestion, I’ve managed to write a batch file that I can run in Windows to find the correct GPX file but still getting all times as 1970 Unix epoch when doing the first step with Mapillary tools. Is there a way to force it to use the date and time the file was modified instead of trying to extract it from the video? I’m referring to the line below:

…\mapillary_tools.exe sample_video --video_import_path “20190908” --advanced

Thanks!

Does the advanced parameter;
–video_start_time VIDEO_START_TIME
Video start time in epochs (milliseconds)
work?

I got his from video_process command syntax, not sample_video. AFAIK video_process still works (BlackVue and GoPro deprecated) if you want to try that instead. I think ffprobe (in video_process) looks at the video to determine start time then the frame rate to calculate time/date for each jpg. If the Garmin mp4 output has an invalid date video_start_time will be needed.

1 Like