Python scripts for creating mp4 videos from GPS data on file.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Martin Schöön 3f22bc9d73 Tweaked track rendering geometry to look better as video overlay. 9 months ago
code Tweaked track rendering geometry to look better as video overlay. 9 months ago
data Tweaked track rendering geometry to look better as video overlay. Signed-off-by: Martin Schöön <martin@BLHe.bredbandsbolaget.se> 9 months ago
test Added test-data-file. Typographical changes to ReadNMEA_test.py. Signed-off-by: martin <martin.schoon@ieee.org> 9 months ago
README.md Minor change of README. Signed-off-by: Martin Schöön <martin@BLHe.bredbandsbolaget.se> 9 months ago

README.md

GPS data video

This project contains Python scripts that transform GPS data (lat, lon) and speed into mp4 videos that can be used as overlays when editing videos from an action cam. These videos are png encoded.

Additional to the Python scripts there are two bash scripts. One scales and changes frame rate of the GPS-derived video. The second one overlays GPS-derived video on a background video.

The GPS data source is a SONY action cam and the code is tailored for the file format SONY use.

List of scripts (located in the code directory):

  • ReadNMEA.py
  • GPS2Speedmp4.py
  • GPS2Trackmp4.py
  • scaleGPSvid.bash
  • overlayGPSvid.bash

Dependencies

  • Python 3
  • ffmpeg

Usage

No GUI, all CLI:

GPS2Speedmp4.py infile outfile

GPS2Trackmp4.py infile outfile

scaleGPSvid.bash infile new_framerate new_width outfile

overlayGPSvids.bash basevid overelay1 overlay2 outvid

Currently the placement of overlay1 and overlay2 are hard-coded to upper left and lower left corner of base video. Frame rates must be the same in all three videos,

/Martin Schöön, Sept. 1, 2018