- Connects video players into a peer-to-peer network
- Whenever possible, download video content from peers rather than CDN
- Reduces CDN traffic consumption
- Improves overall video start time and quality, reduces buffering
- Runs in AWS
- Deploys in minutes
- Sign in to the AWS Management Console, then click the button below to launch the CloudFormation template. Alternatively you can download the template and adjust it to your needs.
- Choose your streaming server
InstanceType
:t3.nano
is the cheapest, and suitable for most scenariost3.micro
is similarly appropriate if you're taking advantage of the AWS Free Tier, otherwise slightly more expensive than the nano
- Hit the
Create Stack
button. - Wait for the
Status
to becomeCREATE_COMPLETE
. Note that this may take up to 5 minutes or more. - Under
Outputs
, notice the keys namedIngressEndpoint
andTestPlayerUrl
; write these down for using later
-
Point your RTMP broadcaster (any of these will work) to the rtmp
IngressEndpoint
output by CloudFormation aboveNote that, while some RTMP broadcasters require a simple URI, others (like OBS Studio) require a Server and Stream key. In this case, split the URI above at the last slash character, as following:
Server:
rtmp://[HOST]/live
Stream key:stream001
Also note that the enpoint may not be ready as soon as CloudFormation stack is complete; it may take a couple minutes more for the server software to be compiled, installed and started on the virtual server so be patient
-
Test the video playback by opening the above
TestPlayerUrl
(as output by CloudFormation) in a browserOnce again, node that this may not be available right away; resources do take time to get set up, especially on lower-end virtual server instances
-
Duplicate the above video playback window in various browsers/devices; notice the
Connected peers
,Data downloaded from peers
andData uploaded to peers
information fields to assess the efficiency of your peering setup
- Proof of concept has been reduced to the most basic functionality so as to be easily understood and integrated
- P2P capability is based on the amazing resources here
- Simplified setup makes use of public STUN servers and WebTorrent trackers; setting up your own should be considered for production
- The sample uses Plyr as its test player; many others are supported