Giter Club home page Giter Club logo

low-latency-preview's Introduction

Streamline Low Latency DASH preview

This is a proof of concept system for generating a low latency live stream from encoder, to server, to player using entirely open source software end to end. It will render a page with a player in it. The player will display a video that has a test pattern generated by the encoder with an embedded timecode burned into the video. This is the "encoder time" timecode. On top of that there is a time code overlaid on the player. This is the wall clock or player timecode. The difference between these two clocks is your precise end to end latency.

This player will load extra quickly and then play with time a bit to "walk in" the latency. This means it will play faster than real time until it catches up to the latency that you are requesting. Our default here is 2.2 seconds.

screenshot

Things to know

  • The work in this repo on low latency will later form the basis of an update to the larger streamline project. It is a proof of concept / preview for a future version called streamline prime.
  • This demo assumes that you are using Ubuntu / Debian or MacOS
  • This demo provides everything you need to ruin a low latency live stream for educational purposes
  • This is a preview and proof of concept. It is not meant to be used in production. There has not been extensive testing yet. There are bugs. I promise you, there are bugs ;). Feel free to test, contribute fixes, etc, but don't dive right in and assume the pieces are production ready.

TODO for preview project

  • Maybe Windows directions and scripts
  • Polish server performance and reliability
  • Add ABR demo once dash.js fixes some bugs
  • Roll everything into a streamline prime project

Building

Ubuntu / Debian

Run...

wget https://codeload.github.com/streamlinevideo/low-latency-preview/zip/master && unzip master && rm -r -f master/ && cd low-latency-preview-master/ && ./buildEncoderAndServerUbuntu.sh

You have now built everything. Continue to the run section.

MacOS

First make sure you have homebrew installed.

Run....

curl -o master.zip https://codeload.github.com/streamlinevideo/low-latency-preview/zip/master && unzip master.zip && cd low-latency-preview-master/ && ./buildEncoderAndServerMacOS.sh

Running the server

sudo ./launchServer.sh

Running the test pattern generator and encoder

./launchEncoderTestPattern.sh *insert destination hostname of server* *insert a stream name*

Example:

./launchEncoderTestPattern.sh localhost 1234

View your content

Oh ๐Ÿ’ฉ here we go!
View your stream at http://localhost:8080/ldash/play/1324/manifest.mpd

Go to that URL and you should see your stream!

To kill the streams...

./killAll.sh

What do I do with this?

Be impressed by the speed! Be excited by the opportunities for scalability. Learn about the realities of low latency live streaming and how to implement it. You can learn form this and modify parts to build your own own live streaming system. This project itself doesn't have a huge use, the proof of concept of the architecture, the server that we have created, and the documented settings for FFmpeg and dash.js are what is of value to other projects.

Join the streamline community

The streamline team hangs out in the video-dev slack in the #streamline room. Feel free to join the fun, ask for features, give feedback, etc.

Credits

  • Credit to Lei Zhang @codingtmd for writing the server.
  • Thank you to Matt Szatmary @szatmary for helping us debug.
  • Credit to Karthic Jeypal @jkarthic-akamai for his work on FFmepg that makes this possible.
  • Credit to Will Law @wilaw and the whole dash.js team for the player that enables this. We are using the dash.js player. Feel free to visit their website for their nightly reference player or their github.
  • ...and I guess me, Colleen Kelly Henry @colleenkhenry, for putting this all together.

low-latency-preview's People

Contributors

colleenkhenry avatar dheitmueller 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.