An illustration of a few branches descending down to the content of the page

This application lets you livestream using a server or a specified .m3u8 file. It uses HLS as opposed to RTMP and has an embedded chat functionality for viewers of the stream. It was built using: Node.js, Video.js, and Nginx. Feel free to see the project on GitHub.

why HLS over RTMP?

HLS (HTTP Live Streaming) breaks video into small, timestamped segments (~2-10 seconds each) served over standard HTTP, making it compatible with CDNs, firewalls, and mobile networks without special protocol support. RTMP, while offering lower latency, requires dedicated server infrastructure and struggles with firewalls and mobile clients. For a web-based livestream player, HLS is certainly the more pragmatic choice. The trade-off of slightly higher latency (typically 5-30 seconds vs. 1-3 for RTMP) is well worth the compatibility and infrastructure simplicity gained. In the future, I expect technologies like LL-HLS (Low-Latency HLS) to bring HLS in line with RTMP.

project architecture

The architecture decouples video delivery from application logic. Video.js with the HLS plugin handles manifest parsing and segment fetching client-side, while Socket.io manages real-time chat independently. The server only needs to serve static HTML and broker chat messages, letting the HLS manifest and segments be delivered by any standard HTTP server or CDN. This separation of concerns is what makes the livestreaming scalable to thousands of concurrent clients.


installation and build instructions

Clone the repository locally.

git clone https://github.com/abenav4/Twitching-Livestream-App.git

You’ll need an active HLS stream to consume. Free test streams are available here.

To alter the .m3u8 file, please modify the value of src in index.html to your server address.

<source src="https://cph-p2p-msl.akamaized.net/hls/live/2000341/test/master.m3u8" type="application/x-mpegURL">

To install the relevant dependencies:

npm install

To start the application:

npm start

To view the app in your browser, go to http://localhost:3000.