Answer the question
In order to leave comments, you need to log in
How to run a Restream server with multiple incoming streams on nginx?
Hello. There is a task to restream several streams to several services. How is it easier to implement?
The set of services for all users is the same.
Let's say user1 sends a stream to all 3 services with one [TOKEN_FOR_SERVICE] set, and user2 can broadcast to the same services with other tokens. Well, of course, so that these flows do not intersect. And it is desirable that these tokens could be substituted from some sql database.
I hope I correctly described the problem :) Tell me which way to dig.
Roughly speaking, we need the most simplified analogue of the restream service (I would use it, but it does not support the necessary services)
rtmp {
server {
listen 1935;
application live {
live on;
push rtmp://localhost/service1;
push rtmp://localhost/service2;
push rtmp://localhost/service3;
}
application service1 {
live on;
record off;
push rtmp://server_for_service_1/[TOKEN_FOR_SERVICE1]
}
application service2 {
live on;
record off;
push rtmp://server_for_service_2/[TOKEN_FOR_SERVICE2]
}
application service3 {
live on;
record off;
push rtmp://server_for_service_3/[TOKEN_FOR_SERVICE3]
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question