Skip to content

Commit

Permalink
Update webrtc-load-testing.md
Browse files Browse the repository at this point in the history
  • Loading branch information
yashtandon113 authored Mar 20, 2024
1 parent 510a4bb commit 340547b
Showing 1 changed file with 42 additions and 26 deletions.
68 changes: 42 additions & 26 deletions docs/guides/configuration-and-testing/webrtc-load-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar_position: 4

# Load testing

In this tutorial, we'll explain how to make a load testing on your Ant Media Server. The test environment has two parts: test server and SUT (system under test). We have two different setups for two different SUTs.
In this tutorial, we'll explain how to do WebRTC load testing on your Ant Media Server. The test environment has two parts: the test server and the SUT (system under test). We have two different setups for two different SUTs.

Preparation of SUT
------------------
Expand Down Expand Up @@ -69,7 +69,7 @@ To deploy an Ant Media Server cluster, please see [here](https://github.com/ant-
Ant Media WebRTC test tool
--------------------------

You can download the WebRTC load test tool from your account at [antmedia.io](https://antmedia.io/). The test tool is listed with Enterprise Edition under Download section of your Subscription.
You can download the WebRTC load test tool from your account at [antmedia.io](https://antmedia.io/). The test tool is listed for Enterprise Edition under the Download section of your account.

Ant Media WebRTC Test Tool is a Java project for testing Ant Media Server WebRTC capabilities and has the following features.

Expand All @@ -84,33 +84,49 @@ Running Ant Media WebRTC Test Tool

#### Installation

apt-get install openjdk-11-jre -y
unzip webrtctest-release-*.zip
cd webrtctest/
```bash
apt-get install openjdk-11-jre -y
unzip webrtctest-release-*.zip
cd webrtctest/
```

This tool can be run from the terminal with the following options:.

 This tool can be run from the terminal with the following options.
```bash
#publishes output.mp4 to the server with default name myStream
./run.sh -f output.mp4 -m publisher -s 10.10.175.53 -p 5080 -n 1 -u false

./run.sh -f output.mp4 -m publisher -n 1 #publishes output.mp4 to the server with default name myStream
#plays 100 viewers for default stream, myStream
./run.sh -m player -n 100 -s 10.10.175.53 -p 5080 -u false
```

./run.sh -m player -n 100 -s 10.10.175.53 -u false #plays 100 viewers for default stream myStream
If you are doing load testing on a cluster via a load balancer, then the command should be as follows:.

```bash
./run.sh -f test.mp4 -m publisher -s server-domain-name -n 1 -p 443 -q true -u false

./run.sh -m player -i streamId -n 100 -s server-domain-name -p 5443 -q true -u false
```

#### Parameters

Flag Name Default Description
---- ---- ------- -----------
f File Name test.mp4 Source file* for publisher output file for player
s Server IP localhost server ip
q Security false true(wss) or false(ws)
l Log Level 3 0:VERBOSE,1:INFO,2:WARNING,3:ERROR,4:NONE
i Stream Id myStream id for stream
m Mode player publisher or player
u Show GUI true true or false
p Port 5080 websocket port number
v Verbose false true or false
n Count 1 Number of player/publisher connctions
k Kafka Broker null Kafka broker address with port
r Publish Loop false true or false
c Codec h264 h264 or VP8
d Data Channel false true or false

Note that the file in mp4 format should have h264 encoded video and Opus encoded audio.
```
Flag Name Default Description
---- ---- ------- -----------
f File Name test.mp4 Source file* for publisher output file for player
s Server IP localhost server ip
q Security false true(wss) or false(ws)
l Log Level 3 0:VERBOSE,1:INFO,2:WARNING,3:ERROR,4:NONE
i Stream Id myStream id for stream
m Mode player publisher or player
u Show GUI true true or false
p Port 5080 websocket port number
v Verbose false true or false
n Count 1 Number of player/publisher connctions
k Kafka Broker. null Kafka broker address with port
r Publish Loop. false true or false
c Codec h264 h264 or VP8
d Data Channel. false true or false
```

**Note:-** The file in mp4 format should have h264 encoded video and Opus encoded audio.

0 comments on commit 340547b

Please sign in to comment.