Created
May 20, 2015 10:16
-
-
Save zuf/bd528783f98bf692747a to your computer and use it in GitHub Desktop.
This script extracts GPS data (in GPX format) from ContourGPS camera videos.
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
#!/usr/bin/env sh | |
# This script extracts GPS data (in GPX format) from ContourGPS camera videos. | |
# You need to have ffmpeg, gpsbabel and gnu parallel to run this script. | |
# | |
# Please note that *.gpx files in given directory may be overwriten! | |
# | |
# Usage: extract_contour_gps.sh <directory_with_movies> | |
# | |
if [ -z "$1" ] | |
then | |
echo "No argument supplied" | |
echo "Usage: extract_contour_gps.sh <directory_with_movies>" | |
exit 1 | |
fi | |
find $1 -type f -iname '*.MOV' | parallel -j 1 -k 'ffmpeg -loglevel panic -i {} -y -an -vn -bsf:s mov2textsub -scodec copy -f rawvideo - | gpsbabel -i nmea -f - -o gpx -F {.}.gpx && echo "GPS data from \"{}\" saved to \"{.}.gpx\""' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment