TUMs lecture streaming service, currently serving up to 100 courses every semester with up to 2000 active students.
Features include:
┌──────────────────────┐
┌───────────► Campus Management │
│ │ System (CAMPUSOnline)│
┌──────────┐ │Enrollments└──────────────────────┘
│Identity │ │
│Management│ │ - Users,
│ - SAML ◄─┐ │ - Courses,
│ - LDAP │ │ │ - Streams, ... ┌────────────────────┐
└──────────┘ │ │ ┌──────────┐ │Lecture Hall │
Users │ │ ┌──────────►│ Database │ │ - Streaming Device │
│ │ │ └──────────┘ ┌────┤ - Camera │
│ │ │ │ │ - Slides (HDMI) │
┌──┴─┴──┴────┐ Task Distribution (gRPC) RTSP│ │ - Microphone │
┌────────────► TUM-Live │◄─────────────────────────────────────┐ pull│ └────────────────────┘
│Website └────────────┘ │ │
│(HTTP) ▼ │
│ ┌─────────────▼─────┬─┐
│ ┌────────────────┐ │TUM-Live-Worker #1 │ │ Streaming,
┌───────────┴──┐ │ Shared Storage │ ├───────────────────┘ │ Converting,
│Student/Viewer│ │ S3, Ceph, etc. │ │ TUM-Live-Worker #n │ Transcribing, ...
└───────────┬──┘ └─▲────▲─────────┘ └──────┬──▲────▲──────┘
│ Serve Vod│ │HLS Files Push VoD│ │ │RTMP
│ Content│ │ ┌───────────┐ (HTTP)│ │ │push
│ │ └─────────┤VoD Service◄───────┘ │ │ ┌──────────────┐
│Videos ┌──────────────────┬─┴┐ └───────────┘ │ └───────┤Selfstreamer │
│(HLS, HTTP) │ TUM-Live Edge #1 │ │ │ │ - OBS, │
└────────────►──────────────────┘ ├────────────────────────────────────┘ │ - Zoom, ... │
│ TUM-Live Edge #n │ Proxy, Cache (HTTP) └──────────────┘
└─────────────────────┘
The easiest way of running and testing TUM-Live is by using the provided docker-compose file:
docker compose build && docker compose up
Be advised that the compose file is not indented for production use as it runs everything on one machine.
If you want to get TUM-Live running natively follow these steps:
docker run --detach \
--name mariadb-tumlive \
--env MARIADB_USER=root \
--env MARIADB_ROOT_PASSWORD=example \
--restart always \
-p 3306:3306 \
--volume "$(pwd)"/docs/static/tum-live-starter.sql:/init.sql \
mariadb:latest --init-file /init.sql
tumlive
using this script.admin
, prof1
, prof2
, studi1
, studi2
and studi3
with the password password
.npm i
in the ./web
directory to install the required node modulesgo get ./...
to install the required go modulesconfig.yaml
file over to $HOME/.TUM-Live/config.yaml
and make your changes there to prevent accidentally committing them../cmd/tumlive/tumlive.go
http://localhost:8081
in your browser of choice and confirm that the page has loaded without any problems.npm run build-dev
in ./web
(and keep it running).pip
installed on your machine, you can install them with the following command
go install honnef.co/go/tools/cmd/staticcheck@latest && pip install pre-commit
pre-commit install
. It will install the pre-commit hook scripts for this repository.Now the hook scripts will be triggered for every new commit, which should improve overall code quality.
You can also run the pre-commit hooks manually for all files by executing pre-commit run --all-files
. If you get the error message The unauthenticated git protocol on port 9418 is no longer supported.
, try running the following command
git config --global url."https://github.com/".insteadOf git://github.com/
See this blogpost for more information on this error message.
The following scripts are provided:
npm run lint
: Runs eslint
and prettier
on the code to find stylistic issues.npm run lint-fix
: Same as above but also fixes the found issues.If you use GoLand, you can use follow this guide to integrate
prettier. There is also a guide for integrating eslint
. For both configs are provided that should be automatically detected. If you set everything up correctly,
prettier
and eslint
should run everytime you save. Additionally, GoLands formatter will now respect the prettier
style rules.
To create database models and their corresponding daos there is a helper script that can be used to automate this task:
go run cmd/modelGen/modelGen.go <NameOfYourModel(UpperCamelCase)>
An exemplary configuration can be found in /branding
.
For customization mount a directory containing the files in the docker container. Make sure to
specify the location of the directory in the container in the configuration file as paths > branding
.
See /config.yaml
for an exemplary configuration.
If intended, put a branding.yaml
file at the same location as config.yaml
.