aboutsummaryrefslogtreecommitdiffstats

brook

A minimal self-hostable streaming setup.

Setup

brook is a modular project, meaning that many different components come together to provide a lightweight streaming setup. Following is a quick overview of components.

  • ffmpeg - running an rtmp server, and converting video to dash output format
  • nginx - serves the dash directory
  • prosody - An XMPP server to back the chat room
  • brook-web - a simple static HTML front-end, supporting dash.js video playback, and an XMPP web chat via converse.js
  • brook-metrics - a server-side service to track viewer metrics

Configuration

I'm running my brook instance on NixOS, and as such a lot of the configuration is Nix specific. For other linux distributions, or to consider a reference implementation for other systems, check the common directory.

NixOS

If you want to use XMPP chats, you need to configure prosody yourself - brook will only setup the anonymous user virtualhost to be used by the brook-web chat.

Get started by importing the module.

imports = [
  /path/to/brook/nix
];

After that you can use the various brook submodules to configure your streaming setup.

services.brook = {
  nginx = {
    enable = true;
    hostAddr = "stream.spacekookie.de";
    acmeHost = "spacekookie.de";
  };

  prosody = {
    enable = true;
    certRoot = "/var/lib/acme/spacekookie.de";
  };

  dash = {
    enable = true;
    name = "kookie.tv";
  };
};