• Stars
    star
    185
  • Rank 208,271 (Top 5 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 4 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

TUMs lecture streaming service.

TUM-Live

volkswagen status Better Uptime Badge

TUMs lecture streaming service, currently serving up to 100 courses every semester with up to 2000 active students.

Features include:

  • Automatic lecture scheduling and access management coupled with CAMPUSOnline
  • Livestreaming from lecture halls
    • Support for Extron SMPs and automatic backup recordings on them.
    • Support for preset management on ip cameras
    • Automatic recordings and video on demand with granular access control.
  • Self-streaming
    • Stream ingest from Home using OBS or similar software.
  • Live chat
  • Statistics (live and VoD view count)
  • Self-service dashboard for lecturers
    • schedule streams, manage access...

Architecture

                                          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ   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)                       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Getting Started

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:

Setup Database

  • Follow the steps here to install mariadb via docker.
  • Then run the docker container using the following command.
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
  • Alternatively, install mariadb on its own.
    • Create the database tumlive using this script.
    • Or: Use JetBrains DataGrip to open the database and then run the script there to automatically set up a demo database.
  • The database contains the users admin, prof1, prof2, studi1, studi2 and studi3 with the password password.

Install go

  • Install go >=1.18 by following the steps here
  • Preferably use JetBrains GoLand and open this project as it simplifies this entire process
  • Go to File -> Settings -> Go -> Go Modules and enable go modules integration.
  • Run npm i in the ./web directory to install the required node modules
  • Run go get ./... to install the required go modules
  • If you want to customize the configuration (for example mariadb username and password), copy the config.yaml file over to $HOME/.TUM-Live/config.yaml and make your changes there to prevent accidentally committing them.
  • Start the app by building and running ./cmd/tumlive/tumlive.go
  • Head over to http://localhost:8081 in your browser of choice and confirm that the page has loaded without any problems.
  • To keep automatically rebuilding the frontend code during development, run the command npm run build-dev in ./web (and keep it running).
  • Voilร ! Happy coding! โœจ

Enable pre-commit hooks

  • Make sure you have staticcheck and pre-commit installed. If you have 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
  • Runpre-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.

Linting and formatting typescript files

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.

Add Database Models:

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)>

Customization

An exemplary configuration can be found in /branding.

logo, favicon, manifest.json

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.

title, description

If intended, put a branding.yaml file at the same location as config.yaml.

Credit & Licenses

More Repositories

1

Campus-Android

Development of the TUM Campus App for Android devices - for and from students at Technical University of Munich.
Kotlin
208
star
2

Campus-iOS

Development of the TUM Campus App for iOS devices - for and from students at Technical University of Munich.
Swift
106
star
3

NavigaTUM

Navigating around TUM with excellence โ€“ A website and API to search for rooms, buildings and other places
Rust
43
star
4

CalendarProxy

Proxy for the TUM iCal export to remove clutter
Go
38
star
5

campus_flutter

Development of the cross-platform TUM Campus App with Flutter - for and from students at Technical University of Munich.
Dart
37
star
6

lecture-download

๐ŸŽ“ Download lecture recordings from streams.tum.de and lecturio
JavaScript
24
star
7

gocast-voice-service

Microservice that generates subtitles for TUM-Live
Python
17
star
8

Campus-Backend

New backend written in go with gRPC as an API interface
Go
15
star
9

Campus-UWP

A companion app for all UWP devices for the Technical University of Munich.
C#
11
star
10

gocast_mobile

Mobile client for gocast @ TUM developed in Flutter
Dart
9
star
11

meldeplattform

A simple website allowing anonymous reports about security issues, harassment, illegal activities, safety concerns, whistleblowing and whatnot. In use at TUM.
Go
6
star
12

VMP

An open-source lecture streaming processor stack
Objective-C
6
star
13

RBGreaterAgain

PHP
6
star
14

TUMenu

Nextjs static website for daily meals in some student places around Munich
TypeScript
4
star
15

Website

Public website for Apps @ TUM
HTML
4
star
16

Backend

Issue Tracker for the TCA Backend
3
star
17

TicketCheck

Kotlin
2
star
18

homebrew-brew

TUM Developers Homebrew Tap
Ruby
1
star