That batch file extract frames every X seconds and then geotags it: https://gist.github.com/Krzysiu/345c37b08d79d5f47971167e33bb2bd3
It requires ffmpeg
and exiftool
. All settings have to be filled out manually (lines 28-68).
How does it work internally?
- At first it extracts frames using ffmpeg filter with proper options (default ones won't do the trick)
- It sets the same timestamp to all extracted frames*. Timestamp might be manually provided timestamp or any tag/file modify&create time from video file
- The time shift for every image is applied. I used that method, as there seems to be no easy way to shift time in case of manual timestamp.
- Frames are geotagged using gpx file.
* in fact to the all files matching %output_directory%\%frame_prefix%*.jpg
, so if you've extracted at first 150 frames and then 100 to the same directory and with same prefix, it will process all 150 frames, including 101-150 from earlier pass.
Possibly it can be done much faster - expression in Exiftool which would multiply file index by X from "frame every X seconds". I'm not that good with Perl expressions and Exiftool, so I made it this way.