Testing CDN for Low Latency WebRTC Streaming
Example testing of the minimum CDN configuration for low latency WebRTC streaming based on Web Call Server
For testing, we deployed three WCS Demo servers in the data center: 1 Origin server and 2 Edge servers.
https://demo-origin.flashphoner.com:8444/ https://demo-edge1.flashphoner.com:8444/ https://demo-edge2.flashphoner.com:8444/
For instructions on deploying and configuring servers for CDN, see the Embedding page.
Test plan
- Publish a video stream from a web camera to a demo-origin server
- Play video stream from demo-edge1 and demo-edge2 servers
- Estimate possible CDN latency
Scheme work of CDN for WebRTC low latency streaming
Getting a video stream by Edge servers from an Origin server (steps 4 and 5 in the diagram below) takes place “under the hood” of the WCS server unnoticed by the end user; for details, see the documentation.
Publish a video stream to CDN
We start testing by publishing the video stream on the demo-origin server.
1. Log in to the web interface of the demo-origin server
2. Select “Two-Way Streaming” from the menu on the left side of the page
3. Click “Connect”
4. Wait for confirmation of a successful connection to the server (usually 1-2 seconds). Then specify a convenient name for the stream (in our example “Stream1”) and click the “Publish” button
Your local video stream is displayed on the web page.
For testing, we use a video with a countdown timer, which we publish using a virtual camera.
Playing a video stream from an Edge server
Start the stream playback from the demo-edge1 server in the browser
1. Log in to the web interface of the server demo-edge1
2. Select “Player” from the menu on the left side of the page
3. Enter the name of the stream that you specified on the demo-origin server in the “Stream” field and click the “Start” button
The video stream from the demo-origin server is played in the player on the demo-edge1 server. Repeat the steps for demo-edge2
Test result
Thus, the stream “Stream1” was published on the demo-origin server, transferred to the CDN and played through the demo-edge1 and demo-edge2 servers. The timer on the video shows that the latency in playback is less than a second
Download Web Call Server 5
System requirements: Linux x86_64, 1 core CPU, 2 Gb RAM, Java
Installation:
- wget https://flashphoner.com/download-wcs5.2-server.tar.gz
- Unpack and install using 'install.sh'
- Launch server using command 'service webcallserver start'
- Open the web interface https://host:8444 and activate your license
If you are using Amazon EC2, you don't need to download anything.