API: When FFmpeg is blocked, the HTTP callback also not work. #3659
Replies: 4 comments
-
FFmpeg processes an RTSP stream from a camera. However, when a user disconnects the camera's network cable, FFmpeg may become unresponsive or freeze, potentially causing the HTTP callback to malfunction. However, it appears that this should not have happened, as FFmpeg is an isolated process that should not obstruct or influence the HTTP callback of SRS. It is necessary to conduct some research and replicate this issue. |
Beta Was this translation helpful? Give feedback.
-
FFmpeg pulls the RTSP stream from the camera and then pushes it to SRS. However, when the user disconnects the camera's network cable, FFmpeg may become unresponsive, which may cause the HTTP callback to fail. However, this should not happen because FFmpeg is an independent process and should not affect SRS's HTTP callback. It will take time to reproduce this issue. |
Beta Was this translation helpful? Give feedback.
-
I confirm witnessing this bug as well, here are my logs
going to investigate on my end, but it seems to be a race condition or something on the hooks |
Beta Was this translation helpful? Give feedback.
-
OK upon further investigation, the on_publish on my end has an authentication logic that calls a server to authenticate, and if authentication fails then I reject the stream. The problem, it turns out, is that some streaming software continually retries, and that continuous retry is causing a memory leak and an eventual blowup. So we can solve the problem at the firewall level, but it would be great to identify and solve the problem at the server level of SRS |
Beta Was this translation helpful? Give feedback.
-
Description
By using ingest to obtain RTSP streaming and http_hooks callback, when the camera's network cable is plugged and unplugged, it cannot callback normally, the streaming fails. By changing the http_hooks enabled to off and reloading, the streaming can be restored normally.
SRS Version: XCORE-SRS/5.0.152(Bee)
SRS Log:
ffmpeg log
Replay
Please describe how to replay the bug?
Expect
When the camera's network cable is plugged and unplugged, it can callback normally and the streaming is successful.
Beta Was this translation helpful? Give feedback.
All reactions