forked from rmoriz/bbox-receiver
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update for 2.2.0 of irl-srt-server
- Loading branch information
Showing
9 changed files
with
915 additions
and
929 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
build: | ||
docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag datagutt/belabox-receiver . | ||
|
||
push: | ||
docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag datagutt/belabox-receiver . | ||
build: | ||
docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag datagutt/belabox-receiver . | ||
|
||
push: | ||
docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag datagutt/belabox-receiver . |
This file contains 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 |
---|---|---|
@@ -1,34 +1,46 @@ | ||
# belabox-receiver | ||
|
||
A reverse engineered and enhanced Dockerfile for datagutt/belabox-receiver. Has support for multiple streams with per-stream authentication. | ||
|
||
Work in progress. A few streamers i know are personally using this image for their Twitch streams but I can't guarantee anything. | ||
|
||
**WARNING: This is not an official Belabox project. Please don't spam rationalirl about it!** | ||
|
||
We using the following great open-source projects: | ||
- srt-new from https://github.com/IRLServer/srt-new | ||
- srtla_rec from https://github.com/IRLServer/srtla/tree/irltk-fork | ||
- irl-srt-server (srt-live-server fork) from https://github.com/IRLServer/irl-srt-server | ||
|
||
## Manual | ||
It requires the following ports to be published: | ||
|
||
5000:5000/udp | ||
8181/8181/tcp | ||
8282/8282/udp | ||
3000/3000/tcp | ||
|
||
Modify everything in bold below, then start with: | ||
|
||
docker run -d --name belabox-receiver -p 5000:5000/udp -p 8181:8181/tcp -p 8282:8282/udp -p 3000:3000/tcp datagutt/belabox-receiver:latest | ||
|
||
Configure SRT receiver and SRT port within belabox to point to the docker container's IP address (or a port-forward on your router). | ||
Within Belabox, set "live/stream/belabox?srtauth=belabox" as SRT streamid. | ||
|
||
To retrieve the SRT-Stream (via OBS, VLC etc.), open the following URL: | ||
srt://your-public-container-ip:8282/?streamid=play/stream/belabox?srtauth=belabox | ||
|
||
Private Statistics-URL (will leak all live stream keys): http://your-public-container-ip:8181/stats | ||
|
||
Public Statistics-URL (preferreable): http://your-public-container-ip:3000/stats?streamer=belabox&key=belabox | ||
# belabox-receiver | ||
|
||
SRTLA Belabox receiver with support for multiple streams and per-stream authentication. | ||
|
||
Work in progress. A few streamers i know are personally using this image for their Twitch streams but I can't guarantee anything. | ||
|
||
**WARNING: This is not an official Belabox project. Please don't spam rationalirl about it!** | ||
|
||
We using the following great open-source projects: | ||
- srt-new from https://github.com/IRLServer/srt-new | ||
- srtla_rec from https://github.com/IRLServer/srtla/tree/irltk-fork | ||
- irl-srt-server (srt-live-server fork) from https://github.com/IRLServer/irl-srt-server | ||
|
||
## Manual | ||
It requires the following ports to be published: | ||
|
||
5000:5000/udp | ||
8181/8181/tcp | ||
8282/8282/udp | ||
3000/3000/tcp | ||
|
||
Create a config.json file containing: | ||
```json | ||
{ | ||
"auth": [ | ||
{ | ||
"user": "belabox", | ||
"key": "belabox" | ||
} | ||
] | ||
} | ||
`` | ||
|
||
Modify everything in bold below, then start with: | ||
|
||
docker run -d --name belabox-receiver -p 5000:5000/udp -p 8181:8181/tcp -p 8282:8282/udp -p 3000:3000/tcp -v ./config.json:/app/config.json datagutt/belabox-receiver:latest | ||
|
||
Configure SRT receiver and SRT port within belabox to point to the docker container's IP address (or a port-forward on your router). | ||
Within Belabox, set "live/stream/belabox?srtauth=belabox" as SRT streamid. | ||
|
||
To retrieve the SRT-Stream (via OBS, VLC etc.), open the following URL: | ||
srt://your-public-container-ip:8282/?streamid=play/stream/belabox?srtauth=belabox | ||
|
||
Statistics-URL: http://your-public-container-ip:8181/stats?publisher=live/stream/belabox?srtauth=belabox | ||
|
||
Legacy Statistics-URL: http://your-public-container-ip:3000/stats?streamer=belabox&key=belabox |
This file contains 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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"auth": [ | ||
{ | ||
"user": "belabox", | ||
"key": "belabox" | ||
} | ||
] | ||
} | ||
{ | ||
"auth": [ | ||
{ | ||
"user": "belabox", | ||
"key": "belabox" | ||
} | ||
] | ||
} |
This file contains 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 |
---|---|---|
@@ -1,22 +1,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
### prefix-log script ##################################################### | ||
# This script prefixes all output lines with the $SUPERVISOR_PROCESS_NAME | ||
# It is borrowed from https://serverfault.com/a/946271 | ||
########################################################################### | ||
|
||
# setup fd-3 to point to the original stdout | ||
exec 3>&1 | ||
# setup fd-4 to point to the original stderr | ||
exec 4>&2 | ||
|
||
# get the prefix from SUPERVISOR_PROCESS_NAME environement variable | ||
printf -v PREFIX "%-25.25s" ${SUPERVISOR_PROCESS_NAME} | ||
|
||
# reassign stdout and stderr to a preprocessed and redirected to the original stdout/stderr (3 and 4) we have create eralier | ||
exec 1> >(perl -ne '$| = 1; print "'"${PREFIX}"' | $_"' >&3) | ||
exec 2> >(perl -ne '$| = 1; print "'"${PREFIX}"' | $_"' >&4) | ||
|
||
# from here on everthing that outputs to stdout/stderr will be go through the perl script | ||
|
||
exec "$@" | ||
#!/usr/bin/env bash | ||
|
||
### prefix-log script ##################################################### | ||
# This script prefixes all output lines with the $SUPERVISOR_PROCESS_NAME | ||
# It is borrowed from https://serverfault.com/a/946271 | ||
########################################################################### | ||
|
||
# setup fd-3 to point to the original stdout | ||
exec 3>&1 | ||
# setup fd-4 to point to the original stderr | ||
exec 4>&2 | ||
|
||
# get the prefix from SUPERVISOR_PROCESS_NAME environement variable | ||
printf -v PREFIX "%-25.25s" ${SUPERVISOR_PROCESS_NAME} | ||
|
||
# reassign stdout and stderr to a preprocessed and redirected to the original stdout/stderr (3 and 4) we have create eralier | ||
exec 1> >(perl -ne '$| = 1; print "'"${PREFIX}"' | $_"' >&3) | ||
exec 2> >(perl -ne '$| = 1; print "'"${PREFIX}"' | $_"' >&4) | ||
|
||
# from here on everthing that outputs to stdout/stderr will be go through the perl script | ||
|
||
exec "$@" |
This file contains 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 |
---|---|---|
@@ -1,57 +1,57 @@ | ||
[supervisord] | ||
logfile=/var/log/supervisord.log | ||
logfile_maxbytes=10MB | ||
logfile_backups=3 | ||
loglevel=error | ||
pidfile=/var/run/supervisord.pid | ||
nodaemon=true | ||
minfds=1024 | ||
minprocs=200 | ||
user=root | ||
childlogdir=/var/log/ | ||
[supervisorctl] | ||
serverurl=unix:///tmp/supervisor.sock | ||
[program:sls-live-server] | ||
priority=50 | ||
autostart=true | ||
autorestart=unexpected | ||
redirect_stderr=true | ||
user=root | ||
stdout_events_enabled=true | ||
stderr_events_enabled=true | ||
stdout_logfile=/dev/stdout | ||
stdout_logfile_maxbytes=0 | ||
stderr_logfile=/dev/stderr | ||
stderr_logfile_maxbytes=0 | ||
command=/usr/local/bin/srt_server -c /etc/sls/sls.conf | ||
[program:srtla_rec] | ||
priority=150 | ||
autostart=true | ||
autorestart=unexpected | ||
redirect_stderr=true | ||
user=nobody | ||
stdout_events_enabled=true | ||
stderr_events_enabled=true | ||
stdout_logfile=/dev/stdout | ||
stdout_logfile_maxbytes=0 | ||
stderr_logfile=/dev/stderr | ||
stderr_logfile_maxbytes=0 | ||
command=/bin/sh -c "sleep 3 && /usr/local/bin/srtla_rec --srtla_port=5000 --srt_hostname=localhost --srt_port=8282 --verbose" | ||
[program:server] | ||
priority=200 | ||
autostart=true | ||
autorestart=unexpected | ||
redirect_stderr=true | ||
user=root | ||
stdout_events_enabled=true | ||
stderr_events_enabled=true | ||
stdout_logfile=/dev/stdout | ||
stdout_logfile_maxbytes=0 | ||
stderr_logfile=/dev/stderr | ||
stderr_logfile_maxbytes=0 | ||
directory=/app | ||
command=npm start | ||
[supervisord] | ||
logfile=/var/log/supervisord.log | ||
logfile_maxbytes=10MB | ||
logfile_backups=3 | ||
loglevel=error | ||
pidfile=/var/run/supervisord.pid | ||
nodaemon=true | ||
minfds=1024 | ||
minprocs=200 | ||
user=root | ||
childlogdir=/var/log/ | ||
|
||
[supervisorctl] | ||
serverurl=unix:///tmp/supervisor.sock | ||
|
||
[program:sls-live-server] | ||
priority=50 | ||
autostart=true | ||
autorestart=unexpected | ||
redirect_stderr=true | ||
user=root | ||
stdout_events_enabled=true | ||
stderr_events_enabled=true | ||
stdout_logfile=/dev/stdout | ||
stdout_logfile_maxbytes=0 | ||
stderr_logfile=/dev/stderr | ||
stderr_logfile_maxbytes=0 | ||
command=/usr/local/bin/srt_server -c /etc/sls/sls.conf | ||
|
||
[program:srtla_rec] | ||
priority=150 | ||
autostart=true | ||
autorestart=unexpected | ||
redirect_stderr=true | ||
user=nobody | ||
stdout_events_enabled=true | ||
stderr_events_enabled=true | ||
stdout_logfile=/dev/stdout | ||
stdout_logfile_maxbytes=0 | ||
stderr_logfile=/dev/stderr | ||
stderr_logfile_maxbytes=0 | ||
command=/bin/sh -c "sleep 3 && /usr/local/bin/srtla_rec --srtla_port=5000 --srt_hostname=localhost --srt_port=8282 --verbose" | ||
|
||
[program:server] | ||
priority=200 | ||
autostart=true | ||
autorestart=unexpected | ||
redirect_stderr=true | ||
user=root | ||
stdout_events_enabled=true | ||
stderr_events_enabled=true | ||
stdout_logfile=/dev/stdout | ||
stdout_logfile_maxbytes=0 | ||
stderr_logfile=/dev/stderr | ||
stderr_logfile_maxbytes=0 | ||
directory=/app | ||
command=npm start |
This file contains 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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
#!/bin/bash | ||
|
||
[ ! -f $PWD/config.json ] && echo "config.json missing! (see config.json.example)" && exit 1 | ||
|
||
docker build . -t belabox-receiver | ||
docker run --rm -it --name belabox-receiver \ | ||
-p 5000:5000/udp \ | ||
-p 8181:8181/tcp \ | ||
-p 8282:8282/udp \ | ||
-p 3000:3000/tcp \ | ||
-v $PWD/config.json:/app/config.json belabox-receiver | ||
|
||
# SLS stats page: | ||
# http://localhost:8181/stats | ||
# | ||
# Belabox | ||
# host: <ip> | ||
# port: 5000 | ||
# stream-id: live/stream/belabox | ||
# | ||
# OBS MediaSource: | ||
# srt://<ip>:8282/?streamid=play/stream/belabox | ||
# | ||
#!/bin/bash | ||
|
||
[ ! -f $PWD/config.json ] && echo "config.json missing! (see config.json.example)" && exit 1 | ||
|
||
docker build . -t belabox-receiver | ||
docker run --rm -it --name belabox-receiver \ | ||
-p 5000:5000/udp \ | ||
-p 8181:8181/tcp \ | ||
-p 8282:8282/udp \ | ||
-p 3000:3000/tcp \ | ||
-v $PWD/config.json:/app/config.json belabox-receiver | ||
|
||
# SLS stats page: | ||
# http://localhost:8181/stats | ||
# | ||
# Belabox | ||
# host: <ip> | ||
# port: 5000 | ||
# stream-id: live/stream/belabox | ||
# | ||
# OBS MediaSource: | ||
# srt://<ip>:8282/?streamid=play/stream/belabox | ||
# |
Oops, something went wrong.