2024-02-25 11:24:42 +01:00
|
|
|
listen 1935;
|
|
|
|
max_connections 1000;
|
|
|
|
srs_log_tank console;
|
|
|
|
pid ./objs/srs.pid;
|
|
|
|
utc_time on;
|
|
|
|
inotify_auto_reload on;
|
|
|
|
daemon off;
|
|
|
|
|
|
|
|
http_api {
|
|
|
|
enabled on;
|
|
|
|
listen 8888;
|
|
|
|
}
|
|
|
|
|
|
|
|
srt_server {
|
|
|
|
enabled on;
|
|
|
|
listen 8889;
|
|
|
|
}
|
|
|
|
|
|
|
|
vhost __defaultVhost__ {
|
|
|
|
security {
|
|
|
|
enabled on;
|
|
|
|
allow publish all;
|
|
|
|
allow play all;
|
|
|
|
}
|
|
|
|
http_hooks {
|
|
|
|
enabled on;
|
implement active srs sync and celery
reworks the entire logic how active streams are being tracked.
instead of keeping a counter by listening only to srs callback
hooks, portier will now actively scrape the http api of known
srs nodes to retrieve information about all currently existing
streams on a srs node. this prevents portier from being wrong
about active stream counts due to drift, and allows us to show
more information about stream data to users in the future,
as the srs api will also expose information about used codecs,
stream resolution and data rates as seen by srs itself.
to implement this, the previous remains of celery have been
made active again, and it is now required to run exactly one
celery beat instance and one or more celery workers beside
portier itself. these will make sure that every 5 seconds all srs
nodes are actively being scraped, on top of the scrape that is
triggered by every srs callback hook.
this keeps the data always superfresh.
the celery beat function allows us to implement cron-based
automation for many other functions (restream, pull, etc) in
the future as well, so it's okay to pull in something more heavy
here rather than just using a system cron and executing a
custom management command all the time.
2024-02-29 18:33:52 +01:00
|
|
|
on_publish http://app/config/srs/callback;
|
|
|
|
on_unpublish http://app/config/srs/callback;
|
2024-02-25 11:24:42 +01:00
|
|
|
}
|
|
|
|
}
|