Wowza Community

How to get HLS live stream information

Hi,

I am working on wowza live streaming analytics module for hls and rtmp streams.

i want to fetch following information from HLS and RTMP type live streaming…

-> viewer’s information

-> viewer-end user-agent

-> total data streamed to viewer

-> total play duration of media

-> flavours played during the stream.

i’ve fetched this data for RTMP live striming using following listener and classes:

->Listener: IMediaStream.addClientListener()

->Notifier: IMediaStreamActionNotify3

->Some wowza’s basic server API

i am not aware about the listener to get stream specific information in case of HLS(cupertino) live streaming.

i’ve achieved following in case of HLS(cupertino) live streaming:

-> total data transferred to viewer

-> user-agent

-> viewer’s information

and the information that is not achieved yet in HLS live streaming:

->total play duration of media

->flavors played during the stream

i’ve tried HTTPStreamerApplicationContextCupertinoStreamer.addVODActionListener() but is works with VOD type application only.

Can you please help me on this?

Thanks.

Hello

For the two elements you are having trouble obtaining for live streams, you can check out the following:

- Total Play Duration of the media

if you are looking on a per client basis, you can simply use time running from the session object as follows:

httpSession.getTimeRunningSeconds()

- Flavors played during the stream

You can depict which protocol by doing something like the following:

public void onHTTPSessionCreate(IHTTPStreamerSession httpSession){
  switch(httpSession.getSessionProtocol()){
	case IHTTPStreamerSession.SESSIONPROTOCOL_CUPERTINOSTREAMING:
		getLogger().info("Cupertino..");
	break;
	case IHTTPStreamerSession.SESSIONPROTOCOL_MPEGDASHSTREAMING:
		getLogger().info("Dash..");
	break;
	// ...
  }
}

Thanks,

Matt