Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | leandersilur |
I am new to Godot. The first few frames on my VideoPlayer flash black. Is there a way to hide the video untill the first frame is actually loaded?
extends VideoPlayer
func _ready():
self.stream = preload("res://output.webm")
play()
func _process(delta):
# If I stop right away, the black frame remains.
# stop()
pass
This is the ffmpeg command (written under the Compatibility section) which I used to create the video.
ffmpeg -i input.mp4 -c:v libvpx-vp9 -pix_fmt yuv420p output.webm
Thank you for your help.
I’m surprised this isn’t mentioned more but I can’t find anything else on the internet. If you play lots of short videos, it’s quite noticable.
SteveSmith | 2022-12-15 13:48
I walked away from using videos wherever i can.
if you say “lots of short videos”, this will definietly kill the engine.
In case of short videos, i would recommend using Flipbooks, aka AnimatedSprites. You can play thousends of them, without any problem.
guelinator | 2022-12-15 14:39