MCU / ROOM name

Hello!

What is the difference from MCU / Simple mixer?

We notice that MCU audio & video is fluid and good quality.
We notice that MIXER without #room on name - just a mixer adding inputs, has few troubles with image and sound quality.

Is there anything related? Is the #room making a difference?
 

Max

Administrator
Staff member
Good day.
The difference is in realtime settings.
When realtime mixer enabled (this is default settings in latest builds since 5.2.607)
Code:
mixer_realtime=true
the mixer bufferizes incoming stream for smooth playback, but does not wait for stream resurrection if it has a problems (packet loss, bandwidth isuues and so on). So mixer output stream continues, only problem participant freezes.
When realtime mixer is disabled
Code:
mixer_realtime=false
previous implemetation works. In this case, the mixer waits for all participants even if their streams has quality problems. Non-realtime mixer has some tweaks to improve quality, but it is very sensitive to incoming stream parameters. This can lead to mixer freezes and out of sync problems.
The stream can be added to any of mixer types by special #mixer_name or by REST API, no difference at this point.
May be the out of sync problem that you reported in this thread relates to non realtime mixer. Please switch to realtime, disable all the tweaks like video buffering and check.
 
Hello Max!

We just copied settings from our MCU server to our MIX server.
Same servers settings @Google.

The MCU have improved performance than mixer output.

Differences:

1-) On MCU, we publish by API and use #room on name - and on mixer, we publish by API without #room
2-) On Mixer we inject RTMP stream as INTRO VIDEO .... MCU always has only speakers.

Can RTMP cause this?
Can missing #room @injection streams cause thist?
 

Max

Administrator
Staff member
Can RTMP cause this?
Can missing #room @injection streams cause thist?
RTMP can cause out of sync in mixer output stream if incoming stream has out of sync. Anyway,it does not depend on mixer API used.
Please clarify how do you publish the same stream to MCU server and to MIX server: WebRTC, RTMP?
Please check how the stream is playing from MIX server before adding to mixer. If stream is published by RTMP, there can be out of sync before the mixer.
Also please collect two reports from those two servers when the same stream is published to MCU and to MIX, and send us using this link.

About the streaming structure. How much streams have to be published to one mixer on MIX sersver? If only two streams per mixer (participant and its desktop), the mixer seems excessive for it. In this case, both streams can be just played simultaneously on the page.
 
Hello Max!

We will provide the report.

We are working on this way:

Server A -> receive webcams & desktops from WebRTC.

On streamer.js we add 2 PULLs.



JavaScript:
function pull(nomedostream){
    
            console.log("Inside PULL");
    
            var resultpull;

            fetchUrl = apiurl + "pull/pull";
            const options = {
                method: "POST",
                headers: {
                    "Content-Type": "application/json"
                },
                body: JSON.stringify({
                    "uri": "wss://WCSSERVER--B:8443",
                    "localStreamName": nomedostream,
                    "remoteStreamName": nomedostream
                }),
            }

            

            resultpull = fetch(fetchUrl, options);
    
            console.log(nomedostream);
    
    
    
}

function pullmcu(nomedostream){
    
            var salaid = field("salaid");
    
            console.log("Inside PULL MCU");
    
            var resultpull;

            fetchUrl = apiurlservermcu + "pull/pull";
            const options = {
                method: "POST",
                headers: {
                    "Content-Type": "application/json"
                },
                body: JSON.stringify({
                    "uri": "wss://WCSSERVER--C:8443",
                    "localStreamName": nomedostream + "#room-" + salaid,
                    "remoteStreamName": nomedostream
                }),
            }

            

            resultpull = fetch(fetchUrl, options);
    
            console.log(nomedostream);
    
    
    
}

On this way, we pull the same stream for server MCU where users are automatic added to the room and we pull to our MIXER server where the "operator" can publish or remove from Mixer from our control panel - using API.
 
Hello Max!

We have copied our MCU settings (flashphoner.properties file) to our MIXER and change entire application from our side, to convert Mixer output to MCU ... open a room #room-XX ... and streams like streamname#room-XX.

We notice 90% of improvements of quality.
Go deeper, we found a situation:

If background image is enabled, mixer frozzen ...
We just comment out background image line.

We notice 95% of improvements of quality.
Now, we go deeper and enable

#mixer_display_stream_name=true #Yes, commented
mixer_debug_mode=true


We solve all problems!

Our conclusion at this time is:

MCU only really works if a room is automatically created by user join streamname#room-XX and we can experience a REAL MCU usage.
We have some issues with background image (like reenderization?)

Starting the mixer before and add participants by API do not provide the same experience / result.
 

Max

Administrator
Staff member
We raised the ticket WCS-2829 to check this issues.
Please provide the following:
- actual settings both for MCU and MIXER server
- background image to reproduce mixer freeze
- reports from both servers
Also please note that /pull/pull query pulls WebRTC stream from server defined in uri to local server. Your code sample seems like you pull stream from server B to A and from server C to A. Maybe, you should use /pull/push instead:
JavaScript:
function pull(nomedostream){
   
            console.log("Inside PULL");
   
            var resultpull;
            /// Push stream from server A to B
            fetchUrl = apiurl + "pull/push";
            const options = {
                method: "POST",
                headers: {
                    "Content-Type": "application/json"
                },
                body: JSON.stringify({
                    "uri": "wss://WCSSERVER--B:8443",
                    "localStreamName": nomedostream,
                    "remoteStreamName": nomedostream
                }),
            }

           

            resultpull = fetch(fetchUrl, options);
   
            console.log(nomedostream);
   
}

function pullmcu(nomedostream){
   
            var salaid = field("salaid");
   
            console.log("Inside PULL MCU");
   
            var resultpull;
            /// Push stream from server A to C
            fetchUrl = apiurlservermcu + "pull/push";
            const options = {
                method: "POST",
                headers: {
                    "Content-Type": "application/json"
                },
                body: JSON.stringify({
                    "uri": "wss://WCSSERVER--C:8443",
                    "remoteStreamName": nomedostream + "#room-" + salaid,
                    "localStreamName": nomedostream
                }),
            }

           

            resultpull = fetch(fetchUrl, options);
   
            console.log(nomedostream);
       
}
 
Top