Results 1 to 9 of 9

Thread: auto-destroy of a stream

  1. #1

    Default auto-destroy of a stream

    Hi All,

    I would like to know if the auto-destroy of a stream can be disabled.
    I have StreamType=live and I start the streams via the startMediaCasterStream API call.
    Afterwards a single client connects and watches the live stream for a while, then disconnects.
    At this point the stream is apparently destroyed by Wowza (the onStreamDestroy method is called too).

    Note-1: This is Flash HTTP streaming via nDVR.
    Note-2: The HTTP Session is destroyed when the client disconnects and before onStreamDestroy is called.

    Please let me know.

    Thanks.

  2. #2
    Join Date
    Sep 2011
    Posts
    1,933

    Default

    Hi
    This refers to the client stream when they have disconnected but not the stream from an encoder to Wowza.

    This can't be disabled.

    Jason

  3. #3

    Default

    So I can't keep on recording the stream after a client is connected and then disconnected?

    What I want to do is record the stream at all times using the LiveStreamRecord module.
    But after a client connects and then disconnects, the stream is destroyed.

    Thanks.

  4. #4
    Join Date
    Sep 2011
    Posts
    1,933

    Default

    Hi
    If you comment out the custom code you have and then try this does it still destroy the stream?
    If you have the url for the stream in StartupStreams.xml does that work without destroying the stream when client disconnects?

    You should be able to continue to record.

    Jason

  5. #5

    Default

    StartupStreams.xml is not option for us, the streams are highly dynamic.

    So are you saying that the stream will not be destroyed if there's an ongoing recording process?
    I disabled some of my code and it behaved the same.
    I don't think this is happening due to my custom code as I am certainly not calling anything that would destroy the stream.

    Please let me know any other ideas as this is quite critical for our application.

    Thanks.

  6. #6
    Join Date
    Sep 2011
    Posts
    1,933

    Default

    Hi
    Have you checked that the recording has stopped when the client disconnects?

    If you check the recording you should be able to see the file size going up even after the client disconnects if the recording is still active.

    I know that you may think it wouldn't be the custom code but to narrow down the problem you should take out all the custom code not just some.
    If the problem is the same then you know that it isn't the code, giving us one less thing to worry about.

    What parameters are you passing into the startMediaCasterStream API?

    Jason

  7. #7

    Default

    Hi Jason,

    Firstly, let me answer your question: I am calling the API like this: instance.startMediaCasterStream(streamName, "rtp");
    Please let me know if there's anything wrong with it. The stream is retrieved from an IP camera with an RTSP url.

    Today I actually confirmed that Wowza is not destroying the stream in either case (i.e. not destroying if there's a recording process or not).
    I confirmed by checking the StreamManager UI...

    However, for some reason the onStreamDestroy method is called, which confused me in the first place.
    -- the method is: public void onStreamDestroy(IMediaStream stream)

    Could you please let me know what is going wrong here? My modules need to act upon stream destroy events, but here actually the stream isn't destroyed even though I get the event.

    Thanks.

  8. #8

    Default

    Please note that I have also confirmed that the onStreamDestroy method is called without my custom modules, except the one that has the onStreamDestroy method.

    Here's what I've done:
    1. Start a stream with name 1.stream with the DVR application using the StreamManager UI.
    2. Connect to this stream with StrobeMediaPlayback.html.
    3. Watch the stream for a while and then disconnect by closing the browser.
    4. The onStreamDestroy method is called, but the stream is still running.

    Thanks.

  9. #9

    Default

    The onStreamDestroy is being called correctly, this callback has to do with the stream going out of Wowza.

    You need to implement an IMediaStreamActionNotify3 and use the on publish and on unpublish events. That has to do with your input stream.

    Check this out:
    New-IMediaStreamActionNotify3-listener-to-notify-of-codec-info

Similar Threads

  1. stream unpublish and destroy
    By jcbriones in forum General Forum
    Replies: 5
    Last Post: 03-24-2013, 07:39 PM
  2. Destroy Stream Definition
    By smarthosting in forum General Forum
    Replies: 4
    Last Post: 07-07-2012, 06:34 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
  •