Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement seeking in VideoPlayer #2945

Closed
OpusManning opened this issue Jul 3, 2021 · 9 comments
Closed

Implement seeking in VideoPlayer #2945

OpusManning opened this issue Jul 3, 2021 · 9 comments

Comments

@OpusManning
Copy link

Describe the project you are working on

I'm working on an educational application that has various "panels" that contain mixed content. Text, videos, graphics. Students read these items, and often need to study them in great detail.

Describe the problem or limitation you are having in your project

The VideoPlayer lacks a means to "scrub" the video with a slider. It looks like you can start and stop the stream, but not much else.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

I'd like to have a video player in Godot that essentially replicates the one included in the Chromium browser or even Firefox. Perhaps a themeable video player? I like the formats that the VideoPlayer currently supports.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

What I'd like is to be able to assign a video file to the player, give the dimensions of the video file, and it kind of "just works" by playing in a nice video interface. I realize that it's reasonable that I put the interface together with the existing nodes, which would be absolutely fine with me because they are nice and work very well.

If this enhancement will not be used often, can it be worked around with a few lines of script?

My understanding is that it can't be addressed with GD Script, as it is a C-level issue of the current code. I believe that the attempt is to work with FFMPEG, and VP9, and the programming is low-level audio and video stream management.

Is there a reason why this should be core and not an add-on in the asset library?

I honestly think it might be better in the asset library, although currently it is in the core.

@Calinou
Copy link
Member

Calinou commented Jul 3, 2021

Seeking videos is not yet implemented. Due to the difficulty of maintaining such functionality in core, video playback will eventually be moved out of core and into a FFmpeg-based GDNative add-on.

However, it's very unlikely that the engine will ever provide a premade UI for viewing videos. An add-on is better suited for the GUI parts of this.

@Calinou Calinou changed the title Enhanced VideoPlayer Functionality Implement seeking in VideoPlayer Jul 3, 2021
@OpusManning
Copy link
Author

One thing I didn't realize is that this repo is a GDNative add-on - I thought it was THE VideoPlayer class in Godot core. Unfortunately, I'm too stupid to compile it. I was thinking about this though: is there someone I can pay to complete the implementation? Might be a delicate issue, but I'd be willing to throw some dirty cash at the problem...

@Calinou
Copy link
Member

Calinou commented Jul 4, 2021

I was thinking about this though: is there someone I can pay to complete the implementation? Might be a delicate issue, but I'd be willing to throw some dirty cash at the problem...

Implementing seeking in the core VideoPlayer isn't something that can be done quickly, and I doubt anyone has the skills required to do it anyway (and is available to do it).

@OpusManning
Copy link
Author

I agree if you're talking about the core component (VideoPlayer class), but I'm referring to this plugin. If we could get a quality plugin, I'd be willing to put down real cash for that, essentially completing the TODO list on the bottom of the project page...

@Calinou
Copy link
Member

Calinou commented Jul 4, 2021

I agree if you're talking about the core component (VideoPlayer class), but I'm referring to this plugin. If we could get a quality plugin, I'd be willing to put down real cash for that, essentially completing the TODO list on the bottom of the project page...

The videodecoder plugin doesn't seem to be in a working state currently (with Godot 3.3.2, that is). As far as I know, it doesn't really have any active users.

@golddotasksquestions
Copy link

golddotasksquestions commented Feb 11, 2022

Can we have this proposal or #2602 reopened?

I think it's vital to have seek for basic VideoPlayer functionality in my projects. This is also something that comes up regularly on community channels. I understand there is no one working on it and it might not be likely someone will because it's complicated or involves a lot of dependencies which the core team would rather want to see in an GDextension, but I still think it's important to have an open issue about it where people can express their need.

Having people making new proposals/issues every time and then closing them so a new issue is opened again later just spreads the discussion to multiple pages and demand is harder to keep track of.

Currently all other issues have been closed and lead here, like
godotengine/godot#47838,
godotengine/godot#14430
#2602

@Calinou
Copy link
Member

Calinou commented Feb 11, 2022

Someone is working on support for seeking WebM videos in 3.x: godotengine/godot#57690

I understand there is no one working on it and it might not be likely someone will because it's complicated or involves a lot of dependencies which the core team would rather want to see in an GDextension, but I still think it's important to have an open issue about it where people can express their need.

The Godot proposals repository is only for first-party features, not third-party extensions. While the video decoding add-on for Godot 4.x will be official, work on it hasn't started yet. Until this extension is implemented, there's point in opening proposals for it (because the interface hasn't been defined yet).

To discuss feature proposals that would be best suited to third-party extensions, you can use the https://github.com/godot-extended-libraries/godot-ideas repository.

@golddotasksquestions
Copy link

@Calinou

I strongly believe we should be allowed to discuss official addons on the official Godot Github pages. Getting people to sign up and participate in these discussions is difficult enough. Getting them signed up and participate on an explicitly unsuported private repo with almost no traffic to discuss someones unsupported private ideas, has almost no incentive.

If you think proposals is not the place for this, maybe we should have a separate godot/GDextensions repo going forward?
I think cutting out more and more core functionality to separate GDextensions is highly problematic if they are only officially supported in name, but can't be discussed on official channels.

@golddotasksquestions
Copy link

For those interested, there is a PR for webm seek() support: godotengine/godot#57744

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants