Wowza Community

Monitoring audio volume

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:

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?

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!

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.

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 :slight_smile:

Thanks!