SoraBytes/rtmp-auth: NGINX RTMP Auth scripts based on PHP

Custom NGINX RTMP module auth scripts

Requires MySQL/MariaDB, PHP, NGINX RTMP/FLV Module

  1. Setup a webserver to listen on 127.0.0.1
  2. Edit NGINX Configuration RTMP section to contain:

on_publish http://127.0.0.1/auth.php;

on_publish_done http://127.0.0.1/deauth.php;

on_play http://127.0.0.1/play.php;

  1. Import MySQL/MariaDB SQL file
  2. Edit the PHP Scripts to point to the proper Database information
  3. Edit the SQL Database to contain information for a valid key(s) & username(s).

{IP} is your servers IP/Domain

{app} is the application in the RTMP section

{Key} is the live stream key from the MySQL Database

OBS Stream Settings
Server: rtmp://{IP}/{app}
Stream Key: {Key}

Don’t check “Use Authenication”

The database should use all lower-case information and keys

Read more here: Source link