Streama: Support multiple audio streams

Created on 20 Oct 2017  Â·  9Comments  Â·  Source: streamaserver/streama

Exist some way to put dual audio in the streaming movies o streama??

Enhancement

Most helpful comment

I really would love to see that!
If the player would be as easy as the Netflix player it would be awsome!
For example i use h.264 with multiple audio-tracks just the same way as itunes or handbrake does it!

Awsome Project by the way, keep going :D

All 9 comments

Not currently, no. Should be possible to implement, so a future enhancement.

hi!
would it be acceptable to have to add 1 video per language / Audio? extracting the audio and using mp3s is going to be a hassle to sync up correctly

I thought we might be able to have multiple audio tracks in the video container, but switching audio tracks is only directly supported by edge and safarit at the moment :disappointed: https://caniuse.com/#feat=audiotracks

We might be able to support this post video transcoder update, By switching the audio track in the transcoder we can send a compatible stream to the browser.

Being able to upload extra audio tracks independently is definitely too much of a hassle though.

For the time being having a separate video file per language might be the only way to do it.

I really would love to see that!
If the player would be as easy as the Netflix player it would be awsome!
For example i use h.264 with multiple audio-tracks just the same way as itunes or handbrake does it!

Awsome Project by the way, keep going :D

I just noticed that the site referenced by @Jeronimo95 says that the feature can in fact be enabled in both firefox and chromium based browsers. As I'm very interested in it, would this be accepted as a feature of streama in the master branch? We could make it opt-in and provide explanation that it has to be enabled client-side on the administrator page or a similar location.

how the fuck is it possible that edge/ie supports stuff that the rest doesnt. i feel like we are going back to the future lol

Motivated by the information in the above comment by @f1reflyyyylmao I checked the functionality in Chrome (Version 83.0.4103.97 (Official Build) (64-bit)) and in principle it worked.

