Giter VIP home page Giter VIP logo

p2p-live-streaming-platform's Introduction

P2P Assisted Live Streamig Platform

Highlights

  • 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

Deploying the platform

  1. 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.

Launch Stack

  1. Choose your streaming server InstanceType:
    • t3.nano is the cheapest, and suitable for most scenarios
    • t3.micro is similarly appropriate if you're taking advantage of the AWS Free Tier, otherwise slightly more expensive than the nano
  2. Hit the Create Stack button.
  3. Wait for the Status to become CREATE_COMPLETE. Note that this may take up to 5 minutes or more.
  4. Under Outputs, notice the keys named IngressEndpoint and TestPlayerUrl; write these down for using later

Testing your setup

  1. Point your RTMP broadcaster (any of these will work) to the rtmp IngressEndpoint output by CloudFormation above

    Note 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

  2. Test the video playback by opening the above TestPlayerUrl (as output by CloudFormation) in a browser

    Once 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

  3. Duplicate the above video playback window in various browsers/devices; notice the Connected peers, Data downloaded from peers and Data uploaded to peers information fields to assess the efficiency of your peering setup

Integration, customization, notes

  • 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

p2p-live-streaming-platform's People

Contributors

nimigeanu avatar

Stargazers

Jayden Carey avatar Lourys avatar Zachary Talis avatar Billy R avatar Kolja avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.