Results 1 to 6 of 6

Thread: Calculating statistics per stream

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2013
    Posts
    15

    Default Calculating statistics per stream

    Hi,

    I'm using Wowza to do some VOD streaming, and for each stream, I log the MessagesOutBytes to a MySQL database. Now I want to do some calculations in order to see what percentage of a video a user has watched. The problem that I'm having is that, I need a value to compare MessagesOutBytes to. I know the total file size of the requested video, but I can't use that value to calculate the percentage watched.

    So my question is basically, what can I use in Wowza to calculate how much bytes have been used of the total VOD asset file size?

    Thanks in advance!

    Pieter

  2. #2
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Pieter,

    In IMediaStreamActionNotify3.onStop() you can get duration in seconds like this:

    Double duration = stream.getElapsedTime().getTimeSeconds();
    Richard

  3. #3
    Join Date
    Jan 2013
    Posts
    15

    Default

    Quote Originally Posted by rrlanham View Post
    Pieter,

    In IMediaStreamActionNotify3.onStop() you can get duration in seconds like this:

    Double duration = stream.getElapsedTime().getTimeSeconds();
    Richard
    Hi Richard,

    thanks for your fast reply. Will this solution also work for HLS streams?

    Pieter

  4. #4
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Yes, however it is not precise because Wowza only knows what was sent (chunks) but not how much was played.

    public void onHTTPSessionDestroy(IHTTPStreamerSession httpSession)
    	{		
    		httpSession.getElapsedTime().getTimeSeconds();
    	}
    Richard

  5. #5
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Take a look at this example:

    http://www.wowza.com/forums/content....nce-statistics

    Richard

  6. #6
    Join Date
    Jan 2013
    Posts
    15

    Default

    Thank you. I will give this a try!

Similar Threads

  1. Stream Statistics
    By jasoni in forum Video On Demand Streaming Discussion
    Replies: 5
    Last Post: 11-01-2013, 11:53 AM
  2. Calculating Expected Costs
    By HiDaveGeorge in forum Wowza Media Server 3 for Amazon EC2 Discussion
    Replies: 3
    Last Post: 06-10-2012, 07:30 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
  •