This is my Nginx RTMP config file
worker_processes auto;
rtmp_auto_push on;
events {}
rtmp {
server {
listen 1935;
listen [::]:1935 ipv6only=on;
application live {
live on;
record off;
push rtmp://fra05.contribute.live-video.net/app/KEY;
}
}
}
I use OBS studio to push stream
How to check OBS studio stream key in the Nginx file to be the same?
rtmp {
server {
listen 1935;
application stream {
live on;
on_publish http://yourdomain.com/rtmp_auth.php;
}
}
}
The rtmp module will send a "form" POST to th url you give it, your streamkey from, for example OBS, will be in the $_POST['name'] variable. you can check it against a file/database with the script then return a 201 (all ok, publishing is granted) or a 404 (not allowed to publish)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.