Posted by:

David G

David G, Chief Explorer

TimeWarp videos are perfect for creating beautiful TimeLapses, but pose some unique challenges when trying to split them into individual frames.

The GoPro MAX camera and GoPro HERO cameras come with a Timelapse mode called TimeWarp.

TimeWarp is HyperSmooth applied to TimeLapse Video. It allows you to Capture super stabilized time lapse videos while you move about a scene. Increase the speed up to 30x to turn longer activities into shareable moments.

Via GoPro

When it comes to turning GoPro TimeWarp videos into photo frames, there are a few extra things to consider when compared to normal GoPro videos (non-timelapse).

If you’ve reached this post looking to convert a regular video into frames, the process for doing so is described in this post from 2021.

TimeWarp 101

TimeWarp is a particularly useful mode when you want to share long content, like a mountain bike trail, as a video.

When configuring a TimeWarp timelapse, you need to select a TimeWarp speed.

There are 6 speed options; 2X, 5X, 10X, 15X, 30X, and AUTO (only in HERO mode).

The speed setting determines how fast the real world time is sped up.

Time is sped up because GoPro packs the resulting .mp4 (or dual .mp4’s from the Fusion or .360 from the MAX) to a video with a frame rate of 30 FPS (29.971) X times as fast.

For example, if you selected a speed mode of 2X, the recording will be twice as fast as real world time. That is, each second has 2 seconds worth of frames (15 from 1st second of real time, 15 from 2nd second of real time – put another way, each frame in the TimeWarp video is spaced 0.066 second apart). That means with a recording time is 5 minutes (300 seconds), the resulting TimeWarp video will be 2.5 minutes (150 seconds) long.

Another example, if you selected a speed mode of 30X, the recording will be thirty times as fast as real world time. That is, each second has 30 seconds worth of frames (1 frame from 1st second of real time, 1 frame from 2nd second of real time, …, 1 frame from 30th second of real time – put another way, each frame in the TimeWarp video is spaced 1 second apart).

Here are examples for other TimeWarp speed options;

SpeedRecording timeTimeWarp Video length
2x300 seconds150 seconds
5x300 seconds60 seconds
10x300 seconds30 seconds
15x300 seconds20 seconds
30x300 seconds10 seconds

Auto mode (HERO mode only and not shown in the above table) automatically adjusts the recording speed based on motion, scene detection, and lighting. However, I will ignore Auto mode for this post as we’re only considering 360 videos.

Still a little confused? Here I cycled round my block 5 times in each TimeWarp mode to demonstrate what the output of the same circuit looks like (you can see the actual recording times are all very similar)…

GoPro MAX 360 TimeWarp 30x Sample

GoPro MAX 360 TimeWarp 15x Sample

GoPro MAX 360 TimeWarp 10x Sample

GoPro MAX 360 TimeWarp 5x Sample

GoPro MAX 360 TimeWarp 2x Sample

Identifying videos shot in TimeWarp

As I described last week, videos shot in Timelapse mode (vs. normal video mode) and the setting used can be identified using the <GoPro:Rate> tag.

As an example; <GoPro:Rate>2X</GoPro:Rate>, identifies the video being shot in TimeWarp mode at 2X speed.

Here is how to find this tag for each camera:

  • MAX:
    • for 360 videos, in the raw .360 file metadata
      • note, this tag is not in the processed .mp4 from GoPro Player software – it is therefore impossible to automatically detect if these files were shot in TimeWarp and what mode was used.
    • for HERO videos, in the .mp4 file metadata.
  • HERO:
    • for HERO videos, in the .mp4 file metadata.

Also, a secondary check can be made to validate the videos do not have an audio track (no timelapse videos, in any mode, contain an audio track). If the below was present in the video metadata, it would confirm the video was shot in normal video mode (not timelapse mode);

<TrackN:HandlerClass>Media Handler</TrackN:HandlerClass>
<TrackN:HandlerType>Audio Track</TrackN:HandlerType>

Choosing the right frame-rate for extraction

Whatever the speed selected at capture, TimeWarp mode creates a video file with a final frame rate of 30 FPS, as defined in the VideoFrameRate tag.

<Track1:VideoFrameRate>29.971</Track1:VideoFrameRate> 

Put another way, at 30X, 1 second of processed video is the equivalent to 30 seconds of footage (so each frame in processed video is spaced 1 second apart in real world time).

At 2X, these 30 frames are spaced 0.066 seconds apart in real world time.

At normal speed, 30 frames per second is the equivalent of frames being spaced 0.033 seconds apart.

Therefore you will probably want higher extraction rates for TimeWarp videos shot at higher speeds.

Extracting 1 frame every second would result in final frames being 30 seconds apart.

However, GPS points (and other video metadata) are recorded in real-world time.

What this means is that the video track is sped up, but telemetry track is in normal time.

Therefore, when frames are extracted, we also need to normalise the timestamp assigned to each frame to match the real-world time it was taken.

We can work out the real-world time spacing of the extracted frames using framerate of ffmpeg extraction value and the GoPro TimeWarp mode (as demonstrated in the last table) using the calculation TimeWarp mode / extraction rate.

The table below gives some examples;

Timewarp mode (e.g 2x)Each photo spacing (sec) @ 0.1 FPS extraction rateEach photo spacing (sec) @ 0.2 FPS extraction rateEach photo spacing (sec) @ 0.5 FPS extraction rateEach photo spacing (sec) @ 1 FPS extraction rateEach photo spacing (sec) @ 2 FPS extraction rateEach photo spacing (sec) @ 5 FPS extraction rate
220104210.4
550251052.51
1010050201052
151507530157.53
303001506030156

For example, if a video was shot at 10x, and we extract at 5 FPS using ffmpeg (ffmpeg command shown below), each frame extracted by ffmpeg will be exactly 2 seconds apart in real-world time.

In short, we can use ffmpeg like so;

$ ffmpeg -i GS019006.mp4 -r 5 -q:v 2 FRAMES/img%d.jpg

Setting frame times

The other crucial piece of information required to timestamp the frames is when the recording started.

To assign first photo time, we can use the first GPSDateTime value reported in telemetry.

Using the known time-spacing between photos, you can then incrementally add the times to all subsequent photos extracted (why it is important to logically name your sequences when extracting using ffmpeg – e.g. in numerical order; img%d.jpg)

For example, if the time spacing between images is 2 seconds and the first GPSDateTime is 12:00:00; then image1 time is 12:00:00, image2 time is 12:00:02, image3 12:00:04, and so on.

All that is left to do now is actually write the correct times into the photos.

The steps to do this are described in this post (as well as how to extract and write GPS points extracted from the TimeWarp video to each image).

Update 2022-04-22

Using a GoPro in TimeLapse video mode (without TimeWarp)? Here is a guide detailing how to do a similar conversion of the video into properly timed frames.tr