Results 1 to 5 of 5

Thread: Pull stream from live client (FMLE) only when a viewer is connected?

  1. #1
    Join Date
    Apr 2015
    Posts
    12

    Default Pull stream from live client (FMLE) only when a viewer is connected?

    I'm currently setting up a streaming service / website for nature webcams, where people can register and stream their birdbox webcams etc., and weighing up the options I have. Users will connect their webcams to my server over RTMP (or RTMPT if needed), using Adobe FMLE.

    Is it possible in this setup to get Wowza to only pull the stream from the connected FMLE client when a viewer begins to watch the stream through the website? The problem I can foresee is that I could have 50+ clients connected 24/7 with 400kbps streams, when only a few of those streams could be being watched on the website at any one time. Not only is it a lot of data coming in to my server, it would mean clients using up 4GB+ of their upload on a daily basis, which could obviously cause all sorts of problems depending on what kind of internet package they are on.

    Unreal Media Server has this exact feature - the client makes the connection to the server, but the server only then pulls live RTMP data when someone views the stream on the website. Problem is, Wowza is superior to UMS in pretty much every other way. It's a really annoying quandary which could make or break what I'm doing, so I'm really hoping there is a way to do this with Wowza!

  2. #2

    Default

    Hi,

    It's possible to stop ingesting a stream when no clients are viewing but it has some particular restrictions and limitations. You would need to ensure that each of your webcam sources are defined in a stream file, so you'll need the RTSP URI of the cameras. Then create a new application and manually edit the [install-path]/conf/[app-name]/Application.xml and change the <StreamType> value to rtp-live.

    You can then add the newly created stream files to "Startup Streams", to start up for this application.

    Once the app has been restarted if you then attempt to play one of the stream URLs then Wowza will initiate an RTSP connection to the camera and pull in the stream. The stream will remain active so long as a Flash client is connected. Once the last connection drops off then the connection to the RTSP source also drops.

    The obvious limitations are that you require RTSP in stream files as your source, so your use of an RTMP source would need to change. Also you really should only provide RTMP playback - HTTP based playback may work while the connection is up, but it won't instigate it, so HTTP streaming is not reliable in this setup.


    Paul
    Last edited by Paul_S; 08-05-2015 at 08:21 AM. Reason: typo

  3. #3
    Join Date
    Apr 2015
    Posts
    12

    Default

    Many thanks Paul, an extremely helpful response.

    My first stumbling block here is the RTMP / RTSP issue, many of my potential users are going to be already out there with analog birdbox webcams, using USB video>digital convertors and connecting with FMLE. In in this situation I think it's RTMP only? Some might go out and buy an analog > IP camera convertor, but still I'd be cutting out my main audience who won't be willing to do that. I take it there is no software solution to convert RTMP to RTSP on the client side?

    With the HTTP issue you raised, I take it that would then scupper HLS and HDS playback if I had to use RTMP only?

  4. #4

    Default

    Hi,

    I don't believe this will work with RTMP pull from FMLE as I believe that can only be used to push an RTMP stream? I'm not overly familiar with all of the features of FMLE though so there could be other ways to publish.

    HTTP streams may work while a connection is active but if a client requests an HTTP playback type when the stream is not connected then it will fail as it can't initiate the connection to the camera source. You would need a Flash client connected to the stream first to ensure the connections are up, and of course dedicating a Flash client to maintain connectivity negates the benefits of dropping links when no clients are connected. So I'd not recommend the rtp-live stream type for anything other than RTMP.


    Paul

  5. Default

    Paul, would it help if he used origin/edge configuration, where a user connects via HTTP streaming protocol to the edge, which then pulls the rtmp stream from origin which further dynamically pulls the RTSP stream from the source as you described?

Similar Threads

  1. How to configure stream shutdown time of edge when there are no client connected?
    By f.hernandez.b in forum Live Streaming and Encoders
    Replies: 2
    Last Post: 12-02-2014, 05:45 AM
  2. vods3 only works on first connected bucket
    By jonmumm in forum Video On Demand Streaming Discussion
    Replies: 2
    Last Post: 02-15-2013, 10:28 AM
  3. How to see how many client are connected to live stream?
    By littleantz in forum Server Administration Discussion
    Replies: 2
    Last Post: 05-15-2012, 04:49 AM

Posting Permissions

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