• Stars
    star
    165
  • Rank 228,906 (Top 5 %)
  • Language
    Go
  • Created over 4 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

RTSP -> WebRTC Server that generates a CPU Usage report

Pion WebRTC
RTSP Bench

RTSP Server that generates usage reports, Web/CLI Clients included!

Pion webrtc Slack Widget
License: MIT


rtsp-bench is a WebRTC server that pulls from an RTSP feed, and then re-distributes via WebRTC. It generates a report.csv with the CPU Usage and connected PeerConnection count.

This repo contains a CLI WebRTC Client that will connect and perform the load test. This is done via a REST API hosted on :8080/doSignaling. You can also watch the video/load test via the web UI at :8080/, it connects via the same REST API as the CLI.

This project heavily borrows from RTSPtoWebRTC. If you are looking for a full featured application to deploy that is probably a better choice. It is driven by a config file and has proper error handling.

Running

  • export GO111MODULE=on
  • git clone https://github.com/pion/rtsp-bench.git
  • cd rtsp-bench/server
  • go run main.go

You can then access the Web UI at http://localhost:8080. This requires a browser that supports H264, this repo doesn't do any error handling around signaling failures.

You can also use the provided WebRTC CLI

  • cd rtsp-bench/client
  • go run main.go localhost:8080

In the server folder you will have a reports.csv that looks like

timestamp, peerConnectionCount, cpuUsage
2020-12-15T13:59:23-08:00, 1, 17.878028
2020-12-15T13:59:26-08:00, 0, 35.101254
2020-12-15T13:59:29-08:00, 1, 12.565718
2020-12-15T13:59:32-08:00, 1, 20.600500
2020-12-15T13:59:35-08:00, 1, 17.878028
2020-12-15T13:59:38-08:00, 0, 41.795438
2020-12-15T13:59:41-08:00, 0, 37.083333

Results

The following graph was generated from the results.csv that was generated by the server. The client was run from another EC2 instance in the same VPC. The Y Axis is the CPU Usage, and the X Axis is the count of PeerConnections. This was run on a m4.2xlarge (Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz)

Results Graph

FAQ

What codec/bitrate was being distributed

H264 that is approximately 250 Kb/s. You can change that here

What SRTP Cipher was used

SRTP_AEAD_AES_128_GCM

What Congestion Control/Feedback is used

None, on purpose.

Pion by design allows the user to specify what they want. We are distributing a video feed that is already encoded, and has a very small keyframe-interval so these things don't help us.

When setting up the PeerConnection you have full control of the RTP/RTCP pipelines, so users can add TWCC/NACK/FEC in a way that works for them.

I want to talk about cool WebRTC stuff!

Join the Pion Slack

Community

Pion has an active community on the Golang Slack. Sign up and join the #pion channel for discussions and support. You can also use Pion mailing list.

We are always looking to support your projects. Please reach out if you have something to build!

If you need commercial support or don't want to use public methods you can contact us at [email protected]

License

MIT License - see LICENSE for full text

More Repositories

1

webrtc

Pure Go implementation of the WebRTC API
Go
13,425
star
2

turn

Pion TURN, an API for building TURN clients and servers
Go
1,826
star
3

example-webrtc-applications

Examples of WebRTC applications that are large, or use 3rd party libraries
Go
1,031
star
4

awesome-pion

A curated list of awesome things related to Pion
Shell
723
star
5

stun

A Go implementation of STUN
Go
625
star
6

dtls

DTLS 1.2 Server/Client implementation for Go
Go
584
star
7

mediadevices

Go implementation of the MediaDevices API.
Go
530
star
8

ice

A Go implementation of ICE
Go
430
star
9

opus

Pure Go implementation of Opus
Go
389
star
10

rtp

A Go implementation of RTP
Go
349
star
11

rtwatch

Watch videos with friends using WebRTC, let the server do the pausing and seeking.
Go
301
star
12

sctp

A Go implementation of SCTP
Go
219
star
13

offline-browser-communication

Demonstration of a browser connecting to Pion WebRTC without a signaling server.
Go
195
star
14

mdns

Pure Go implementation of Multicast DNS
Go
190
star
15

quic

A Go implementation of the QUIC API for Peer-to-peer and Client-to-Server Connections
Go
178
star
16

rtcp

A Go implementation of RTCP
Go
151
star
17

sdp

A Go implementation of the SDP
Go
146
star
18

srtp

A Go implementation of SRTP
Go
116
star
19

interceptor

Pluggable RTP/RTCP processors for building real time communication
Go
109
star
20

obs-wormhole

Supercharge OBS with WebRTC. Remote WebRTC Sources and Serverless Broadcasting
Go
95
star
21

datachannel

A Go implementation of WebRTC Data Channels
Go
81
star
22

transport

Transport testing for Pion
Go
78
star
23

explainer

Explainer parses WebRTC Offers/Answers then provides summaries and suggestions
Go
45
star
24

11LiveChat

Another one-one live chatroom using pion webrtc with sfu mode
Go
42
star
25

udp

Please use github.com/pion/transport/v2/udp instead
Go
36
star
26

webrtc-voicemail

Voicemail.... for the web! Create voicemails via WebRTC and Transcribe them.
Go
31
star
27

demo-conference

A simple web conferencing application built using Pion
HTML
29
star
28

webrtc-zero-downtime-restart

A playground to make WebRTC easier to deploy, safer and more robust
Go
21
star
29

webrtc-v3-design

EXPERIMENTAL - new API proposals and discussions
Go
17
star
30

signaler

The Pion Signaler
Go
15
star
31

dcnet

net interfaces over DataChannels
Go
14
star
32

portmap

An implementation of UPnP-IGD, NAT-PMP and PCP for configuring port-forwarding
Go
13
star
33

.goassets

Asset files automatically deployed to Go package repositories
Shell
9
star
34

codec

Go wrappers of multiple codecs to be go gettable
Go
7
star
35

logging

The logging library used by Pion
Go
7
star
36

website

Pion public website
HTML
7
star
37

turnc

RFC 5766 TURN client implementation in go
Go
6
star
38

producer

File to webrtc.Track playback
Go
5
star
39

talks

Content for talks given by Pion WebRTC developers
CSS
5
star
40

pion-browser-client

Browser Client for Pion
JavaScript
5
star
41

msapi

media stream api for webrtc !
Go
4
star
42

randutil

Helper library for cryptographic and mathmatical randoms
Go
4
star
43

zapion

uber-go/zap ⚑ backended pion logger
Go
3
star
44

pkg

Shared Go libraries used by Pion products
Go
3
star
45

ci-sandbox

CI testing sandbox
Go
2
star
46

simulnet

A net implementation that enables simulations
2
star
47

ion-admin

This is ion's manager
1
star
48

.github

Default community health files
1
star
49

rtpio

Go
1
star