Interruption occurs when playing many RTSP

Max

Administrator
Staff member
Looks like a bandwidth issue. You are trying to play 4 streams 2 mbps per stream, 8 Mbps in total.
Make sure your Amazon EC2 server is located in your region and you have a good channel towards this server.
You can check channel using iperf https://docs.flashphoner.com/displa...essorytools-Testingchannelbandwidthusingiperf

What you can do is

1. Switch playback to TCP.

2. You can add 4 streams into the Mixer.
Then bitrate will be 2 Mbps instead of 8 Mbps. It can help to reduce bandwidth.

REST API

Code:
/mixer/add

Please note. Mixer utilizes a lot of CPU and RAM resources. So you pay by CPU and RAM for low Bitrate.
 

kip9696

New Member
okay thx

The bandwidth simulation result is down speed 1.59Gbps, up speed is 450Mbps
In the case of TCP execution, it was useless
And, I cant use mixer because later we bring hundreds of streams to one server
Also, now it's 4, but i can bring up to 16

In this case, is it possible to solve it with simple server expansion?
And, i can fetch 9 streams per session
Can the number be increased?
 
Last edited:

Max

Administrator
Staff member
The bandwidth simulation result is down speed 1.59Gbps, up speed is 450Mbps
Please check the channel between player and server using iperf via TCP. In UDP mode, iperf measures network adapter bandwith, not whole channel.
You can also use Media Devices example to test bandwidth as described here.
Also, it can be bandwidth issue between server and RTSP cameras.
In this case, is it possible to solve it with simple server expansion?
No. This is end-to-end bandwidth issue, server expansion does not help.
And, i can fetch 9 streams per session
Can the number be increased?
There are no such limits, you can play any number of streams at one page. 9 stream seems to be a maximum number your channel allows.
Please consider streams transcoding to lower resolution and bitrate. for example
Code:
session.createStream({
    name: "stream1",
    constraints: {
          audio: true,
          video: {
                width: 640,
                height: 360,
                bitrate: 500
         }
    }
}).play();
 

kip9696

New Member
There are no such limits, you can play any number of streams at one page. 9 stream seems to be a maximum number your channel allows.
Please consider streams transcoding to lower resolution and bitrate. for example
Even 100kb streams per one will cause an error from the 10th
So I am using 2 sessions

And what exactly does a channel mean?
 

Max

Administrator
Staff member
Even 100kb streams per one will cause an error from the 10th
So I am using 2 sessions
Unfortunately, we cannot reproduce the issue with latest WCS build in modified 2 Players example (see attach).
Please clarify the following:
1. What WCS version do you use?
2. What browser do you use for testing&
3. How do you test in details: establishing one Websocket connection (as done in 2 Players example), then play 10 streams, or establishing 1 Websoket connection per stream?
Please also collect a report on server side as described here, add browser console output to the report, and send it using this form
And what exactly does a channel mean?
A channel means whole the media traffic path from publishsing or playing client to server including last mile.
 

Attachments

Top