Ask a Question
GoPro Support Hub Ask a question. Share an answer. Find a solution. Stay stoked.
Announcements
Is your GoPro gear up to date? Check to see If it is on our Update page.
Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.
Highlighted
Sightseer
Posts: 9
Exporting still image with GPS coordinates in EXIF

Hi,

 

I'm about to buy a Hero 7 Black and the only thing that is stopping me is that I spent a whole trying to extract a still image from an MP4 generated by GoPro that contains telemetry data. My discoveries so far:

 

  1. Dashware can get the GPS track but can't export still images (or at least I'm dumb and I can't see how).
  2. Quik exports images but does not write the GPS tags in the EXIF. From what I read Quik still does not support reading telemetry data.
  3. Premiere - same story.
  4. Tried some other Linux software: avidemux, openshot, blender - no success.

I was wondering - maybe FFMpeg? Cause it certainly sees the metadata track and has the capability to export subsets of tracks (but I'm not sure it can translate this track to EXIF fields):

 

Stream #0:3(eng): Data: none (gpmd / 0x646D7067), 45 kb/s (default)
Metadata:
creation_time : 2018-08-27T01:28:44.000000Z
handler_name : GoPro MET

Nomad
Posts: 106
Re: Exporting still image with GPS coordinates in EXIF

@thegrave 

ffmpeg can extract individual frames (photos) from the video and exiftool can be used to add the gps data to the photos.

Sightseer
Posts: 9
Re: Exporting still image with GPS coordinates in EXIF
Care to show an example? Can't imagine how I can view or pass GPS coordinates of a frame with ffmpeg, let alone pass them over to exiftool.
Hiker
Posts: 27
Re: Exporting still image with GPS coordinates in EXIF

My guess is by "add" they mean add them back manually, interpolated either visually or by time, manually. Or... if ffmpeg throws a timestamp on the still (I've never used it...) Exiftool can easily interpolate the GPS coordinates for individual image files from a GPX track using the -geotag function.

 

http://owl.phy.queensu.ca/~phil/exiftool/geotag.html

Nomad
Posts: 106
Re: Exporting still image with GPS coordinates in EXIF
[ Edited ]

@thegrave You wouldn't view or pass GPS coordinates of a frame with ffmpeg. You would use ffmpeg to extract frames from the video to jpg files. Then you would use exiftool to add the GPS coordinates to the jpg files. I'll post an example

Nomad
Posts: 106
Re: Exporting still image with GPS coordinates in EXIF

@gravyhole Sort of. ffmpeg doesn't add a timestamp to the extracted frames so you would need to have a script that calculates the time of the frame then use that time to interpolate the GPS coordinates using the exiftool function you posted.

Nomad
Posts: 106
Re: Exporting still image with GPS coordinates in EXIF
[ Edited ]

If it's just one frame then the calculation of the timestamp and the lookup of the GPS coordinates could be done manually. Then the GPS coordinates could be added to the frame/jpg using exiftool.

 

@thegrave is the intent to do this for just one frame from the video or for multiple frames? If multiple, how many?

Sightseer
Posts: 9
Re: Exporting still image with GPS coordinates in EXIF
Let's say there are 5-10 pics per video worth extracting but still this method would be a real pain in the ass from what you mention. I don't find a reliable way to get the current frame number from any video player so this means I either need to re-encode the whole video file with ffmpeg so that frame numbers are overlaid:

https://stackoverflow.com/questions/15364861/frame-number-overlay-with-ffmpeg

Or pause the player and extract one second which will be 60 images if it's a 4k60p video for example.

Another option would be to play the video file in a VM running something like Premiere where you can do frame-by-frame navigation and display current frame count but I'm starting to wonder whether 16GB of RAM will be enough for bigger files...

For the sake of the conversation - how do you extract with ffmpeg the GPS metadata associated with a frame?