Tracking which bitrate quality a player is consuming (adaptive bitrate)

Hi All,

I want to keep track of which bitrate stream a particular client is consuming throughout a live session.

i want to register following information for a live session

t=0 connection from userid=123 — quality =1 (or low quality or 160p)

t=15 ----- userId = 123 ------ quality = 2 ( or 240p)

t=35 ---- userId 123 ------- quality = 3 (or 360p)

t=100 -----userId 123 ------quality = 2

video players can be using adaptive bitrate rtmp (jwplayer) from web or adaptive bitrate hls (IOS devices) or single bitrate rtsp (android).

I found a module mentioned at https://www.wowza.com/docs/how-to-log-client-count-and-metadata-for-a-stream-every-10-seconds-modulelogviewercounts which gives me info regarding count of connections but not on the bitrates of each connection. Is there a module(s) where i can detect

1)when a connection is switching stream quality

  1. when a connection is starting

3)when a connection is ending.

Hello,

From what I’ve seen mentioned in another post there’s a new API that might help.

See this thread: Apple hls played file tracking form smil file

For RTMP you can use play2 so

	public void play2(IClient client, RequestFunction function,
	        AMFDataList params) {
		
	}

In the params object you should receive the RTMP request to change streams with some other information. Although the sever may receive a request it does not mean it will be actioned and a callback is made to the client if successful.

Andrew

Hi,

If play2 is not being called then no switching is taking place. The streams do need to be active for switch to occur so if they are not available on the edge the player will not switch.

Andrw.

Hello.

This has been made available by extending ModuleBase:

public void onHTTPCupertinoStreamerRequest(HTTPStreamerSessionCupertino httpSession, HTTPStreamerCupertinoRequestContext reqContext){
		getLogger().info("onHTTPCupertinoStreamerRequest");
	}

It looks like this has not been added to the API documentation yet.

Kind regards,

Salvadore

ngrp do not get forwarded to the edge. With this HHTPProvider, you can create a SMIL from using the medialist tool on the origin and create a file that you host in the content folder on the edge:

How to create and play SMIL files with streams created by Wowza Transcoder

I hope this helps.

Kind regards,

Salvadore

I am not able to find any info about the new methods (onHTTPCupertinoStreamerRequest) in the api documentaiton. https://www.wowza.com/resources/WowzaStreamingEngine_ServerSideAPI.pdf.

Hi,

I found a interface IMediaStreamNameAliasProvider2 which looks promising for my use case. It has a bunch of resolvePlayAlias methods. However couple of queries

  1. does these method gets called every time a client tries to switch from one rendition to another.

  2. is there a better/alternate way to do this since in these methods i will have to parse stream names to check which bitrate is requested . ie (streamName = myStream_360p will mean player asked for 360p rendition).

correct me if i am wrong …onHTTPCupertinoStreamerRequest this method as name suggest will apply only for hls playback. What about the rtmp playback. How to track when a particular player switches from one bitrate to another in dynamic rtmp playback.

Thanks. using onHTTPCupertinoStreamerRequest() and play2() i am able to track when clients switches between various bitrates.

Also i am trying to track when a player disconnects the session. I found IClientNotify has a method onClientDisconnect(IClient client) which i can use.

But i am not able to get stream name from client object. there are some methods in client class ( like getUri) which give me url of stream but that url does not contain the stream Name.

an Update - when i was testing with a flash player (StrobeMediaPlayer) play2() method was being called whenever switching was taking place . But when i am trying to use Jwplayer to play the streams play2() is not getting called.

i am using a amlst module to serve the smil file to jwplayer.

http://localhost:1935/edge/amlst:myStream/jwplayer.smil produces following smil file-

So how to fix this . is there a way from server side module through which i can do the job of FCSubscribe ie to hold all rendition of streams on edge app . i dont think i will have access to jwplayers source code so doing something on server side appears to be my only option.

i already have a custom IMediaListProvider in a Edge app module which generates smil file for jwplayer.

if i hit this url (http://localhost:1935/edge/amlst:myStream/jwplayer.smil ) in browser i get a valid smil file . But problem i am facing is i want to make sure that all consumers of streams to connect on edge servers. For achieving that i will have to make sure all renditions of stream be available to edge application.

One way to achieve this is to call Netstream.FCSubscribe() from video player for each rendition. Since i cannot update code of jwplayer , Is there a way to achieve the same from server side ie to copy renditions of stream on edge app on all edge servers ?