Godot Version
Godot 4+
Question
Is there any method to use file_selected to import videos?
I tried many times but the code works but the video isnt showing on %VideoStreamPlayer.
Ive used everything for the variable “video” but nothing. Also there was none of tutorials and similar questions but i saw a game use this mechaninc (not the code but what im asking)
Theres the last method that i used ( btw im getting frustrated so its why now its buns):
extends CanvasLayer
var video = VideoStreamTheora.new()
func _on_importer_pressed() -> void:
%FileDialog.popup_centered()
func _on_file_dialog_file_selected(path) -> void:
video = load(path)
%VideoStreamPlayer.stream = video.load(path)
What kind of video file were you trying to load? The one and only video file format natively supported by Godot is Ogg Theora.
Im trying to import an ogv file. Nothing too special. 
What does “Godot 4+” mean? Godot 4 can mean a version from 2023 or one from a few weeks ago.
Sorry i messed up i ment godot 4
I can see two problems with your code.
One, you should do ResourceLoader.load(path) instead of just load
Two, you should do %VideoStreamPlayer.play() after you set the stream.
For me, the following code worked perfectly:
extends Control
@export var fileDiag: FileDialog
@export var videoPlayer: VideoStreamPlayer
var video: VideoStreamTheora
func _on_import_button_pressed() -> void:
fileDiag.popup_centered()
func _on_file_dialog_file_selected(path: String) -> void:
video = ResourceLoader.load(path)
videoPlayer.stream = video
videoPlayer.play()
It worked thanks a lot ! : D