0 votes

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")

func _process(delta):
    # If I stop right away, the black frame remains.
    # stop()

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.

in Engine by (12 points)

1 Answer

0 votes

Did you have any progress on that ? i am facing the same issue. I came up with an work around, that i play the video at start of my game, and let it run till the end, and make it almost invisible. if you make it completely invisible (alpha=0 or visible=false or outside screen) it wont work.

videoplayer must run through the whole video, otherwise you video will start with the frame, that was the last frame, when you last started it.

not happy with that at all

by (14 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.