All Projects → mbugeia → srt2hls

mbugeia / srt2hls

Licence: GPL-3.0 license
Simple audio HLS streaming server based on Liquidsoap

Programming Languages

python
139335 projects - #7 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to srt2hls

tms
tms(toy media server) is a toy media server for myself learning media develop. Just for fun.
Stars: ✭ 29 (-56.06%)
Mutual labels:  hls, srt, hls-live-streaming
orcanode
Software for live-streaming and recording lossy or lossless compressed audio (HLS, DASH, FLAC) via AWS S3 buckets. ⭐
Stars: ✭ 23 (-65.15%)
Mutual labels:  hls, hls-live-streaming, hls-server
ZLMediaKit
WebRTC/RTSP/RTMP/HTTP/HLS/HTTP-FLV/WebSocket-FLV/HTTP-TS/HTTP-fMP4/WebSocket-TS/WebSocket-fMP4/GB28181/SRT server and client framework based on C++11
Stars: ✭ 7,790 (+11703.03%)
Mutual labels:  hls, srt
Srs
SRS is a simple, high efficiency and realtime video server, supports RTMP, WebRTC, HLS, HTTP-FLV, SRT and GB28181.
Stars: ✭ 16,734 (+25254.55%)
Mutual labels:  hls, srt
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 (-63.64%)
Mutual labels:  hls, hls-live-streaming
lhls-simple-live-platform
Very simple low latency live platform prototype
Stars: ✭ 57 (-13.64%)
Mutual labels:  hls, hls-live-streaming
hls-live-thumbnails
A service which will generate thumbnails from a live HLS stream.
Stars: ✭ 49 (-25.76%)
Mutual labels:  hls, hls-live-streaming
Tsduck
MPEG Transport Stream Toolkit
Stars: ✭ 381 (+477.27%)
Mutual labels:  hls, srt
m3u8-parser
A simple HLS playlist parser for Java
Stars: ✭ 100 (+51.52%)
Mutual labels:  hls, hls-live-streaming
aws-clustered-video-streams
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…
Stars: ✭ 35 (-46.97%)
Mutual labels:  hls, hls-live-streaming
Fastocloud
Self-hosted IPTV/NVR/CCTV/Video service (Community version)
Stars: ✭ 464 (+603.03%)
Mutual labels:  hls, srt
node-rtmp-hls
NodeJS live stream server with HLS ABR support
Stars: ✭ 55 (-16.67%)
Mutual labels:  hls, srt
ghichep-StreamingVideo
Ghi chép về Livestream sử dụng Opensource - Xây dựng một máy chủ Livestream theo cách đơn giản nhất - NGINX RTMP Dockerfile
Stars: ✭ 40 (-39.39%)
Mutual labels:  hls
hls-ts-js
HLS MPEG-TS parser library in Javascript
Stars: ✭ 35 (-46.97%)
Mutual labels:  hls
cpu-scheduling-simulator
⚙️Operating System CPU Scheduling Simulator😄
Stars: ✭ 20 (-69.7%)
Mutual labels:  srt
peerstohttp
Simple torrent proxy to http stream controlled over REST-like api
Stars: ✭ 30 (-54.55%)
Mutual labels:  streaming-audio
AudioAddict.bundle
Plex channel plugin for AudioAddict (radiotunes.com, di.fm, etc.)
Stars: ✭ 23 (-65.15%)
Mutual labels:  streaming-audio
hls-rip
Tool for ripping m3u8 playlists/segments.
Stars: ✭ 14 (-78.79%)
Mutual labels:  hls
SRT-Stats-Monitor
Loopy SRT Stats Monitor. Monitors your OBS SRT, SLS, RIST, & NGINX connection/s and switches OBS scene on a failed connection. Ideal for IRL/live streaming.
Stars: ✭ 63 (-4.55%)
Mutual labels:  srt
Zee5
Just a simple shit but no one knows
Stars: ✭ 29 (-56.06%)
Mutual labels:  hls-live-streaming

srt2hls

Simple audio HLS streaming server.

Intro

The goal of this program is to receive an audio stream with SRT and broadcast it with HLS. It can serve as a CDN origin server or as a set-and-forget streaming server.

How it works

srt2hls use Liquidsoap to receive a stream and encode it in HLS, then it use [nginx] (https://www.nginx.com/) to serve HLS content.

The Liquidsoap container, by default, run radio/live.liq script. It's a fully functionnal example that will :

  1. Receive 2 SRT inputs on ports 10000 and 10001
  2. Create a production stream with basic logic between the 2 inputs
  3. Encode the stream in aac with 3 quality
  4. Segment it in HLS format in /hls directory

The Nginx container come with a specific configuration to serve HLS content with proper Content-Type, CORS and Cache-Control headers. It need read only access to /hls directory to serve HLS segments and playlists.

Setup

With docker compose

mkdir hls
sudo chown -R 10000:10001 hls
sudo docker-compose up

Local installation requirements

Basic usage

Listening

By default the encoder send blank HLS segments, that mean if it's started, you can already listen the blank stream.

ffplay http://localhost:8080/live.m3u8
vlc http://localhost:8080/live.m3u8

Switch live source

The default script allow to switch the output between inputs.

# Check available input to switch to
curl http://localhost:8080/api/list?livesource
# Switch the livesource
curl http://localhost:8080/api/set?livesource=srt2
curl http://localhost:8080/api/set?livesource=srt1
# check the current live source
curl http://localhost:8080/api/get?livesource

Sending audio to the streaming server

Using ffmpeg

Requirement : ffmpeg compiled with srt support (https://johnvansickle.com/ffmpeg/ for example)

# live stream or static file
ffmpeg -re -i $AUDIOFILE -vn -f wav -codec:a pcm_s16le srt://127.0.0.1:10000

Monitoring

Grafana

http://localhost:3000/

Alt text

Prometheus

http://localhost:9090/

Development

Build images

sudo docker-compose build

Thanks

Folks of Liquidsoap

Monitoring stack is mostly inspired by https://github.com/stefanprodan/dockprom

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