one video stream with multiple audio tracks ?

403 views
Skip to first unread message

Alex A

unread,
May 24, 2021, 5:07:31 PM5/24/21
to Ant Media Server
Hi,

Simple question: is it possible to have a single video stream which contains multiple (7x different) audio tracks, and on the client-side be able to select which audio tracks in the video stream should be played ?

This is because we want to make a very specific mergestream which contains 7 different audio tracks, and on the client side we want to play all the audio EXCEPT for individual audio tracks which the client can 'mute'.

So imagine a mergestream feed (single stream) which the viewers can MUTE the audio of individual participants within that stream.

So to do this, we imagine we would like 7x audio tracks inside the video stream, and be able to play/mute each audio track individually.

----
We could of course setup 7 independent streams, one for each audio track, but we are trying to simplify this and contain it within one stream.

Is this possible ?

Thanks!

Alex.

Tahir Gölge

unread,
May 26, 2021, 4:10:43 AM5/26/21
to Ant Media Server
Hi Alex,

This feature is in development right now in the server side. What I did so far for the feature is in these issues. It requires a bit of architectural change to support multiple tracks in the same stream so we are working on that. Also, there might be a solution in the application level for such task, stream_merger.js as we talked has a mute flag also. If you publish to a conference room with multiple audio tracks you can merge them on client side and mute the ones you like with mute flag, however, in this case you need to develop a system that the watcher sends commands to the merger client for muting and unmuting. I hope I could clearly explain this, if you want to go that direction I can help more with the mute flag.



Cheers

Alex A

unread,
May 31, 2021, 5:09:33 PM5/31/21
to Ant Media Server
Hi Tahir,

Thanks for your help - yes i understood what you meant. 

The problem is i want each viewer to independently mute some audio feeds in the merged stream...  for example there are 6 people in the boradcast but 50x viewers, and some viewers may want to mute person1, but others do not.  So sending a mute command back to the merger for muting tasks will not help.

What I did for now is to broadcast a merged stream (singular) with 7x audio streams separately... the timing looks okay, they do not seem to become 'out of sync' with the video - so this appears to work okay.

Thanks!

Alex.

Tahir Gölge

unread,
Jun 1, 2021, 3:51:06 AM6/1/21
to Ant Media Server
Hi,

Yep, I got your request, like I said it is in development right now, actually some part is done. You will be able to send websocket messages from client to the server about which audio tracks you want to disable, it is done for video but we needed to change low level architecture for audio, check out the PR: https://github.com/ant-media/StreamApp/pull/168/files

I think it will be there for 2.3.4 version, it will not catch 2.3.3 .

Cheers

Peter Zanetti

unread,
Jun 10, 2021, 5:16:59 PM6/10/21
to Ant Media Server
What is the application here for video as it is being implemented? Multiple video tracks in a single stream?

Tahir Gölge

unread,
Jun 11, 2021, 3:24:18 AM6/11/21
to Ant Media Server
Correct, it is multiple video tracks and audio tracks in a single stream.
Reply all
Reply to author
Forward
0 new messages