You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use on_publish to verify the stream key. If I forgot to provide something, go right ahead and ask.
I can curl from the host (of the server) and it works fine. deny publish 10.49.197.1; is there so I can allow all local IPs and block the router, only local traffic is allowed.
RTMP config in nginx.conf:
rtmp {
server {
listen1935;
chunk_size 4096;
allow publish 10.49.197.0/24;
deny publish 10.49.197.1;
deny publish all;
application live {
live on;
record off;
on_publish http://localhost:8080/verify;
# Twitch - Better Platform#push rtmp://live.twitch.tv/app/[REDACTED];# YouTube - Slower than Twitch#push rtmp://a.rtmp.youtube.com/live2/[REDACTED];
}
}
}
sites-enabled/localhost:
server {
listen 127.0.0.1:8080;
server_name localhost;
if ($request_method!~^(GET|HEAD)$) { return403; }
location/verify {
allow all;
expires off;
set$livepass0;
if ($arg_livekey = "[My Nginx Stream Key]") { set$livepass1; }
if ($livepass = 1) { return200; }
return401;
}
}
It took me probably an hour to track down, but after having a similar problem, it seems like you can't on_publish with a port. Adding a location / proxy_pass to the http { server } then passing to http://localhost/proxyed worked for me.
I am trying to use on_publish to verify the stream key. If I forgot to provide something, go right ahead and ask.
I can curl from the host (of the server) and it works fine.
deny publish 10.49.197.1;
is there so I can allow all local IPs and block the router, only local traffic is allowed.RTMP config in nginx.conf:
sites-enabled/localhost:
access.log:
10.49.197.54
is my PC's local IP, I am testing by broadcasting from OBS on my PC.error.log:
The text was updated successfully, but these errors were encountered: