Open lwilletts opened 7 years ago
This is easily accomplished with on_publish and on_play directives. For an exmaple, see:
https://github.com/Fenrirthviti/stream-site/blob/master/lib/streamauth.php
and
https://github.com/Fenrirthviti/stream-site/blob/master/src/nginx/conf.d/rtmp.conf#L16-L19
@wildefyr, Fenrirthviti is exactly right. This would be done with on_publish. @benwilber has a good writeup on his blog of how this can be achieved via django, however the same can easily be done in php or any other language you may be comfortable with: https://benwilber.github.io/streamboat.tv/nginx/rtmp/streaming/2016/10/22/implementing-stream-keys-with-nginx-rtmp-and-django.html
Thanks all for the links. I was hoping for a simpler solution using just nginx itself rather than installing a web framework or language (don't have the greatest experience with them), but I am sure I will figure something out.
Can you not restrict by IP address?
On 15/02/2017, at 5:46 AM, Laurence Willetts notifications@github.com<mailto:notifications@github.com> wrote:
Thanks all for the links. I was hoping for a simpler solution using just nginx itself rather than installing a web framework or language (don't have the greatest experience with them), but I am sure I will figure something out.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/sergey-dryabzhinsky/nginx-rtmp-module/issues/218#issuecomment-279763565, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACsxESqwwXUm75l_ITtOse3ImbsYfHj-ks5rcdpWgaJpZM4L-p0j.
@chriswiggins Probably not a maintenance free idea as I am with provider who issues dynamic IPs everytime you reconnect to the network.
You can compile nginx with Lua and write simple Lua code, but still you will need place to show your users correct URL. You can do everything with Lua, but probably you still have some web application I think.
18.02.2017 19:03 "Laurence Willetts" notifications@github.com napisał(a):
@chriswiggins https://github.com/chriswiggins Probably not a maintenance free idea as I am with provider who issues dynamic IPs everytime you reconnect to the network.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sergey-dryabzhinsky/nginx-rtmp-module/issues/218#issuecomment-280863495, or mute the thread https://github.com/notifications/unsubscribe-auth/AAbp9v8FEnKW60amauPaxO4LBIroegUIks5rdzKBgaJpZM4L-p0j .
Been searching around for how protect my stream with a stream key or something similar and I can't find any examples on how to do so and even looking through the documentation has yielded any answers.
Here is what is in my nginx.conf so far:
Seems really bizarre there if there isn't a way to do this, else anyone could type in the correct URL and start streaming stuff to your server.