| 1 | = Broadcast Admin page = |
| 2 | |
| 3 | The May First/People Link live code lives on dee.mayfirst.org and is published via [https://gitlab.com/jamie/icecream gitlab]. |
| 4 | |
| 5 | It has two components: |
| 6 | |
| 7 | * A client component that users the [https://developer.mozilla.org/en-US/docs/Web/API/MediaStream_Recording_API/Using_the_MediaStream_Recording_API mediarecorder API] to capture and send a video stream. |
| 8 | * A nodejs component to pipe the stream to ffmpeg, which sends it to icecast |
| 9 | |
| 10 | The code is installed on dee in /home/icream and the service is maintained via /etc/systemd/system/icecream.service. |
| 11 | |
| 12 | == Icecast == |
| 13 | |
| 14 | Our code is currently streaming to b.stream.mayfirst.org (sankara). |
| 15 | |
| 16 | Iceast is configured using [http://icecast.org/docs/icecast-2.4.1/auth.html the url method of authentication] plus wildcard mount points. |
| 17 | |
| 18 | In other words, we have the following mount point defined: |
| 19 | |
| 20 | {{{ |
| 21 | <mount> |
| 22 | <mount-name>/s-*</mount-name> |
| 23 | <public>1</public> |
| 24 | <authentication type="url"> |
| 25 | <option name="stream_auth" value="http://localhost:3000"/> |
| 26 | </authentication> |
| 27 | </mount> |
| 28 | }}} |
| 29 | |
| 30 | The s-* means it will match on any stream starting with s-. |
| 31 | |
| 32 | The authentication part says: whenever someone tries to authenticate this stream, send the username and password (via POST) to the given URL. |
| 33 | |
| 34 | This setting is complemented with a nodejs web app (published via `git://git.mayfirst.org/mfpl/icecast-stream-auth`) that is running on sankara in `/home/icecast-stream-auth` with the service managed via /etc/systemd/system/icecast-stream-auth. This web app simply passes the username and password on to our [wiki:login-service login service] and returns an appropriate answer to icecast. |