brook

A minimal self-hostable streaming setup. ## Setup `brook` is a modular project, meaning that many different components come together to provide a simple and relatively 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 * `index.html` - static html file with js for a dash player and xmpp web chat * `brook-metrics` - the only custom server-side program to track viewer metrics * `prosody` - An XMPP server to back the chat room ## 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`](./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. ```nix imports = [ /path/to/brook/nix ]; ``` After that you can use the various `brook` submodules to configure your streaming setup. ```nix 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"; }; }; ```