# monitoring incoming stream's bitrate not reliable?

**URL:** <https://community.wowza.com/t/monitoring-incoming-streams-bitrate-not-reliable/35263>\
**Category:** Wowza Streaming Engine\
**Created:** [July 23, 2012, 6:48am UTC](https://community.wowza.com/t/monitoring-incoming-streams-bitrate-not-reliable/35263 "2012-07-23T06:48:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jon\_Achai](https://avatars.discourse-cdn.com/v4/letter/j/f0a364/32.png) [@Jon\_Achai](https://community.wowza.com/u/Jon_Achai)\
**Post date:** [July 23, 2012, 6:48am UTC](https://community.wowza.com/t/monitoring-incoming-streams-bitrate-not-reliable/35263/1 "2012-07-23T06:48:36Z")

</div>

Hi,

In our custom module we implemented a monitor thread that checks every 4 seconds the bitrate of the incoming stream so in case the bitrate is too low or there is some kind of problem with the stream we can disconnect the broadcaster and move on.

However after implementing this we noticed that good broadcasters were being dropped as well.

I then changed it to just log when it thought it should disconnect based on bitrate and I saw that sometimes for 10-15 and sometimes up to a full minute the bitrate went down to 0 and then went back up.

What I use to monitor the bitrate is the following:

IMediaStream monitoredStream;

monitoredStream = thisAppInstance.getStreams().getStream(STREAM\_NAME);

IOPerformanceCounter perf = monitoredStream.getMediaIOPerformance();

Double bitrate = perf.getMessagesInBytesRate() \* 8 \* .001;

Any idea how this can happen? Is there a more reliable way to monitor the incoming stream quality?

Thanks,

Jonathan

---

<div class="post-metadata">

**Author:** ![Jon\_Achai](https://avatars.discourse-cdn.com/v4/letter/j/f0a364/32.png) [@Jon\_Achai](https://community.wowza.com/u/Jon_Achai)\
**Post date:** [July 23, 2012, 7:00am UTC](https://community.wowza.com/t/monitoring-incoming-streams-bitrate-not-reliable/35263/2 "2012-07-23T07:00:07Z")

</div>

I just want to add, that checking the recorded video did have frozen video where it was reported (audio was fine though) - does this method not take into consideration the audio bitrate?

Also, I noticed that I got a report of two different incoming streams on the same wowza server that reported 0 bitrate at exactly the same time.

---

<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:** [July 23, 2012, 11:10pm UTC](https://community.wowza.com/t/monitoring-incoming-streams-bitrate-not-reliable/35263/3 "2012-07-23T23:10:03Z")

</div>

Take a look at these live stream monitoring examples:

[https://www.wowza.com/docs/how-to-monitor-bandwidth-of-published-streams-modulelimitpublishedstreambandwidth](https://www.wowza.com/docs/how-to-monitor-bandwidth-of-published-streams-modulelimitpublishedstreambandwidth)

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

Richard
