Wowza Community

Unpublish and destroy stream on server-side

Hello everybody.

I want to unPublish and destroy a live stream through server-side code. I have tried using IMediaStream.stopPublishing() and IMediaStream.shutdown() but they appear to not do anything at all.

I have seen other threads with people saying to use IMediaStream.getClient().setShutdownClient(true), but unfortunately I can’t rely on this approach, as my clients are sometimes becoming unresponsive, and so calling this also seems to have no effect.

Some info:

-The Clients are connecting from a flash file on a website, and publishing streams through RTMP.

-I have a rather big module controlling streams and clients’ info.

Right now I am using IMediaStream.notifyActionUnPublish() as a workaround, but as this don’t really do anything other than call the onUnPublish method on the IMediaStreamActionNotify3 listener I have added to the stream, this is kind of pointless, as I really want to destroy this stream, and have Wowza call all the right methods.

Thank you.

Someone?

Someone?

Yes we see the same issues. If the GOcoder app has trouble with bandwidth for example, and posts the popup, Gocoder stops publishing until the user clicks through the warning popup. At this point, the Gocoder app hasn’t sent any data for some time, and it stops and returns to the state with the red button off awaiting to start publishing again. However, it never sent a disconnect or unpublish.

So The WSE still has the stream open, even though it should have torn down.

To Animaleante:

Your case looks like it involves an RTMP publisher that is pushing the stream to your Wowza server. If so, the setShutdownClient() method in the IMediaStream object should correctly shut it down. For other users running into this issue, please open a support ticket with your conf/logs so that we can further investigate.

To smartblonde:

There is a timeout period associated with RTMP publishers. If the client is still connected but not sending packets, Wowza waits and does not immediately destroy the connection in case it was a network hiccup and the client comes back online. You can change these timeout settings by changing the PingTimeout and ValidationFrequency properties in your application.

Michelle