Skip to content

[Improvement] support for more stats logging #1

@mesbahulalam

Description

@mesbahulalam

We can implement stats for watch time of each channels and unique visitor count in PHP, no need for javascript/nodejs. But we do need some form of SQL engine for performance reasons.
Both implementations require PHP session.

For both implementation we create a SQL table, let's say stream_count and watch_time.

Each time a stream is played. we proxy it to our php endpoint first, log the stream id with the users php session id in stream_count, fetch the actual stream m3u8, convert relative urls to absolute url and return it. Thus, each request with a unique php session id is a unique stream_count. We can group by hour or day for a more relevant stats data.

Similarly, each time a stream m3u8 is requested, we create a record for the amount of seconds that m3u8 accounts for and insert it inside watch_time table with the users session id. We can then add all the watch_time values, group them by hour or day for a better insight into how much each of the channels are streamed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions