Created
March 7, 2021 06:28
-
-
Save noktoborus/b8e80cf0232784c1b21c695767fb6431 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# vim: ft=sh ff=unix fenc=utf-8 | |
# file: mivue_to_mapillary.sh | |
( | |
( | |
echo gpsbabel \\ | |
for nmea in `echo *.NMEA`; | |
do | |
name=$(echo $nmea | sed 's/.NMEA//') | |
gpx="$name.GPX" | |
echo -i nmea -f "$nmea" \\ | |
done | |
echo -o gpx,gpxver=1.1 -F all.gpx | |
) | sh | |
) | |
( | |
for file in `echo *.MP4`; | |
do | |
time=$(echo $file | sed 's/\(FILE\|EMER\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)-\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)F\.MP4\|.*/20\2-\3-\4 \5:\6:\7/') | |
if [ -z "$time" ]; | |
then | |
continue | |
fi | |
echo "$time" | |
exiftool -overwrite_original "-AllDates=$time" "-mediacreatedate=$time" "-trackcreatedate=$time" $file | |
done | |
) | |
( | |
mapillary_tools video_process --user_name noktoborus --advanced \ | |
--geotag_source "gpx" --geotag_source_path "$PWD/all.gpx" \ | |
--video_import_path . \ | |
--local_time | |
) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment