Publish timeout settings

Hi,

Is it possible to set a timeout value in Wowza, when a publisher doesn’t send any more data, to unpublish a stream?

A little explanation / clarification;

When an encoder is suddenly interrupted (for example; power outage), there is no Disconnect/ Unpublish event in Wowza. The stream would be unpublished and published again if the encoder starts a new session. In our case, this could be hours later (or when Wowza restarts). We would like to set a timeout, so that Wowza “forces” an Disconnect/Unpublish event after a certain period when no data is received. How can we set up a timeout? Is this a configuration setting in Wowza?

Thanks in advance.

I’m not sure how to force the event, but you can monitor a stream like this:

https://www.wowza.com/docs/how-to-use-imediastreamactionnotify2-to-monitor-live-streams-modulestreamwatchdog

Richard

If it is RTMP push encoder, you can try to shutdown the client and you can send notification. In some cases the encoder might just try to reconnect.

client.setShutdownClient(true);
sendClientOnStatusError(client, "NetConnection.Connection.Rejected", "Rejected");

Other standard notifications you can use:

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/NetStatusEvent.html

If it is MediaCaster source it’s easy to handle with MediaCaster API

https://www.wowza.com/docs/how-to-use-the-wowza-streaming-engine-java-api-to-start-and-stop-mediacaster-streams

Richard

You can monitor a stream like this:

https://www.wowza.com/docs/how-to-use-imediastreamactionnotify2-to-monitor-live-streams-modulestreamwatchdog

Richard

Instead of sending info to a Flash client, do whatever you need in that circumstance

Richard

Richard,

This seems to be a solution, to tell the client that the stream has stopped. I would like to “tell” wowza to force a unpublish/disconnect. A restart of wowza does the trick, but that is not what i`m looking for. Is there a server side solution for this?

Richard,

I`ll explain the situation a little better; we are using the unpublish event in wowza for a custom made module.

The unpublish event is not being triggered when the encoder (push encoder) is not being shutdown properly. The stream is being unpublished when wowza is restarted, if wowza will not be restarted, the stream will be “open” until that moment (more technical; the TCP session stays open and wowza does not unpublish the stream until the tcp session is closed). So i`m looking for a trigger, lets say when an encoder is not sending any more data for X time, the stream will be unpublished by wowza.

So i`m looking for a solution on the server side, the client does not have anything to do with it :slight_smile:

Richard,

I`ve seen the thread about monitoring the stream, but that is sending the status of the stream to a flash client. That is not what I am looking for.

Wowza it self has to unpublish the stream when the stream has stopped. So I dont want to monitor the stream at the client side.