Page 1 of 2 12 LastLast
Results 1 to 10 of 13

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

  1. #1

    Default 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 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
    2) when a connection is starting
    3)when a connection is ending.

  2. #2
    Join Date
    Dec 2014



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

    See this thread:

  3. #3


    I am not able to find any info about the new methods (onHTTPCupertinoStreamerRequest) in the api documentaiton.

  4. #4


    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).

  5. #5



    This has been made available by extending ModuleBase:
    public void onHTTPCupertinoStreamerRequest(HTTPStreamerSessionCupertino httpSession, HTTPStreamerCupertinoRequestContext reqContext){
    It looks like this has not been added to the API documentation yet.

    Kind regards,


  6. #6


    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.

  7. #7


    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.


  8. #8


    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.
    Last edited by gauravmishra; 01-03-2015 at 10:02 AM.

  9. #9


    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-
    <meta base="rtmp://localhost:1935/edge/_definst_"/>
    <video src="myStream_360p" system-bitrate="534000"/>
    <video src="myStream_240p" system-bitrate="272000"/>
    <video src="myStream_160p" system-bitrate="136000"/>

    My question is how does jwplayer switches between streams if it doesnt use play2().
    Also i observed that when i use strobe player where i have added in some code to call FCSubscribe() it "holds" the video streams on edge application even when all of them are not actively consumed and i can see all the renditions of streams under "incoming streams" section of my edge app .
    But when using jwplayer edge app shows just one rendition and keeps on showing that rendition forever. So i wonder if adaptive bitrate switching is actually happening or not when using jwplayer.

  10. #10



    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.


Page 1 of 2 12 LastLast

Similar Threads

  1. Live adaptive bitrate playback with Flow Player - it does not work
    By michalm in forum Live Streaming and Encoders
    Replies: 5
    Last Post: 04-03-2014, 11:18 PM
  2. Flash Player, Adaptive Bitrate, and Audio Sync. Issues
    By markho in forum Media Players and Devices Discussion
    Replies: 8
    Last Post: 04-26-2012, 02:56 AM
  3. Adaptive bitrate, force a bitrate via HTTPProvider
    By Meinaart in forum Server-side Modules and Code Samples Discussion
    Replies: 9
    Last Post: 04-05-2012, 10:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts