Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0.243 HTTP API has not been tracking clients playing HLS. #996

Closed
XiaoWind opened this issue Oct 8, 2017 · 10 comments · Fixed by #2578
Closed

2.0.243 HTTP API has not been tracking clients playing HLS. #996

XiaoWind opened this issue Oct 8, 2017 · 10 comments · Fixed by #2578
Assignees
Labels
API HTTP-API, HTTP-Callback, etc. Duplicated Duplicated bug. Enhancement Improvement or enhancement. Feature It's a new feature. TransByAI Translated by AI/GPT.
Milestone

Comments

@XiaoWind
Copy link

XiaoWind commented Oct 8, 2017

The RMTP client can provide statistics.

TRANS_BY_GPT3

@wnpllrzodiac
Copy link
Contributor

wnpllrzodiac commented Oct 11, 2017

hls, due to the multiple requests of m3u8 and ts, is different from the long connection of rtmp and flv protocols. It is estimated that it is not possible to count the number.

TRANS_BY_GPT3

@hping16
Copy link

hping16 commented Dec 11, 2017

I'm not very familiar with the HTTP protocol. Is there a field that corresponds to each client? If so, I can do the statistics myself.

TRANS_BY_GPT3

@wnpllrzodiac
Copy link
Contributor

wnpllrzodiac commented Dec 29, 2017

That requires the client to pass the session parameter, which is theoretically feasible. However, it requires cooperation from the client for development.

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented Feb 13, 2018

If HLS is distributed through a regular HTTP server, it will not associate m3u8 and ts files, so the connection count is unknown. SRS3 can do this and improve the statistical information.

TRANS_BY_GPT3

@winlinvip winlinvip added Enhancement Improvement or enhancement. Feature It's a new feature. labels Feb 13, 2018
@winlinvip winlinvip added this to the srs 3.0 release milestone Feb 13, 2018
@winlinvip
Copy link
Member

winlinvip commented Feb 13, 2018

SRS can act as an HLS origin server. When a client accesses it, for example, http://ip/app/stream.m3u8, by default it does not carry any identification information. In this case, the server will redirect with a 302 status code to a new address http://ip/app/stream.m3u8?session=xxx, creating a new session parameter. Additionally, this parameter will be included in each ts segment within the m3u8 file, allowing the server to track the number of online viewers.

The requirement is for the HTTP edge server to return a 302 status code to the client, instead of directly following the 302 redirection.

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented Feb 13, 2018

This matter should be done at the edge, because if it is done at the origin server, each piece will have to be returned to the source, losing the function of HTTP edge.

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented Jan 25, 2020

It may be done in SRS4. After enhancing the HTTP capability, it may be possible to track the number of HLS clients.

TRANS_BY_GPT3

@Wang-kk714
Copy link

Wang-kk714 commented Feb 2, 2021

It may be done in SRS4. After enhancing the HTTP capability, it may be possible to count the number of HLS clients.

Hello, I would like to ask if version 4.0 now supports HTTP API for HLS statistics?

TRANS_BY_GPT3

@winlinvip
Copy link
Member

See #1657

@winlinvip
Copy link
Member

Dup to #1657

@winlinvip winlinvip added Duplicated Duplicated bug. API HTTP-API, HTTP-Callback, etc. labels Aug 23, 2021
@winlinvip winlinvip changed the title 2.0.243 HTTP API未统计播放HLS的客户端 2.0.243 HTTP API has not been tracking clients playing HLS. Jul 28, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API HTTP-API, HTTP-Callback, etc. Duplicated Duplicated bug. Enhancement Improvement or enhancement. Feature It's a new feature. TransByAI Translated by AI/GPT.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants