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: 4
Get the shooting frame rate of time lapse MP4 files

When recording a 4k time lapse file, it seems to be encoded at the normal 30 fps. So the file seems to be indistinguishable from a normal 30 fps file.

 

Is there some metadata somewhere in the file that says what the actual SHOOTING frame rate is, or maybe a multiplier that says how much faster than real time it was shot at ?

 

Highlighted
Nomad
Posts: 583
Re: Get the shooting frame rate of time lapse MP4 files
I'm not sure if there's a guaranteed way of finding out. I would have to double check. Comparing the mp4 time stamps with the GPS stamps should be one way (as long as you have gps signal), but I remember the camera does this differently in time lapse mode and time warp mode. Which one are you interested in? I can give it a try at some point, or send me a sample privately if you want.
Highlighted
Sightseer
Posts: 4
Re: Get the shooting frame rate of time lapse MP4 files
Thank you. It's a GoPro Hero 5 or 6 Black, but I guess the question applies to any model that can do time-lapse. I would like to send you a sample as you suggested, but I can't figure out how to do it - if I click on your name (to the left of your posting) nothing happens, in both Firefox and Chrome. How can I do that?
Highlighted
Nomad
Posts: 583
Re: Get the shooting frame rate of time lapse MP4 files
app@prototyping.barcelona
Highlighted
Sightseer
Posts: 4
Re: Get the shooting frame rate of time lapse MP4 files
Thanks - I just emailed you.
Highlighted
Nomad
Posts: 583
Re: Get the shooting frame rate of time lapse MP4 files
Unfortunately I could not find any way to programmatically deduce that value in your video file
Highlighted
Nomad
Posts: 107
Re: Get the shooting frame rate of time lapse MP4 files
[ Edited ]

I think you should be able to calculate the timelapse interval using the video duration of the container file and the video stream itself. You can use the MediaInfo app to easily display them. For example, below is the MediaInfo display for a GoPro Fusion timelapse video that was shot using a 0.5 sec interval. The video duration of the container is 54 min 27 sec or 3,267 sec. The video duration of the video stream is 3 min 38 sec or 218 sec. The 218 seconds means that 218 frames were shot, one every 0.5 sec. That equates to 218 x 0.5 = 109 sec. Multiplying this by the video container frame rate of 29.97 fps calculates the video container duration, 109 x 29.97 = 3,266.73 = 3,267 sec. So to calculate the interval where you don't know the timelapse interval you can use the formula:

timelapse interval =         video container duration
                                ---------------------------------------------
                                video stream duration x frame rate

For this example, timelapse interval = 3267/(218x29.97) = 0.5 sec

Capture.JPG


Highlighted
Sightseer
Posts: 4
Re: Get the shooting frame rate of time lapse MP4 files

Thanks all. I had assumed that this must be encoded into the GoPro metadata somewhere, but it looks like the only way to deduce this is in the MP4 wrapper structure where the meta track's header duration has the actual shooting (long) duration. That seems to be how MediaInfo is also deciding on the value in its "General" section. All other durations in the MP4 structure including the movie header are the playback (short) duration.

 

This doesn't strike me as very reliable. It would have been much better if the shooting frame rate (or secs between frames) had been stored properly in the GoPro metadata. But this seems to be the only way to do it, unless someone from GoPro comes up with a better way.