D
D
Dmitry .2021-02-16 05:19:40
Nginx
Dmitry ., 2021-02-16 05:19:40

How to set up NGINX for live streaming?

I'm currently researching live streaming and building a small live streaming platform. I'm using Node.js with the node-media-server package. And so, in order to start the stream, we specify in OBS ip and a secret key to connect. To get an image from this broadcast, you must also specify this secret key on the client, which is not allowed.
How can I configure nginx so that on the client, for example, there is a link to a stream like this - //mysite.com/stream/USER2345, the request went to nginx - it proxyed to my node.js server - nodejs received the video stream - sent it back to nginx - nginx sent to the client.
I understand that I'm confused. But the idea is that the client doesn't have access to the streamer's key.
Hope for help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
semen-pro, 2021-02-26
@semen-pro

You create several applications on nginx, with one you receive a stream by key and immediately push to the second, and it already has a different key. You forbid the second to receive from somewhere else, except for the localhost. In the first, you prescribe filtering by a secret key. The client you take away from the second stream.
This is the foundation. And then you can hang transcoding on it and anything. At least impose graphics on the fly.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question