0

I want to extract frames every 10 seconds from a video and geotag these frames using a GPX track.

On my Windows 8 computer I have tools to extract the frames (FFMPEG), set image timestamps (ExifTool) and geotag the images (GeoSetter).

However, I do not know how to copy the timestamp from the video over to the timestamp of the captured frame.

3
  • See this answer. But it's for Linux.
    – slhck
    Feb 21, 2015 at 20:56
  • @slhck: Also, that example creates a textfile with filenames and timestamps. It doesn't assign the timestamps to the files.
    – Peter
    Feb 22, 2015 at 13:12
  • That'd be a simple matter of iterating through the lines and renaming the files based on that pattern. But I don't even know if that works for you, since you mention Windows 8. Did you already try something?
    – slhck
    Feb 22, 2015 at 13:17

1 Answer 1

1

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?

  1. At first it extracts frames using ffmpeg filter with proper options (default ones won't do the trick)
  2. 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
  3. 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.
  4. 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.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .