Initialen











Change color to default
Change color to red
Change color to blue
Change color to green
Change color to yellow
Change color to cyan
Change color to magenta
Change color to orange
Change color to b/w

fuschlberger.net

Change color to default
Change color to red
Change color to dark red
Change color to blue
Change color to dark blue
Change color to green
Change color to dark green
Change color to yellow
Change color to dark yellow
Change color to cyan
Change color to dark cyan
Change color to magenta
Change color to dark magenta
Change color to magenta
Change color to dark orange
Change color to grey
Change color to b/w

Printme!

Dashcam stuff



All comments, suggestions etc. are welcome. Please contact me at wf-hp@gmx.net.


Dashcam Azdome GS63H

After reading lots of reviews I bought a Azdome GS63H.
I can warmly recommend it.

  • Full 4k resolution at 24 fps

  • Wifi

  • good picture quality in day and night

  • costs around 59 USD

How to get your dashcam images into Mapillary?

Preparation

install nvtk_mp42gpx link

install mapillary tools link with documentation

Install python stuff and mapillary tools (as root), everything after that can (and should!) be done as a normal non-root user.

# apt-get install python-pip
# pip install git+https://github.com/mapillary/Piexif
# pip install --upgrade git+https://github.com/mapillary/mapillary_tools

To see the help on the command line the scheme is for all commands the same (example with the upload command)
See the normal help for each command
mapillary_tools upload -h
See the advanced help for each command
mapillary_tools upload -h --advanced
The order of the parameters makes no difference.

Let the fun begin with mapillary tools

Create a directory in your $HOME
$ mkdir -p $HOME/mapillary/video-files/
$ mkdir -p $HOME/mapillary/img/

Copy your files to your harddisk
$ cp /mnt/your_sdcard_directory/*.MP4 $HOME/mapillary/video-files

change into your dashcam video directory and extract the GPS information into gpx files (the mapillary tools cannot read GPS data from the MP4-files directly).
Rename the .gpx files to remove the MP4 extension from them (necessary for some windows dashcam movie players to recognise the corresponding .gpx file automatically).
$ cd $HOME/mapillary/video-files
$ for i in *.MP4; do nvtk_mp42gpx.py -i $i -o $i.gpx -f; done
$ mmv '*.MP4.gpx' '#1.gpx'

I describe all the single steps with mapillary-tools, you can combine them with the commands listed below

Step 1 - Images from Video

Extract the images from the mp4-file
mapillary_tools sample_video --advanced --import_path "$HOME/mapillary/img/" --video_sample_interval .5 --video_import_path "/mnt/videos/dashcam/mapillary-upload/selection/"

Step 2 - geotag images from .gpx

Extract the GPS information from the gpx files we created before.
My GPS coordinates are ca. 500 ms later than the movie.
mapillary_tools process --advanced --user_name yourusername --import_path "$HOME/mapillary/img/" --offset_time .5 --duplicate_distance 0.5 --geotag_source gpx --geotag_source_path "/mnt/videos/dashcam/mapillary-upload/selection/2019_0610_170345_164.gpx"

the same in a loop for all directories
for i in `ls -1 $HOME/mapillary/img/mapillary_sampled_video_frames/`; do mapillary_tools process --advanced --user_name yourusername --import_path "$HOME/mapillary/img/mapillary_sampled_video_frames/$i" --offset_time .5 --duplicate_distance 0.5 --geotag_source gpx --geotag_source_path "/mnt/videos/dashcam/mapillary-upload/selection/$i.gpx"; done
When first using the parameter --user_name the program asks you for your account data. This is - if I understood this correctly - embedded in an EXIF tag (of course not in cleartext), so the mapillary system recognises after uploading from which user the images were uploaded.

Step 3 - Upload

Finally bulk upload the images in import_path and its subdirectories.
mapillary_tools upload --import_path "$HOME/mapillary/img/" --move_uploaded
or one of the subdirectories

Uploading might take some time, depending on your bandwith (mine is definitely too low ;) ).
At least I could reduce the data usage, from around 50GB in videos to around 25GB in images, and I didn't have to manually start the upload for each video file in the legacy uploader, just had to let the linux box run for some days.
Another advantage is the automatic retry in case of connection problems for individual images.
And finally, if the upload is interrupted, the mapillary tools remember which images have already been uploaded and continue the upload where it was interrupted.

Combination of commands

The single commands can be combined:
sample_video + process = video_process
process + upload = process_and_upload
sample_video + process + upload = video_process_and_upload





Written 2019-07-29 - last update 2019-07-29


Change color to defaultChange color to redChange color to blueChange color to greenChange color to yellowChange color to cyanChange color to magentaChange color to orangeChange color to b/w

© by wf
webslave (at) fuschlberger.net
Medieninhaber:
Wolfgang Fuschlberger, Salzburg

[Valid-HTML-4.01]