sergey-dryabzhinsky / nginx-rtmp-module

NGINX-based Media Streaming Server
http://nginx-rtmp.blogspot.com
BSD 2-Clause "Simplified" License
1.02k stars 215 forks source link

Add support for getting the number of hls viewers #91

Open myrmidon-media opened 8 years ago

myrmidon-media commented 8 years ago

Would be great to have the possibility to get the number of current clients using HLS

https://github.com/arut/nginx-rtmp-module/issues/420

Also somebdoy wrote a module for that hls_watch, although the author states that it has some bugs

https://github.com/WL-hohoho/nginx-rtmp-module/tree/hls-watch

sergey-dryabzhinsky commented 8 years ago

Very interesting. Thou I'm not sure about number accuracy. I'll check this code. On weekend I think.

misiek08 commented 8 years ago

Number can be very inaccurate because that code count just number of hits to fragments. Although it should work in simple setups and show approximate number of viewers.

yverbin commented 8 years ago

Viewers counting must be performed on http distribution level. Use http access log analyzers.

myrmidon-media commented 8 years ago

@yverbin do you know any log analyzer that gives live hls viewers?

yverbin commented 8 years ago

@myrmidon-media, I use self-written system analysis of statistics. In your case, the architecture of the system may vary depending on the number of viewers, using CDNs, geographical locations of the access servers, using secure links, etc. For example, you can collect access logs using syslog server, eventually parse data and generate time-series of online and unique users using fixed time period.