You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Marcel Rupp 2b63addab9 logging gets imported already 7 months ago
.gitignore Fixed broken rewrite 1 year ago
README.md fix README.md 2 years ago
config.sample.yml Rewritten to Python Flask 2 years ago
requirements.txt new requirements.txt 7 months ago
server.py logging gets imported already 7 months ago

README.md

NGINX RTMP Auth Server

This is a small flask app that provides the neccesary routes for nginx to bo able to rewrite RTMP stream keys.

You can view the NGINX-RTMP Module here

Setup

  1. Setup virtualenv

    git clone https://git.comfix.cc/comfix/rtmp-auth-server
    cd ./rtmp-auth-server
    virtualenv ./venv
    source venv/bin/activate
    pip install -r requirements.txt
    
  2. Tell NGINX to use the rtmp-auth-server

    application live {
        /* ... */
        
        notify_method post;
        on_publish http://localhost:3196/on_publish;
        on_publish_done http://localhost:3196/on_publish_done;
        on_play http://localhost:3196/on_play;
        
        /* ... */
    }
    
  3. Add stream keys
    Copy the config.sample.yml to config.yml

    keys:
        superstreamer: eafhg46ef4g8er4g6e1ge8r1g47e9g1
    

Start up

/path/to/project/venv/bin/python /path/to/project/server.py

Basic functionality

HTTP Resonses:

  • 200: authenticated
  • 302: authenticated, stream will be rewritten to human readable name
  • 400: unknown stream key, show error in streaming software