These are the steps:

  1. Enable #enable-experimental-web-platform-features in chrome://flags/ and restart Chrome.
  2. Open Streama and start a MP4 video with two audio tracks (it might work with other file formats and more tracks, but I haven't tested). Chrome automatically chooses the first track.
  3. Pause the video.
  4. Run the following Javascript commands in the developer tools console:
    a. document.body.getElementsByTagName("video")[0].audioTracks[0].enabled=false (Track 0 is by default enabled and all other tracks are disabled, hence this command effectively mutes the audio, because no track is enabled.
    b. document.body.getElementsByTagName("video")[0].audioTracks[1].enabled=true This activates the second audio track.
    c. Un-pause the video. The audio output has indeed switched to the second track (in my case from language A to language B).

I observed that when un-pausing the video playback would sometimes hang. I could however resolve this by clicking the "rewind 10 seconds" button.

I don't know how to circumvent the hanging, but it is not a Streama issue. The same thing happened when running the above commands on a local file that I directly opened without Streama (i.e. using file:///path/to/video.mp4).

I haven't looked into how to integrate this functionality in Streama, but I wanted to share the info in case someone wants to pick this up. As I understood, the buttons are currently enabled/disabled server-side. Since the server can't know if the client supports the audioTracks property (or can it?), this means that the functionality for selecting audio tracks probably has to be implemented in client-side Javascript.

i have just tried this on Chrome (Version 83.0.4103.106 (Official Build)

(64-bit)) and received an error:

document.body.getElementsByTagName("video")[0].audioTracks[0].enabled=false
false
document.body.getElementsByTagName("video")[0].audioTracks[1].enabled=true

VM356:1 Uncaught TypeError: Cannot set property 'enabled' of undefined
at :1:70

On Tue, Jun 16, 2020 at 4:58 PM Frank Oltmanns notifications@github.com
wrote:

Motivated by the information in the above comment
https://github.com/streamaserver/streama/issues/454#issuecomment-454085214
by @f1reflyyyylmao https://github.com/f1reflyyyylmao I checked the
functionality in Chrome (Version 83.0.4103.97 (Official Build) (64-bit))
and in principle it worked.

These are the steps:

  1. Enable #enable-experimental-web-platform-features in
    chrome://flags/ and restart Chrome.
  2. Open Streama and start a MP4 video with two audio tracks (it might
    work with other file formats and more tracks, but I haven't tested). Chrome
    automatically chooses the first track.
  3. Pause the video.
  4. Run the following Javascript commands in the developer tools
    console:
    a.
    document.body.getElementsByTagName("video")[0].audioTracks[0].enabled=false
    (Track 0 is by default enabled and all other tracks are disabled, hence
    this command effectively mutes the audio, because no track is enabled.
    b.
    document.body.getElementsByTagName("video")[0].audioTracks[1].enabled=true
    This activates the second audio track.
    c. Un-pause the video. The audio output has indeed switched to the
    second track (in my case from language A to language B).

I observed that when un-pausing the video playback would sometimes hang. I
could however resolve this by clicking the "rewind 10 seconds" button.

I don't know how to circumvent the hanging, but it is not a Streama
issue. The same thing happened when running the above commands on a local
file that I directly opened without Streama (i.e. using
file:///path/to/video.mp4).

I haven't looked into how to integrate this functionality in Streama, but
I wanted to share the info in case someone wants to pick this up. As I
understood, the buttons are currently enabled/disabled server-side. Since
the server can't know if the client supports the audioTracks property (or
can it?), this means that the functionality for selecting audio tracks
probably has to be implemented in client-side Javascript.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/streamaserver/streama/issues/454#issuecomment-644854473,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOCBR55ZEO3I4TI4TOLMWATRW6JAZANCNFSM4EAEBK3A
.

Sorry, ignore that... Used wrong test clip... Apologies.

On Tue, Jun 16, 2020 at 11:46 PM Shane Tucker mrshanetucker@gmail.com
wrote:

i have just tried this on Chrome (Version 83.0.4103.106 (Official Build)

(64-bit)) and received an error:

document.body.getElementsByTagName("video")[0].audioTracks[0].enabled=false
false
document.body.getElementsByTagName("video")[0].audioTracks[1].enabled=true

VM356:1 Uncaught TypeError: Cannot set property 'enabled' of undefined
at :1:70

On Tue, Jun 16, 2020 at 4:58 PM Frank Oltmanns notifications@github.com
wrote:

Motivated by the information in the above comment
https://github.com/streamaserver/streama/issues/454#issuecomment-454085214
by @f1reflyyyylmao https://github.com/f1reflyyyylmao I checked the
functionality in Chrome (Version 83.0.4103.97 (Official Build) (64-bit))
and in principle it worked.

These are the steps:

  1. Enable #enable-experimental-web-platform-features in
    chrome://flags/ and restart Chrome.
  2. Open Streama and start a MP4 video with two audio tracks (it might
    work with other file formats and more tracks, but I haven't tested). Chrome
    automatically chooses the first track.
  3. Pause the video.
  4. Run the following Javascript commands in the developer tools
    console:
    a.
    document.body.getElementsByTagName("video")[0].audioTracks[0].enabled=false
    (Track 0 is by default enabled and all other tracks are disabled, hence
    this command effectively mutes the audio, because no track is enabled.
    b.
    document.body.getElementsByTagName("video")[0].audioTracks[1].enabled=true
    This activates the second audio track.
    c. Un-pause the video. The audio output has indeed switched to the
    second track (in my case from language A to language B).

I observed that when un-pausing the video playback would sometimes hang.
I could however resolve this by clicking the "rewind 10 seconds" button.

I don't know how to circumvent the hanging, but it is not a Streama
issue. The same thing happened when running the above commands on a local
file that I directly opened without Streama (i.e. using
file:///path/to/video.mp4).

I haven't looked into how to integrate this functionality in Streama, but
I wanted to share the info in case someone wants to pick this up. As I
understood, the buttons are currently enabled/disabled server-side. Since
the server can't know if the client supports the audioTracks property
(or can it?), this means that the functionality for selecting audio tracks
probably has to be implemented in client-side Javascript.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/streamaserver/streama/issues/454#issuecomment-644854473,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOCBR55ZEO3I4TI4TOLMWATRW6JAZANCNFSM4EAEBK3A
.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Thovi98 picture Thovi98  Â·  4Comments

willmtemple picture willmtemple  Â·  6Comments

geoah picture geoah  Â·  3Comments

Norwelian picture Norwelian  Â·  3Comments

Gijs735 picture Gijs735  Â·  7Comments