Video object seek/skip causes custom MP4 video to restart from beginning

Hello GDevelop team,

I found a problem with the Video object seek function in GDevelop.

When using the default sample video from GDevelop, the skip/seek feature works correctly:

  • CurrentTime() + 5
  • CurrentTime() - 5

However, when I replace it with my own MP4 video, seeking causes the video to restart from the beginning instead of jumping forward/backward.

What I tested:

  • MP4 format
  • H.264 (x264)
  • AAC audio
  • 30 FPS constant framerate (PFR/CFR)
  • Encoded again using HandBrake
  • Tried different seek methods:
    • add 5
    • set to CurrentTime() + 5
  • Tried limiting seek so it never exceeds duration
  • No errors appear in debugger console

Result:

  • Default GDevelop sample video works perfectly
  • Custom videos restart when seeking
  • Sometimes small seek values work better than large values

Environment:

  • GDevelop Desktop
  • Windows 11
  • Preview mode

It seems related to HTML5 video seeking/keyframe handling with custom videos.

Is this a known limitation or bug with the Video object?

Thank you.

If the video is a bit too heavy to load, that’s what happens; maybe a lower video bitrate will help.

Thank you for the suggestion.

I tried lowering the bitrate and also re-encoding the video multiple times using HandBrake and FFmpeg.

What I tested:

  • Low bitrate
  • H.264/x264
  • Constant framerate
  • Web optimized
  • Different keyframe intervals
  • Exported web build

Result:

  • Default GDevelop sample video works correctly
  • All custom MP4 videos restart from the beginning when seeking

So it seems the issue may not be related only to bitrate.

Thank you.