kaltura / nginx-vod-module

NGINX-based MP4 Repackager
GNU Affero General Public License v3.0
1.96k stars 431 forks source link

Watch time ? #1500

Open miroirdelame opened 6 months ago

miroirdelame commented 6 months ago

Hello,

First of all, thanks a lot for this wonderful module, that's been working like a charm for a while in production. Now I need to know, for every single stream and in a reliable manner, the watch time. Is there any way for me to achieve this ? Am I missing a setting or somechat ?

Coding is not a problem to me, but I still don't have the initial idea.

Thanks in advance

EDIT : i'm using HLS and VideoJS on the front. And I'm not even sure that a server-side solution is relevant, as a segment loaded from the server might not actually be watched (due to caching)

erankor commented 6 months ago

Hi, as you wrote, a server side solution can't be accurate due to pre-fetching of segments - the client downloads future segments in order to be more resilient to temporary network issues. In addition to that, medium/large scale deployments should employ a CDN / caching proxies in front of this module. In these cases, the module has no visibility to the segments being downloaded - the stream may be downloaded once from the server running this module, and served to millions of users by the CDN. Since it can only work in very small deployments / "in the lab", this module does not contain a feature for counting playback time.