Results 1 to 9 of 9

Thread: Authentication while watching video

  1. #1

    Default Authentication while watching video


    Is there a way where when someone tries to watch a video(live/vod), they can be made to enter username/password to watch it?
    Can someone tell me if its possible or not and guide me to appropriate tutorial or something.


  2. #2


    Hi there,

    Please take a look at this example:
    How to do file-based authentication with RTMP client and credentials in querystring of the RTMP URL (ModuleOnConnectAuthenticate2)

    There is nothing built in that provides this functionality for HLS streams.

    You would need to develop a custom module. A good starting place would be:
    How to limit playback by IP address (ModuleOverridePlayRestrictIP)

    Alternatively, this guide provides other methods for encrypting HLS streams:
    How to secure Apple HLS streaming using DRM encryption



  3. #3


    I tried the file-based authentication but its not working.
    I configured the Modules and Properties.
    But I am able to connect to the server without authentication and watch it as well.

    Am I missing anything?

  4. #4


    I suggest removing the properties and testing the module with the defaults. So just enabling the module should work.

    This will mean you need to create a "connect.password" file in your /conf folder.

    Also, this module is not compatible with the Wowza Streaming Engine Incoming Security > RTMP Publishing > Require Password Authentication setting. If you use this module, the RTMP Publishing setting must be set to Open.


  5. #5


    Still doesn't work.
    I can still connect and view the stream without authentication.

  6. #6


    So I ran a few test with this module and it is working. Both for live and VOD.

    Can you describe the process for setting this module up and for connection the encoder and playback?


  7. #7


    1. I created a new app - auth
    2. I disable the incoming security. RTMP Publishing is Open.
    3. Added the module as given in the tutorial : moduleOnConnectAuthenticate
    4. Restarted the app.
    5. created a connect.password file in /conf. added a user1 pass1 in the file.
    6. restarted the server.
    7. On FME, i tried connecting to the /auth app without any authentication. It didn't connect. It connected when I passed the authentication in querystring. So this is fine.
    8. I am trying to watch the stream using JWPlayer. I use /auth/streamname as the path. but it doesn't work.

    What do I have to do to make it work?

  8. #8


    In JW Player, put it in the HTML container where the rtmp url is set. Add the querystring after the application part, not after the stream name. For example in JW Player 6 you would set the file: to:
    <title>JW Player 6</title>
    <script type="text/javascript" src="/jwplayer/jwplayer.js" ></script>
    <div id="player">Loading the player...</div>
    <script type="text/javascript">
       	sources: [{
                file: "rtmp://[wowza-address]:1935/live?user&pass1/"
                file: "http://[wowza-address]:1935/live?user&pass1/"

    Last edited by salvadore; 05-20-2015 at 05:47 AM.

  9. #9


    But then anyone can see the username-password and start streaming on to my server. Isn't it?
    I was looking for a solution where there is a login box pop-up when the video is requested and can be viewed after putting in correct details.
    And these login credentials were different from what I will be using to push the stream.

Similar Threads

  1. How many seconds user was watching video?
    By summer_soon in forum General Forum
    Replies: 5
    Last Post: 07-08-2014, 01:48 AM
  2. Transcoding while no one is watching?
    By karelboek in forum AddOn: Transcoder
    Replies: 1
    Last Post: 06-07-2013, 05:15 AM
  3. time watching video - vod app
    By Reinaldo Almeida in forum Server-side Modules and Code Samples Discussion
    Replies: 3
    Last Post: 01-20-2012, 01:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts