# Command Line Tools query (video process/upload)

**URL:** https://forum.mapillary.com/t/command-line-tools-query-video-process-upload/3393
**Category:** Contributing and equipment
**Created:** [October 2, 2019, 11:45am UTC](https://forum.mapillary.com/t/command-line-tools-query-video-process-upload/3393 "2019-10-02T11:45:48Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![gmc](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/gmc/32/69072_2.png) [@gmc](https://forum.mapillary.com/u/gmc)
#### Post date: [October 2, 2019, 11:45am UTC](https://forum.mapillary.com/t/command-line-tools-query-video-process-upload/3393/1 "2019-10-02T11:45:49Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![tryl](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/tryl/32/62_2.png) [@tryl](https://forum.mapillary.com/u/tryl)
#### Post date: [October 4, 2019, 11:49am UTC](https://forum.mapillary.com/t/command-line-tools-query-video-process-upload/3393/2 "2019-10-04T11:49:39Z")

</div>

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

---

<div class="post-metadata">

### Author: ![gmc](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/gmc/32/69072_2.png) [@gmc](https://forum.mapillary.com/u/gmc)
#### Post date: [October 9, 2019, 8:26pm UTC](https://forum.mapillary.com/t/command-line-tools-query-video-process-upload/3393/3 "2019-10-09T20:26:00Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![bob3bob3](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/bob3bob3/32/68393_2.png) [@bob3bob3](https://forum.mapillary.com/u/bob3bob3)
#### Post date: [October 12, 2019, 10:19am UTC](https://forum.mapillary.com/t/command-line-tools-query-video-process-upload/3393/4 "2019-10-12T10:19:10Z")

</div>

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.
