# Detecting stop of rtmp stream from wowza

**URL:** <https://community.wowza.com/t/detecting-stop-of-rtmp-stream-from-wowza/34510>\
**Category:** Wowza Streaming Engine\
**Created:** [March 20, 2010, 8:51pm UTC](https://community.wowza.com/t/detecting-stop-of-rtmp-stream-from-wowza/34510 "2010-03-20T20:51:51Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ken\_Lee](https://avatars.discourse-cdn.com/v4/letter/k/87869e/32.png) [@Ken\_Lee](https://community.wowza.com/u/Ken_Lee)\
**Post date:** [March 20, 2010, 8:51pm UTC](https://community.wowza.com/t/detecting-stop-of-rtmp-stream-from-wowza/34510/1 "2010-03-20T20:51:51Z")

</div>

Hi, everyone:

Can anyone tell me how to best detect an end (or stop) of an rtmp stream so I can trigger an action in my flowplayer code to do something like refresh the player once the rtmp stream stops (as a result of turning off my encoder)?

Thanks,

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [March 21, 2010, 1:05pm UTC](https://community.wowza.com/t/detecting-stop-of-rtmp-stream-from-wowza/34510/2 "2010-03-21T13:05:01Z")

</div>

Search for the NetStream “onPlayStatus” handler which listens for “NetStream.Play.Complete” notification. You can add your code there.

Richard

---

<div class="post-metadata">

**Author:** ![brad\_pit](https://avatars.discourse-cdn.com/v4/letter/b/6bbea6/32.png) [@brad\_pit](https://community.wowza.com/u/brad_pit)\
**Post date:** [April 26, 2010, 2:16am UTC](https://community.wowza.com/t/detecting-stop-of-rtmp-stream-from-wowza/34510/3 "2010-04-26T02:16:40Z")

</div>

First thanks for the great work on RTMP streaming server. …

But I want to know is it possible to strem over RTMP live feeds from IP cameras? … Wowza server can, but it is not free and very heavy. :):)🙂

* * *

[testking 640-460](http://www.testkings.com/exam/640-460.htm) For Help [testking 1z0-052](http://www.testkings.com/exam/1z0-052.htm) For Suppoer [testking 642-415](http://www.testkings.com/exam/642-415.htm) For Info [testking 1Y0-A08](http://www.testkings.com/exam/1Y0-A08.htm)

---

<div class="post-metadata">

**Author:** ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)\
**Post date:** [April 26, 2010, 3:10am UTC](https://community.wowza.com/t/detecting-stop-of-rtmp-stream-from-wowza/34510/4 "2010-04-26T03:10:48Z")

</div>

What can do it. The tutorial is here:

[https://www.wowza.com/docs/how-to-re-stream-video-from-an-ip-camera-rtsp-rtp-re-streaming](https://www.wowza.com/docs/how-to-re-stream-video-from-an-ip-camera-rtsp-rtp-re-streaming)

What do you mean that Wowza is heavy?

Charlie

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [March 21, 2010, 1:52pm UTC](https://community.wowza.com/t/detecting-stop-of-rtmp-stream-from-wowza/34510/5 "2010-03-21T13:52:22Z")

</div>

On 2nd thought, that might not help. Take a look at the Wowza LiveStreamingVideo example. Find the updateStreamValues function and note how NetStream.currentFPS is monitored. This might be a better way to take action in this case:

```auto
private function updateStreamValues():void
		{
			var newVal:String = "";
			if (nsPlay != null)
				newVal = (Math.round(nsPlay.currentFPS*1000)/1000)+" fps/"+(Math.round(nsPlay.bufferLength*1000)/1000)+" secs";
			fpsText.text = newVal;
		}

```

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [March 21, 2010, 3:37pm UTC](https://community.wowza.com/t/detecting-stop-of-rtmp-stream-from-wowza/34510/6 "2010-03-21T15:37:22Z")

</div>

Using Flash CS3 or CS4, can see it in this file:

[wowza-install]/LiveVideoStreaming/client/live.fla

You can see it in the Flex version too:

[wowza-install]/LiveVideoStreaming/clientFlex/src/Player.as

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [March 22, 2010, 3:54am UTC](https://community.wowza.com/t/detecting-stop-of-rtmp-stream-from-wowza/34510/7 "2010-03-22T03:54:05Z")

</div>

I’m not able to work on that right now. If I had something I would give it to you. But it shouldn’t be too hard. Look at how it is being done in the the Wowza example and look at the RTMP code in Flowplayer for a way to work in something similar.

Richard

---

<div class="post-metadata">

**Author:** ![Ken\_Lee](https://avatars.discourse-cdn.com/v4/letter/k/87869e/32.png) [@Ken\_Lee](https://community.wowza.com/u/Ken_Lee)\
**Post date:** [March 21, 2010, 7:33am UTC](https://community.wowza.com/t/detecting-stop-of-rtmp-stream-from-wowza/34510/8 "2010-03-21T07:33:44Z")

</div>

Richard:

I’m in the LiveVideoStreaming example folder, but I can’t locate what you’re referring to. Could you please tell me what file to look at and in what folder?

Thanks,

---

<div class="post-metadata">

**Author:** ![Ken\_Lee](https://avatars.discourse-cdn.com/v4/letter/k/87869e/32.png) [@Ken\_Lee](https://community.wowza.com/u/Ken_Lee)\
**Post date:** [March 21, 2010, 8:31am UTC](https://community.wowza.com/t/detecting-stop-of-rtmp-stream-from-wowza/34510/9 "2010-03-21T08:31:50Z")

</div>

Richard:

Would you be able to provide me some code to drop in my flowplayer to do this if I offered to compensate you?
