# Monitoring audio volume

**URL:** <https://community.wowza.com/t/monitoring-audio-volume/41084>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [November 23, 2016, 12:55am UTC](https://community.wowza.com/t/monitoring-audio-volume/41084 "2016-11-23T00:55:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johnathan\_Kanarek](https://avatars.discourse-cdn.com/v4/letter/j/13edae/32.png) [@Johnathan\_Kanarek](https://community.wowza.com/u/Johnathan_Kanarek)\
**Post date:** [November 23, 2016, 12:55am UTC](https://community.wowza.com/t/monitoring-audio-volume/41084/1 "2016-11-23T00:55:18Z")

</div>

Hi,

I’m stream few streams that related to each other and I would like to know in which one of them someone is currently speaking.

For that purpose I want to monitor the audio volume any few seconds in each one of the streams.

I thought to use **IMediaStreamLivePacketNotify.onLivePacket** this way:

```auto
public void onLivePacket(IMediaStream mediaStream, AMFPacket packet) {
	if (FLVUtils.isOnMetadataPacket(packet)) {
		OnMetadataBasic metadata = FLVUtils.getOnMetadataData(packet);
		getLogger().info("onLivePacket: Stream [" + mediaStream.getName() + "] volume: " + metadata.audioinputvolume);
	}
}

```

But **FLVUtils.isOnMetadataPacket** never returns true.

Any other idea how to implement it?

---

<div class="post-metadata">

**Author:** ![Jules\_Bloem](https://avatars.discourse-cdn.com/v4/letter/j/f05b48/32.png) [@Jules\_Bloem](https://community.wowza.com/u/Jules_Bloem)\
**Post date:** [January 16, 2018, 9:35am UTC](https://community.wowza.com/t/monitoring-audio-volume/41084/2 "2018-01-16T09:35:56Z")

</div>

Hi,

we are looking for a similair solution. We have some streams running. But last week we had an issue that the audio was gone for the livestreams and recordings.

We would like to monitor the audio. Are those values available by the rest api? Can we fetch meta data of the recording or livestream that includes something with audio levels or codecs?

Would love to hear!

---

<div class="post-metadata">

**Author:** ![Johnathan\_Kanarek](https://avatars.discourse-cdn.com/v4/letter/j/13edae/32.png) [@Johnathan\_Kanarek](https://community.wowza.com/u/Johnathan_Kanarek)\
**Post date:** [January 16, 2018, 10:36am UTC](https://community.wowza.com/t/monitoring-audio-volume/41084/3 "2018-01-16T10:36:50Z")

</div>

It was a long time ago so I don’t find the code now, but what I did eventually was to pull the stream using node.js by watching the HLS manifest, for each new video segment I downloaded the segment to the local disc and checked the volume with ffmpeg.

---

<div class="post-metadata">

**Author:** ![Jules\_Bloem](https://avatars.discourse-cdn.com/v4/letter/j/f05b48/32.png) [@Jules\_Bloem](https://community.wowza.com/u/Jules_Bloem)\
**Post date:** [January 17, 2018, 3:18pm UTC](https://community.wowza.com/t/monitoring-audio-volume/41084/4 "2018-01-17T15:18:17Z")

</div>

Hi Johnathan,

We was thinking about some sort of solution as well. Let our PHP framework record a small file with the rest api. And then read out the file information with ffmpeg. But getting that information in the API should be a lot easier 🙂

Thanks!
