Our very personal web radio.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
samples
webapp
.gitignore
.on-save.json
Caddyfile
LICENSE
README.md
Vagrantfile
bootstrap.sh

README.md

sch.am radio

Our very personal web radio.

Overview

sch.am radio can be broken down into 3 main components.

1. Stream server

A local RTMP server that will accept incoming media data and a public HTTP server that will broadcast our audio stream as MPEG-DASH or HLS.

  • MPEG-DASH stream: http://sch.am:8080/dash/stream.mpd
  • HLS stream: http://sch.am:8080/hls/stream.m3u8

To make the stream private we will use a randomly generated token that will be part of the stream URL, but we'll get to that later.

2. Web app

A web front-end with an integrated player that allows us to login and manage our music playlist in real time.

3. Live transcoder

The glue between the web app and the stream server that is running in the background. It's a script that makes sure the live stream reflects the changes that happen on the web interface (e.g., someone adds a song to the playlist).

Install

Since we don't want to mess things up, all work will be done in an isolated environment.
I've picked Vagrant for local development and LXC for deployment on our server.

Vagrant

  • Clone this repository.
git clone https://github.com/younishd/sch.am.git && cd sch.am
  • Fire up vagrant.
vagrant up

Now is probably a good time to grab lunch or dinner.

  • Update the web app inside the box as you develop stuff.
vagrant ssh -c 'sudo -iu sylvain bash -c "rm -rf sch.am/webapp && cp -rf /vagrant/webapp sch.am/"'

LXC

  • Create a fresh container and start it.
lxc-create -n radio -t download -- -d ubuntu -r xenial -a amd64 && lxc-start -n radio
  • Run the installation script inside the container.
lxc-attach -n radio -- bash -c 'apt-get update && apt-get -y dist-upgrade && apt-get -y install curl ca-certificates && curl https://raw.githubusercontent.com/younishd/sch.am/master/bootstrap.sh | bash'

Now is probably a good time to grab lunch or dinner.

License

MIT