A bash script that prepares Sony HDRAS30V MP4 and GPS files for loading into other software
Creates a new directory MP4GPS and then does the following in this directory:
- Joins and copies MP4's that are part of the same video to a new video (lossless), softlinks videos that are standalone
- Aligns the MP4 filename with the GPS data filename
- Soflinks the GPS file
- If GPSBabel is installed, converts GPS from NMEA to more common GPX
WARNING: The joining task has to create a new composite MP4 so uses more disk, therefore make sure you have sufficient disk
cd /Volumes/Untitled
ls
MP_ROOT
PRIVATE
Sony-GPS.sh
What I then do with my videos is use Garmin VIRB Edit to add in my GPS. Actions:
- "Create Video"
- "Map"
- "Import G-Metrix..."
- "On My Computer"
- Choose your GPX file
- "Use this Log"
- "Map" -> "Terrain"
- Screenshot the terrain Command+Shift+4, I do 615x615
- Run Screenshot through ImageMagick to make it transparent (60%) e.g.
convert 17091803.png -alpha set -channel A -evaluate set 60% 17091803_Transparent.png
- "G-Metrix"
- Choose Template
- Delete any non required Gauges
- "Gauges"
- "Select a Data Type" -> "Logo"
- "Clone and Edit Gauge (Beta) ..."
- "Source: Choose" and choose the Transparent image, "Save" "Close"
- Lay the Transparent Gauge on the video (current bug in VIRB 5.2.1 I go export then go back and it often dissappears, so I just redo)
- Switch to Track gauge and lay the track over the Transparent Gauge
- "Appearance" -> "Transform" and scale the track so that it lines up with the transparent GPS track, I find I have to switch to full screen mode to move it around with the arrow keys
- Export !!!!