-
Notifications
You must be signed in to change notification settings - Fork 61
Docs: add dev section and selfstream #1815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Mazi02
wants to merge
1
commit into
dev
Choose a base branch
from
docs/add-selfstream-page
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,101 @@ | ||||||
| --- | ||||||
| title: Selfstream | ||||||
| --- | ||||||
|
|
||||||
| # Selfstream | ||||||
|
|
||||||
| We first have to start all services, and then we can set up the stream. | ||||||
|
|
||||||
| There are two ways to run Selfstream-services: | ||||||
|
|
||||||
| ## Setting up the services: | ||||||
|
|
||||||
| ### 1. **Using Docker**: | ||||||
|
|
||||||
| This is the recommended way to run Selfstream, as it provides an isolated environment and simplifies the setup process. To run Selfstream using Docker, follow these steps: | ||||||
|
|
||||||
| ```bash | ||||||
| docker compose -f docker-compose-selfstream.yml up --build | ||||||
| ``` | ||||||
|
|
||||||
| Now you can follow the instructions in the [Starting the stream](#starting-the-stream) section to start your stream. | ||||||
|
|
||||||
| --- | ||||||
|
|
||||||
| ### 2. **Starting services locally**: | ||||||
|
|
||||||
| :::warning | ||||||
| Warning: This method doesn't insure that the services are running with the correct configuration, so it is recommended to see the logs after each service is started. | ||||||
| ::: | ||||||
|
|
||||||
| If you prefer to run the services locally, you can start each service individually. This method requires more setup and configuration, but it allows for more flexibility in development. To start the services locally, follow these steps: | ||||||
|
|
||||||
| :::info | ||||||
| You have to change the `externalAuthenticationURL` in the `ingest/mediamtx.yml` file by uncommenting the the line and changing the URL to `http://localhost:8081/api/selfstream/onPublish`. This is required for the `meidamtx` server to authenticate the stream correctly. | ||||||
| ::: | ||||||
|
|
||||||
| - Start the db and meilisearch first. We use hybrid approach to run db and meilisearch in docker. You can run the following command to start them: | ||||||
|
|
||||||
| ```bash | ||||||
| docker start meilisearch mariadb-tumlive | ||||||
| ``` | ||||||
|
|
||||||
| - Start the backend. run this command in the `root` | ||||||
|
|
||||||
| ```bash | ||||||
| go run ./cmd/tumlive | ||||||
| ``` | ||||||
|
|
||||||
| - Start the frontend: | ||||||
|
|
||||||
| ```bash | ||||||
| # in the web/ directory | ||||||
|
|
||||||
| npm install | ||||||
| npm run buil-dev | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| ``` | ||||||
|
|
||||||
| - Start the runner. Configure the path accordingly: You can set the `STORAGE_PATH` and `SEGMENT_PATH` environment variables to point to the correct locations if you don't want to use default ones: | ||||||
|
|
||||||
| ```bash | ||||||
| # in the root | ||||||
|
|
||||||
| STORAGE_PATH=/home/<path-to-cache-location>/storage/mass SEGMENT_PATH=/home/<path-to-cache-location>/dev/storage/live go run runner/cmd/runner/main.go | ||||||
| ``` | ||||||
|
|
||||||
| - Start the worker: | ||||||
|
|
||||||
| ```bash | ||||||
| # in the root | ||||||
|
|
||||||
| go run ./worker/edge | ||||||
| ``` | ||||||
| - Start the `meidamtx` server: | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| ```bash | ||||||
| # in the root | ||||||
|
|
||||||
| mediamtx ./ingest/mediamtx.yml | ||||||
| ``` | ||||||
|
|
||||||
| --- | ||||||
|
|
||||||
| ## Starting the stream | ||||||
|
|
||||||
| After setting up the services you can follow these instructions to start your stream. We recommend using OBS as it has been tested and also used to showcase here: | ||||||
|
|
||||||
| 1. Login to an admin account (`admin`, `prof1` or `prof2`). | ||||||
|
|
||||||
| In the admin section confirm that the runner is `active` | ||||||
|
|
||||||
| 2. In the admin section you can either create a new course or use one of the existing ones to create a new lecture. Just fill the required fields and click the create button. | ||||||
|
|
||||||
| 3. After creating the lecture you can click the `show keys` button to see the `URL` and `key`. Copy them into the streaming software of your choice. | ||||||
| 4. Change the `tum.ingest.live/` to `localhost/`. | ||||||
| 5. Start streaming, and you should see the stream in the admin section after a few seconds. You can also check the `meidamtx` logs to see if the stream is being ingested correctly. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "label": "Development", | ||
| "position": 5, | ||
| "link": { | ||
| "type": "generated-index", | ||
| "description": "Set up your development environment and learn how to contribute to the project." | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| title: Development | ||
| --- | ||
|
|
||
| # Development | ||
|
|
||
| This section provides information on how to set up the development environment and contribute to the project. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only works if you already set up these containers once. Please provide more information on how to set them up for the first time