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

[HTTP API] Missing data for 'Get all streams info' endpoint on some clients #1591

Closed
AndrewEyesman opened this issue Feb 11, 2025 · 3 comments

Comments

@AndrewEyesman
Copy link

Hello, I'm having a strange issue when using the HTTP API. I'm making requests to the API from two separate clients:

  1. Postman (for testing)
  2. React website

I'm able to successfully make requests to the API from both clients, however some data is missing when requesting from the website. Here's an example for the 'Get all streams info' endpoint:

Response from Postman:

{
    "main": {
        "producers": [
            {
                "id": 60,
                "format_name": "rtsp",
                "protocol": "rtsp+tcp",
                "remote_addr": "192.168.1.250:554",
                "url": "rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0",
                "sdp": "v=0\r\no=- 2254511329 2254511329 IN IP4 0.0.0.0\r\ns=Media Server\r\nc=IN IP4 0.0.0.0\r\nt=0 0\r\na=control:*\r\na=packetization-supported:DH\r\na=rtppayload-supported:DH\r\na=range:npt=now-\r\nm=video 0 RTP/AVP 98\r\na=control:trackID=0\r\na=framerate:18.000000\r\na=rtpmap:98 H265/90000\r\na=fmtp:98 profile-id=1;sprop-sps=QgEBAUAAAAMAAAMAAAMAAAMAmaABRCAHofLlruRsGuVRNgQAAAMABAAAAwBIIA==;sprop-pps=RAHAc8BMkA==;sprop-vps=QAEMAf//AUAAAAMAAAMAAAMAAAMAmawJ\r\na=recvonly\r\n",
                "user_agent": "go2rtc/1.9.8",
                "medias": [
                    "video, recvonly, H265"
                ],
                "receivers": [
                    {
                        "id": 61,
                        "codec": {
                            "codec_name": "hevc",
                            "codec_type": "video"
                        },
                        "childs": [
                            62
                        ],
                        "bytes": 140562078,
                        "packets": 101015
                    }
                ],
                "bytes_recv": 141777714
            }
        ],
        "consumers": [
            {
                "id": 59,
                "format_name": "mp4",
                "protocol": "http",
                "remote_addr": "172.17.0.1:60364",
                "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36",
                "medias": [
                    "video, sendonly, H264, H265",
                    "audio, sendonly, MPEG4-GENERIC"
                ],
                "senders": [
                    {
                        "id": 62,
                        "codec": {
                            "codec_name": "hevc",
                            "codec_type": "video"
                        },
                        "parent": 61,
                        "bytes": 126233234,
                        "packets": 90751,
                        "drops": 10264
                    }
                ],
                "bytes_send": 120767837
            }
        ]
    }
}

Response from Website:

{
  "main": {
    "producers": [
      {
        "url": "rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0"
      }
    ],
    "consumers": []
  }
}

These two requests are for the same endpoint on the same network. I've tried enabling/disabling the headers but nothing works.

The Go2RTC server is running in a Docker container on Windows.

Does anyone know why this is happening? Any help would be appreciated!

@seydx
Copy link
Contributor

seydx commented Feb 12, 2025

Were the requests made at the same time, with an active stream? The upper request just shows an active stream, and the lower one has no active stream

@AndrewEyesman
Copy link
Author

Were the requests made at the same time, with an active stream? The upper request just shows an active stream, and the lower one has no active stream

Yes the requests were made at the same time with an active stream. The bottom request is an active consumer while the top one isn't.

I found that after disabling the stream from the website and consuming the stream from a different client, the website finally shows the full request data. So it seems clients that are actively streaming cannot get the full request data.

This answers my original question, but I'm unsure whether this is a feature or a bug. I think it would be nice to have the full request data for all clients, regardless if they are consuming a stream.

Closing this issue. Thanks for the help!

@AlexxIT
Copy link
Owner

AlexxIT commented Feb 12, 2025

"data for all clients" * zero clients = zero

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants