- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Printer Friendly Page
Exporting still image with GPS coordinates in EXIF
- Mark as New
- Permalink
- Email to a Friend
- Report Inappropriate Content
on 04-03-2019 03:47 PM
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:
- Dashware can get the GPS track but can't export still images (or at least I'm dumb and I can't see how).
- 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.
- Premiere - same story.
- 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
Re: Exporting still image with GPS coordinates in EXIF
- Mark as New
- Permalink
- Email to a Friend
- Report Inappropriate Content
on 04-03-2019 04:52 PM
@thegrave
ffmpeg can extract individual frames (photos) from the video and exiftool can be used to add the gps data to the photos.
Re: Exporting still image with GPS coordinates in EXIF
- Mark as New
- Permalink
- Email to a Friend
- Report Inappropriate Content
on 04-03-2019 06:06 PM
Re: Exporting still image with GPS coordinates in EXIF
- Mark as New
- Permalink
- Email to a Friend
- Report Inappropriate Content
on 04-04-2019 03:25 AM
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.
Re: Exporting still image with GPS coordinates in EXIF
[ Edited ]- Mark as New
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-04-2019 03:27 AM - edited 04-04-2019 03:29 AM
@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
Re: Exporting still image with GPS coordinates in EXIF
- Mark as New
- Permalink
- Email to a Friend
- Report Inappropriate Content
on 04-04-2019 03:34 AM
@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.
Re: Exporting still image with GPS coordinates in EXIF
[ Edited ]- Mark as New
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-04-2019 03:43 AM - edited 04-04-2019 03:44 AM
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?
Re: Exporting still image with GPS coordinates in EXIF
- Mark as New
- Permalink
- Email to a Friend
- Report Inappropriate Content
on 04-04-2019 04:38 AM
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?