All Projects → awslabs → aws-clustered-video-streams

awslabs / aws-clustered-video-streams

Licence: Apache-2.0 License
A clustered video stream is an AWS architecture that increases the quality and reliability of live events by providing seamless regional failover capabilities for live video steams. Operators can monitor the status of the clustered stream from a single pane of glass and dynamically control from which region the stream consumed by a player origin…

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language
shell
77523 projects
HTML
75241 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to aws-clustered-video-streams

hls-live-thumbnails
A service which will generate thumbnails from a live HLS stream.
Stars: ✭ 49 (+40%)
Mutual labels:  playlist, hls, hls-live-streaming
m3u8
Parse and generate m3u8 playlists for Apple HTTP Live Streaming (HLS) in Ruby.
Stars: ✭ 96 (+174.29%)
Mutual labels:  playlist, hls, playlist-parser
orcanode
Software for live-streaming and recording lossy or lossless compressed audio (HLS, DASH, FLAC) via AWS S3 buckets. ⭐
Stars: ✭ 23 (-34.29%)
Mutual labels:  hls, hls-live-streaming
mock-hls-server
Fake a live/event HLS stream from a VOD one. Useful for testing. Supports looping.
Stars: ✭ 61 (+74.29%)
Mutual labels:  playlist, hls
live-stream-on-aws
The live stream solution is a reference deployment that demonstrates how to deliver highly available live streaming video through an integrated workflow between Elemental Cloud and AWS.
Stars: ✭ 258 (+637.14%)
Mutual labels:  mediastore, mediapackage
RokuKast
A Chrome extension to stream web videos to Roku devices.
Stars: ✭ 63 (+80%)
Mutual labels:  hls, streaming-video
Owncast
Take control over your live stream video by running it yourself. Streaming + chat out of the box.
Stars: ✭ 5,382 (+15277.14%)
Mutual labels:  hls, streaming-video
cassandra-nginx-cdn
Some config files and POC code to use Apache Cassandra as distributed storage for HLS chunks accross multiple datacenters and scripts for converting/transcoding UDP MPEG-TS to HLS and vice versa. The idea is take from Globo.com’s Live Video Platform for FIFA World Cup ’14.
Stars: ✭ 24 (-31.43%)
Mutual labels:  hls, hls-live-streaming
tms
tms(toy media server) is a toy media server for myself learning media develop. Just for fun.
Stars: ✭ 29 (-17.14%)
Mutual labels:  hls, hls-live-streaming
spotify-vibe-check
Spotify Vibe Checker Web App to vibe check your Spotify Playlists! (currently broken due to CORS)
Stars: ✭ 24 (-31.43%)
Mutual labels:  playlist, playlist-parser
m3u8-parser
A simple HLS playlist parser for Java
Stars: ✭ 100 (+185.71%)
Mutual labels:  hls, hls-live-streaming
peerstohttp
Simple torrent proxy to http stream controlled over REST-like api
Stars: ✭ 30 (-14.29%)
Mutual labels:  playlist, streaming-video
Ffplayout Engine
python and ffmpeg based playout
Stars: ✭ 128 (+265.71%)
Mutual labels:  playlist, hls
hls-rip
Tool for ripping m3u8 playlists/segments.
Stars: ✭ 14 (-60%)
Mutual labels:  playlist, hls
lhls-simple-live-platform
Very simple low latency live platform prototype
Stars: ✭ 57 (+62.86%)
Mutual labels:  hls, hls-live-streaming
srt2hls
Simple audio HLS streaming server based on Liquidsoap
Stars: ✭ 66 (+88.57%)
Mutual labels:  hls, hls-live-streaming
smart rtmpd
RTMP server, smart, compact, high performance(c, c++), high concurrency, easy to maintain, easy to deploy, (supports multiple operating systems Windows and Linux, ARM, FreeBSD)
Stars: ✭ 159 (+354.29%)
Mutual labels:  hls
cordova-plugin-tencent-liteav
A cordova plugin for video playing with Tencent's LiteAV SDK. Support RTMP/HLS/FLV/MP4.
Stars: ✭ 24 (-31.43%)
Mutual labels:  hls
hello-muiplayer
💡 一款优秀的 HTML5 视频播放器框架
Stars: ✭ 268 (+665.71%)
Mutual labels:  hls
aws-lambda-http-check
Lambda function to check http endpoint wrapped in serverless project
Stars: ✭ 30 (-14.29%)
Mutual labels:  monitoring-tool

