Is it possible to do a simple health check of RTSP stream with curl tool? #1605
Replies: 4 comments 2 replies
-
I don't think there is a reliable way with only
|
Beta Was this translation helpful? Give feedback.
-
Hello, you can get health of all configured streams by enabling the API:
The API can be queried with CURL on port 9997:
obtaining {
"items":{
"mystream":{
"confName":"~^.*$",
"conf":{
...
},
"source":{
"type":"rtspSession",
"id":"06b2e72f-81a3-437a-915c-dc13c9d49bef"
},
"sourceReady":true,
"tracks":[
"H264"
],
"bytesReceived":49963,
"readers":[
{
"type":"hlsMuxer"
}
]
}
}
} |
Beta Was this translation helpful? Give feedback.
-
curl http://localhost:9997/v1/rtspconns/list would be another option. it will show bytes sent/received.
|
Beta Was this translation helpful? Give feedback.
-
In my case MediaMTX is proxying a few cameras, and |
Beta Was this translation helpful? Give feedback.
-
Hi, I would like to check if the server RTSP is up or down by using command curl. If it isn't possible, is there any way to know its current status without needing to consume streaming with for example ffmpeg or vlc?.
I'm running the server RTSP in a docker container and when it is up if I execute:
$ curl --connect-timeout 15 -i -X OPTIONS rtsp://localhost:8554/mystream
it returns curl: (85) Empty reply from server
I checked this error and it indicates "Mismatch of RTSP CSeq numbers" and I don't know how to interpret it.
I the container with the server RTSP is down and I execute the same command, it returns:
curl: (7) Failed to connect to localhost port 8554: Connection refused
Beta Was this translation helpful? Give feedback.
All reactions