nginx-rtmp – Secure your nginx-Server


Checkout: | |

You may also like...

19 Responses

  1. Sylvain Martens says:

    After debuging i found that these was sent to the auth.php

    [app] => live
    [flashver] => FMLE/3.0 (compatible; obs-studi
    [swfurl] => rtmp://
    [tcurl] => rtmp://
    [pageurl] =>
    [addr] =>
    [clientid] => 95
    [call] => publish
    [name] => myStreamPath
    [type] => live
    [user] => myUser
    [pass] => myPass

  2. Sylvain Martens says:

    Hi, how can i get the playpath from PHP, i want to allow only 1 user to stream to a specific playpath.

    • Christoffer says:

      How would you go about pairing a streamkey to a specific output?

      I don’t want to have users sending the rtmp://{username}/{streamkey}

      Instead I want it like twitch rtmp://{streamkey} -> to lets say{username}/play.m3u8

      I know how to authenticate; but then I have no clue to change where the output of the encoding will be.
      Unless you could return it with PHP?

      Thanks in advance

  3. Nguyen Viet Nam says:

    Hi, What URL for VOD video?
    I set up for Live Streaming, it’s ok. Now i want to set up for VOD, but i don’t know url to play. Plz help me!

  4. Chella says:

    i was set up nginx rtmp server fine,it works good, but i want protect my hls stream how can i do that please help me

  5. Chella says:

    hi i was set up nginx rtmp server well, its works hls and rtmp, but i want to protect my hls stream how can i protect that , i tried nginx secure links it was not work

  6. Martin says:


    Just before I get to in-depth doing this, do you know if it works the same with the HLS streams from nginx rtmp?

    ie. would rtmp://your.up/application/flv:streamkey?user=username&pass=userpassword

    Also work as

    • Martin says:

      From a days work I can confirm it does not work with HLS segments.

      I found to get HLS working, you need to recompile nginx with the auth_request module, you then need to enable auth on the HLS directory and pass this to the same PHP file. You then need to modify the php file severely to also look at the $_SERVER[“HTTP_X_ORIGINAL_URI”] variable to get the parameters, then do an additional verification step to make it pass authentication for the ts files because they’ll be in the same directory.

      My advise would be to not bother.

  7. j0nny says:

    –with-http_secure_link_module is not enough to use the nginx http secure links


  8. Miguel Granados says:

    Hi, it could be great to learn how to limit the viewers per application in Nginx-rtmp. I guess that there should be something like this to let the admin decide how much max viewers could an app support. Nginx-rtmp already have max_connections but it limits all the rtmp connections including publish or play.

  9. Med says:


    I have a question, can i authorize one user to watch only one channel at the same time . when he access to another channel ,the first one will be stopped dynamically.
    Please If you have any idea please share with us.

    • RobinJack0r says:

      I think you could probably write a php script for example, that is called on_play and would make the check if another connection of the user was already noted. But thats a bit out of my scope. You could maybe ask arut if he knows of an easier solution. (Check the nginx-rtmp google group)

  10. ali says:

    tnx m8 i m waiting for it….

  11. ali says:

    can u help me to setup nginx rtmp secure token from this page it got all setup.
    pls help tnx..