Clustered Video Streams (CVS)

Overview

A clustered video stream is an AWS architecture that increases the quality and reliability of live events by providing seamless regional failover capabilities for live video steams.

Operators can monitor the status of the clustered stream from a single pane of glass and dynamically control which region the stream consumed by a player originates from.

Failure scenarios addressed:

  • Individual live stream interruption - Some component in a live stream (encoder, network) goes down and the live stream stops producing new video segments.
  • AWS region failure - A regionalized disaster causes an AWS outage in a specific region. Regional redundancy at all points of the architecture ensure the live stream can recover by failing over to a new region.

How it works

A clustered video stream is composed of N identical redundant live video stream instances that are each deployed in a different AWS region. Each stream instance has an origin HTTP(S) endpoint (MediaPackage, S3, etc.) and an AWS CloudFront CDN HTTP(S) endpoint that are unique to the region. Stream instances are shown in the purple shaded boxes in Figure 1 - clustered video stream architecture below.

Image: image

Figure 1 - clustered video stream architecture

Origin health checks are used to monitor the health of each stream instance. Health checks continuously test the stream instance for different failure states. When changes are detected, a message is written to an SNS topic to notify consumers. Currently, this system has one health check, called the stale playlist detector, that checks the “liveness“ of a stream instance by monitoring changes to the segments availble in stream playlists. If the stream stops producing new segments within a time threshold, a failure is detected.

Clustered video stream state is stored in a DynamoDB global state table so that the state of all the stream instances can be accessed from any region in the cluster. The state table stores the desired state and health status of each stream instance.

  • domain - CloudFront domain for the stream instance. Used a key to uniquely identify each stream instance.
  • distro_open - indicates the desired behavior of a distribution and can be set by an end user.
  • stale - indicates whether a stale playlist health check has detected a failure.

A Lambda@Edge function, called the copilot, is used to change the HTTP(S) responses to requests for variant playlists and segments from each stream instance. The copilot lambda is installed on the CloudFront distribution for each stream instance and is triggered by origin-response CloudFront events. The lambda checks the desired state of the stream instance in the state table and will change the HTTP(S) response code to 404 if the distribution is closed (i.e. distro_open is false). This will trigger error handling in the player to try a different stream variant.

A merged, multi-region, master playlist is constructed from the top level playlists of each stream instance. This playlist contains the CloudFront endpoints for the stream variants (bitrate ladder playlists) for all of the redundant regions. The master playlist is the origin for the CDN hosted stream that is consumed by the video player.

The HLS adaptive bitrate protocol enables video players to select from any of the available variants of a stream at any segment boundary. The player might even select variants from different regions while playing the same video.

Variant selection is determined by the player based on performance and health of the variant being played. If a player recieves errors (such as 404s) trying to retrieve segments from a particular variant, it will switch to another variant at the same or different bitrate if one is available.

A failover occurs when an operator closes a distribution for a stream instance by setting the distro_open attribute to false for that instance. The copilot lambda will force a 404 return code in responses to all requests for that stream instance. This forces the player to switch to requesting a stream instance in another region. As deployed, this system supports manual failover that must be initiated by an end user by setting the distro_open flag for stream instances. Automatic failover would be a natural future extension to this capability.

Image: copilot-HLS.png

Continue to the INSTALL guide and try the Clustered Video Streams for yourself.

Navigate

Navigate to README | INSTALL | DESIGN

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].