Wowza Community

.stream file as http url for web player

Hello.

As far as I know, .stream files contain rtsp-path to the video, then we can tell this file to wowza media server, for example (flowplayer):

clip: {
      live: true,
      url: '5.stream',
      provider: 'rtmp',
    },
plugins: {
      rtmp: {
        url: "/scripts/flowplayer/flowplayer.rtmp-3.2.13.swf",
        netConnectionUrl: 'rtmp://host1/rtplive',
      },

So complete path to the clip will be rtmp://host1/rtplive/5.stream

5.stream contains this:

rtsp://some_cam_path

So wowza reads content of the file and recieves stream described there. But what if we will tell wowza not just a file name from content directory, but complete http url to some destination which also contains just rtsp-path (just text), it could be even the same 5.stream file - this will give us great opportunity to completely hide real video source from user (security reason and requirement in my project). Particulary, such url will be a path to some php/jsp/what_ever page which will send back text rtsp-path after making some logic (user authorization/session vars/user cookies), for example it will be http://host1/get_cam_by_user_id.php:

<?php
  if ($_SESSION['user_id'] == 1) {
    echo "rtsp://cam1"
  }
  else {
    echo "rtsp://cam0"
  }
?>

flowplayer’s code will be:

clip: {
      live: true,
      url: '[B]http://host1/get_cam_by_user_id.php[/B]',
      provider: 'rtmp',
    },
plugins: {
      rtmp: {
        url: "/scripts/flowplayer/flowplayer.rtmp-3.2.13.swf",
        netConnectionUrl: 'rtmp://host1/rtplive',
      },

Is there any way to make wowza server work like I describe?

Thaks in advance.

I think the best course of action here would be to modify the player such that it does this http query prior to stream resolution. This way the player would get the stream url internally and then play it back. For JWPlayer, you could try utilizing their existing api. However, in doing this, you won’t be really adding much more security other than a thin layer of obfuscation.

You may wish to hire a consultant to help you with this implementation:

find a consultant

Salvadore

… However, in doing this, you won’t be really adding much more security other than a thin layer of obfuscation.

Yes. This is not what I want. I want to make wowza send http query to the host configured to allow queries only from wowza server. There it will recieve rtsp-url based on user id from query. So, user will never know real video source.

I have 10 cams, some users with their own access levels, web-site with Flowplayer/JWPlayer. Some users have access to all cams, others to just few of them. If some user will somehow know the address of restricted cam (see it on his friend’s computer) then he can just modify web page code in debugger to view the video from this cam. This is bad. And I can’t make users enter their login/password each time they start watching another cam, because this is not user friendly.

Maybe there is some possibility to make such functionality by implementing some custom module in IDE. if so, can you direct me to the right path?