0 votes

I have a VideoPlayer in Scene and I would like to start my video at certain position. On user swipe, the same video should start at another position (something like youtube videos with arrow keys).

I was trying to use set_stream_position as is stated in documentation, but it won't work. The video always starts at the beginning. I also created completely new scene and tried to instantly start from certain position (without swiping), but didn't succeed.

$VideoPlayer.stream = load(get_current_video()) # path to video
$VideoPlayer.play()
$VideoPlayer.set_stream_position(20) # start video at 20 seconds

I also tried to set stream position and then to play it.

Similar question: https://godotengine.org/qa/52188/how-to-start-a-videoplayer-stream-at-a-certain-position - unfortunately they didn't solve it using set_stream_position (I would also agree on using some other logic if possible)

in Engine by (12 points)

1 Answer

+2 votes

Seeking isn't implemented yet, the methods do nothing: https://github.com/godotengine/godot/issues/14430

by (12,485 points)

Any idea if this feature will be implemented in Godot 4?

We don't know yet – video playback may be moved out of core to be provided by a FFmpeg-based add-on, given how broken the current implementation is.

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 Frequently asked questions and 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 [email protected] with your username.