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

Play back multiple audio tracks in VideoPlayer #1956

Open
Nostritius opened this issue Dec 8, 2020 · 1 comment
Open

Play back multiple audio tracks in VideoPlayer #1956

Nostritius opened this issue Dec 8, 2020 · 1 comment

Comments

@Nostritius
Copy link

Describe the project you are working on

A reimplementation of an existing game. I am considering godot as a basis for this reimplementation

Describe the problem or limitation you are having in your project

The original game which is reimplemented used to have videos, where background sound and language specific sound are separated and are played simultaneously. I realized that this is pretty common practice in other games, too. The problem is, that godots VideoPlayer class only allows one audio track to be played.

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

The enhancement would be to allow more than one audio track in the video player class.

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

A possibility would be to use the audio_track variable in the following way
player.audio_track=[0, 1]
by allowing it to be an array besides an int and through that preserving backward compatibility.

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

Not, that I'm aware of, since the VideoPlayer api does not offer any way of accessing the audio streams directly, to circumvent this.

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

Since it touches a very core of godot (the VideoPlayer class), it is unlikely, that this can be handled by an addon.

@Calinou
Copy link
Member

Calinou commented Dec 8, 2020

Keep in mind that due to the high amount of bugs and difficult maintenance, VideoPlayer (and its various video formats) will likely be moved out of core to be moved to an official add-on in 4.x. See #3286.

@Calinou Calinou changed the title VideoPlayer multiple audio tracks Play back multiple audio tracks in VideoPlayer Dec 8, 2020
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

2 participants