Dynamic MCU mixer layout

Max

Administrator
Staff member
So following your question
A layout is updated only on stream create/delete, as far as i see.
No. The layout will be switched between files 1.mix 2.mix, etc., depending on number of streams in the Mixer.
 
Actually, the custom layout is a folder with N files

1.mix
2.mix
..
N.mix

If 1 participant in the mixer then 1.mix config will be taken as XML layout
If 2 participant in the mixer then 2.mix config will be taken as XML layout
etc

Yes. You can set layout folder during mixer creation.

/rest-api/mixer/startup
{
"uri": "mixer://mixer1",
"localStreamName": "mixer1_stream",
"hasVideo": true,
"hasAudio": false,
"mixerLayoutDir": "/opt/mixer1-layout"
}
Got it, thanks. I'd like to submit a feature request to be able to re-apply/update layout on existing streams.
 

Max

Administrator
Staff member
I'd like to submit a feature request to be able to re-apply/update layout on existing streams.
Suppose there are 2 participants in mixer (2.mix layout is used).
You can update layout for a certain number of participants by the following way:
1. Change the content of 2.mix as needed (background, watermark, picture positions etc)
2. Remove one participant from mixer (without stopping the participant stream)
Code:
POST /rest-api/mixer/remove HTTP/1.1
HOST: wcs:8081
content-type: application/json
 
{
    "uri": "mixer://mixer1",
    "remoteStreamName": "participant1"
}
The layout 1.mix will be applied
3. Re-add the participant to mixer
Code:
POST /rest-api/mixer/add HTTP/1.1
HOST: wcs:8081
content-type: application/json
 
{
    "uri": "mixer://mixer1",
    "remoteStreamName": "participant1"
}
The layout 2.mix will be re-applied with changes made on step 1.
 
This makes sense. And after giving it a thought I realised that by using a java class i can apply any sort of modifications I want to all streams.
 

Max

Administrator
Staff member
We raised the ticket WCS-3592 to implement REST API to change mixer layout dynamically without streams readdition. Will inform about a progress. This may take a time.
 

Luca

New Member
We raised the ticket WCS-3592 to implement REST API to change mixer layout dynamically without streams readdition. Will inform about a progress. This may take a time.
This is a very valuable feature which I am very interested in, I would suggest(if possible) to also implement some sort of transition effect when dynamically changing the layout as to make it more easy on the eye and make it look more professional, really looking forward to see this completed.
 
Top