-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Multiple audio streams in audioTracks property #6043
Comments
Hi @deadbeef84,
To clarify, you want HLS.js to adopt audioTracks, not only to switch between an active track like with Safari HLS playback but also to enable and mix multiple audio tracks? I'm not sure that is possible. With Safari HLS playback, enabling one audioTrack disables the others.
In the HLS spec EXT-X-MEDIA audio are alternatives of the same content. They are not tracks to be mixed. https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis#section-4.4.6.2.1
While HLS.js does not create audioTracks for each audio option available in an HLS asset, it does allow switching of the active track by setting |
Ah so you are asking for"Support for Multiple Audio Streams in |
I think you're in the realm of custom streaming app. You could fork parts of HLS.js to do the TS demuxing, but you'd probably want to use the Web Audio API https://www.w3.org/TR/webaudio/ to mix. This is outside the scope of HLS.js. |
I believe the behavior I'm describing is outside of the HLS spec? Anyway, the browser should be able to handle multiple audio streams when loading media directly using The spec says:
I can then use |
Is your feature request related to a problem? Please describe.
I'm using HLS.js together with broadcast media, and typically our media has 1 video stream and 8 mono audio streams. When playing the media, I need to be able to play all streams simultaneously. Unfortunately I haven't been able to make hls.js play all streams if I separate them into 8 streams, so as a workaround I've merged them into a single 8 channel stream. To do this I have to set a 7.1 channel layout, which creates several other issues (inconsistent channel order, compatibilty issues with other players/NLEs).
Describe the solution you'd like
I'm not exactly sure what the HLS spec allows, but what I'm looking for is to have 8 mono audio tracks that I can access using the video elements audioTracks property.
Additional context
I'm using the .ts file for other purposes than hls, which means it has to be a single file containing all streams.
The text was updated successfully, but these errors were encountered: