I m trying to calculate the total no.of minutes the video was played using MPEGDASH and HLS. I was able to accomplish this on RTP streams as it had the ‘OnPlay’ and ‘OnStop’ events being fired correctly.
The problem I m facing with mpegdash and hls videos is that - I don’t know if there are any events that is fired on ‘OnPlay’, ‘OnStop’, ‘OnSeek’ or if there is any other way we could get the total duration of the stream played.
I m trying to use the ‘onHTTPMPEGDashStreamingSessionDestroy’ event - but this is only being fired at the end of the video and is not fired when I stop the video or Start another video.
Any help in this regard is appreciated.
Thanks,
Nikhil
For stats per stream, take a look at the log rows with x-category “stream” and x-event “destroy”:
sc-stream-bytes * 8 / x-duration = bps
For stats per client connection, take a look at the log rows with x-category “session” and x-event “disconnect”:
sc-bytes * 8 / x-duration = bps
bps * .001 = kbs
Regards,
Salvadore
Thanks for a quick response but I m not sure this is going to work. What I m seeing on wowza’s access logs, for both MPEGDASH and HLS videos is that - the ‘stream destroy’ event only occurs at the end of the video and not when I stop the video or play another video.
The problem with this is: when a user watches 10 mins of a 60 mins video - there seems no way to know that the user watched 10 mins because wowza is only firing the ‘stream destroy’ event at the end of the video irrespective of if the user stopped or moved away to another video on the same client session.
Any ideas ?