How to fix a laggy video and off audio in Godot's videoplayer?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By AlMoeSharpton86

I have a 5 minute 720p video in the OGV format, with a bitrate 1411 kbps (also I have tried the same video with a higher 7mbps but to the same effect but more laggy).

Which I’m using with Godot’s videoplayer, but when I run it, the video and audio skips. With big framerate drops (can vary from 60 to 2fps)

Any idea why or what I can do to solve this?

Thank you :slight_smile:

I would assume either the video format isn’t ideal, or VideoPlayer needs improvements.
Have you tried with the WebM format?
Can you share that video? (or whatever small video you have which produces the issue)

Zylann | 2019-07-18 12:44

Hi, Zylann.

I have uploaded the video here -

I have tried again with this much shorter video, but still the same issues.

I will try with the webM format and get back to you.

Thank you.

AlMoeSharpton86 | 2019-07-18 20:40

Sorry I meant uploading the video file as is. YouTube transforms it anyways so it’s not suitable for bug reproduction.

Zylann | 2019-07-18 20:41

How would you like me to share it? Can it be done here? Appreciate the help.

AlMoeSharpton86 | 2019-07-18 21:34

Uploaded the clip to Google Drive

AlMoeSharpton86 | 2019-07-18 21:41

Outputted the video into the WebM format, audio seems fine but the video is fully black.

AlMoeSharpton86 | 2019-07-19 14:22

OGV playing in Godot isn’t great indeed, I get stuttering too even though I have a Ryzen 5 and nVidia 1060. However I’m told OGV isn’t the best format to use in games in terms of performance.
VP9 might be considered in the future.
For now, given what your video contains, I would recommend to do the animation in Godot with AnimationPlayer. It will run way better than using 1920x1080 video.

Zylann | 2019-07-20 17:43

Thanks for all your help. Would I be able to position the audio correctly, if I use the AnimationPlayer? And would you suggest I file this as a bug report?

Thanks again, you should put this as an answer :slight_smile:

AlMoeSharpton86 | 2019-07-22 11:54

Update: Good News! VP8 WebM seems to run much better and smoothly. The video has to be in VP8 format as a WebM.

AlMoeSharpton86 | 2019-07-22 21:22

I’m having issues as well with a .webm format video on Android. It starts out normal but slows down as time progresses to an incomprehensible stutter in both video and audio.
How do I check if the webm video is using VP8? :slight_smile:

fhireman | 2020-10-10 19:23

Hello fhireman,

A way to check is using the free VLC Player to open the video and selecting the codec infomation, which should give you the desired infomation. Other media players should work too. While exporting the video into the webm video, it gave me the option to select between VP8 & VP9.

Hopefully it has solved your issue and been helpful.

AlMoeSharpton86 | 2020-10-19 21:18