2

I have a 360 video (.mp4) shot using a GoPro Fusion with embedded gps (gpmd track).

I want to break the video into frames (1 per second), either into png or jpg files, whilst preserving certain global metadata, like camera make, but most importantly timestamps.

The video itself only has the start date/time and duration in the metadata.

My idea was to first extract the metadata using exiftool, break the video down into frames using ffmpeg, and then geocode the frames based on times using exiftool.

Though I have not been able to use ffmpeg to add timestamps to individually extracted frames (using offset based on frame number and start date/time (ffmpeg only adds date of file creation -- when I ran the command).

Now I'm starting to consider using a custom script to offset based on frame rate (e.g. video starts at 12:00, add +1 sec to each frame created timestamp.

Before i jump into this, I wanted to properly validate if ffmpeg could actually use the start time of the video to write the capture time into frames.

Based on SO searches I've tried a lot of flag combinations, alas, no success, e.g.

ffmpeg -i VIDEO_7152.mp4 -r 1 -map_metadata 0:g FRAMES/img%04d.png

ffmpeg -i VIDEO_7152.mp4 -r 1 -movflags use_metadata_tag FRAMES/img%04d.png

Here is the video file: https://drive.google.com/file/d/1XspMMI4Vd4eX4yLJ-FAwKOadhYzmjxH1/view?usp=sharing

I am using ffmpeg on Windows.

Here's a sample of the metadata I get from an extracted frame: https://gitlab.com/snippets/1978974

  • How about add required data as text over the video using avisynth or any other tool. And after, just extract video frames. I don't know if ffmpeg is capable of adding overlay text to video, but avisynth can do it for sure. http://www.avisynth.org.ru/docs/english/corefilters/subtitle.htm. And btw, Avisynth scripts can be run by ffmpeg https://forum.videohelp.com/threads/384572-How-to-Run-Avisynth-Script-from-FFmpeg – mosov.a May 21 '20 at 19:36
  • You could incrementally set the time for each extracted file using exiftool. See [this answer](https://photo.stackexchange.com/a/60403/37960). – StarGeek May 21 '20 at 20:50

0 Answers0