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

Support stats #104

Open
danielboros1990 opened this issue Mar 2, 2024 · 10 comments · Fixed by #107
Open

Support stats #104

danielboros1990 opened this issue Mar 2, 2024 · 10 comments · Fixed by #107
Labels
enhancement New feature or request in progress in progress

Comments

@danielboros1990
Copy link

danielboros1990 commented Mar 2, 2024

Hi there.

It would be nice if Xiu would have a statistics api, like ingress/egress data or connected users etc. :)

@kumaraguru1735
Copy link

+1 need like SRS media server

@kumaraguru1735
Copy link

Or Can we build like Flussonic, I can help you on web pages...

@harlanc
Copy link
Owner

harlanc commented Mar 3, 2024

xiu now implement a API to query statistic information of ingress data: https://www.rustxiu.com/v0.12.4/docs/httpapi/http-api#query-stream-information.

@harlanc harlanc added the enhancement New feature or request label Mar 3, 2024
@kumaraguru1735
Copy link

@harlanc How to query a particular stream key?

@harlanc
Copy link
Owner

harlanc commented Mar 3, 2024

 @kumaraguru1735 not yet implemented..Can you show what data Flussonic service collects and how it is displayed?

@kumaraguru1735
Copy link

I am currently using SRS a opensource library https://ossrs.io/lts/en-us/docs/v5/doc/getting-started and created frontend and own API system for CMS
As I love Flussonic Pull and MultiStream option, I am also developing CMS system for that
https://flussonic.com/doc/api/reference/

@DanielZelei
Copy link

Hi @harlanc ,

Thank you for this library and for always adding new features 👍 🍾 . I really like the project. The only thing I miss, compared to SRS, is detailed statistics.
I'm setting up a project for a client where I need to know the amount of bytes used (both incoming and outgoing) by each stream and client over a specific time (I can see when the streaming started)

If I got it right, I can't get this information from the current stats API. For example, here's a response from the SRS stats API:

{
    "code": 0,
    "server": "vid-q95bj4i",
    "service": "mlyo4o82",
    "pid": "1",
    "streams": [
        {
            "id": "vid-40n2t7q",
            "name": "livestream",
            "vhost": "vid-6ul3cc3",
            "app": "live",
            "tcUrl": "rtmp://34.65.58.34/live",
            "url": "/live/livestream",
            "live_ms": 1707915749199,
            "clients": 2,
            "frames": 862,
            "send_bytes": 560320,
            "recv_bytes": 1860487,
            "kbps": {
                "recv_30s": 0,
                "send_30s": 0
            },
            "publish": {
                "active": true,
                "cid": "z5y44205"
            },
            "video": {
                "codec": "H264",
                "profile": "High",
                "level": "3.1",
                "width": 960,
                "height": 544
            },
            "audio": null
        }
    ]
}

@kumaraguru1735
Copy link

wright , for more info I will you on discord ?

@harlanc harlanc added the in progress in progress label Mar 12, 2024
@harlanc harlanc linked a pull request Mar 15, 2024 that will close this issue
@harlanc
Copy link
Owner

harlanc commented Mar 17, 2024

@danielboros1990 @kumaraguru1735 @DanielZelei An improved version about HTTP-API to query stream statistic data has been released, any questions please let me know. Doc

@kumaraguru1735
Copy link

It's better to have api for streams info seperately

And api to get a specific stream info seperately

Api to get all clients info seperately

Api to get specific client info seperately

Kick Out stream or clients on single api using id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request in progress in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants