# Calculate how much of video has been viewed.

**URL:** <https://community.wowza.com/t/calculate-how-much-of-video-has-been-viewed/35795>\
**Category:** Wowza Streaming Engine\
**Created:** [March 10, 2015, 10:17pm UTC](https://community.wowza.com/t/calculate-how-much-of-video-has-been-viewed/35795 "2015-03-10T22:17:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_O\_Brien](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@David\_O\_Brien](https://community.wowza.com/u/David_O_Brien)\
**Post date:** [March 10, 2015, 10:17pm UTC](https://community.wowza.com/t/calculate-how-much-of-video-has-been-viewed/35795/1 "2015-03-10T22:17:28Z")

</div>

Hello,

We have a Video on Demand application, and we need to accurately calculate how much of a video a user has viewed.

For RTMP we use the Wowza logs to work this out, as client commands (play, pause, unpause, seek, stop, etc) are sent through and logged by Wowza.

For HLS and HDS Wowza does not log the pause and unpause commands, so it is difficult (impossible?) to determine if the video is playing. Is this an option that can be set in Wowza, or is it due to the http based protocols?

Do you have any suggestions on how we can track how much of a video a user has viewed?

Thanks

David.

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [March 10, 2015, 8:01am UTC](https://community.wowza.com/t/calculate-how-much-of-video-has-been-viewed/35795/2 "2015-03-10T08:01:30Z")

</div>

Hello, please take a look at this guide:

[How to gather user streaming statistics](https://www.wowza.com/docs/how-to-track-streaming-by-users)

Kind regards,

Salvadore

---

<div class="post-metadata">

**Author:** ![David\_O\_Brien](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@David\_O\_Brien](https://community.wowza.com/u/David_O_Brien)\
**Post date:** [March 11, 2015, 9:24am UTC](https://community.wowza.com/t/calculate-how-much-of-video-has-been-viewed/35795/3 "2015-03-11T09:24:35Z")

</div>

Hi Salvadore,

Thanks for your message.

We are able to pass id information through to the log files.

The problem is determining how much of the video has been viewed by a user. HLS and HDS do not appear to send pause and unpause events do not appear to be logged by Wowza. Is this an option in Wowza or is it a function of the http based protocols?

Cheers

David.

---

<div class="post-metadata">

**Author:** ![Zoran](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/zoran/32/385_2.png) [@Zoran](https://community.wowza.com/u/Zoran)\
**Post date:** [March 11, 2015, 3:33pm UTC](https://community.wowza.com/t/calculate-how-much-of-video-has-been-viewed/35795/4 "2015-03-11T15:33:30Z")

</div>

Hi,

This is player specific behavior. For VOD files, when a VOD HLS stream is requested, all the media chunk information is available in the chunklist file received by the player. Normally, when this chunklist is received, the player starts to download the media chunks, whether the user is watching the entire video or not. Since the chunks are downloaded by the player in advance, on the Wowza server side there is no way of knowing how much of the video was already played back by a particular client.

Zoran

---

<div class="post-metadata">

**Author:** ![JP\_Nayak](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@JP\_Nayak](https://community.wowza.com/u/JP_Nayak)\
**Post date:** [March 11, 2015, 11:47am UTC](https://community.wowza.com/t/calculate-how-much-of-video-has-been-viewed/35795/5 "2015-03-11T11:47:38Z")

</div>

Thanks salvadore, really useful info.
