How to actively disconnect TCP passive streaming #4384
Replies: 5 comments 1 reply
-
I also want to know. |
Beta Was this translation helpful? Give feedback.
-
Maybe the SIP Server should persist certain critical states to a database, enabling state recovery and targeted processing after a restart. For example, the following fields could be stored: device_id This way, after a restart, the SIP Server can reload this information to avoid redundant invitations to already streaming devices and maintain state consistency. |
Beta Was this translation helpful? Give feedback.
-
Many scenarios need to be considered. For example, if the signaling service is restarted while the video is playing, can the video still be played normally? If normal playback is required, how to ensure that the video can be correctly and safely disconnected because the TCP connection has been disconnected? |
Beta Was this translation helpful? Give feedback.
-
You can use the scheduled task to detect the stream, retrieve the stream list through SRS's stream API, and iterates to check its publish status and client count. If the client count remains <=1 for an extended period, or if the publish status is false, it sends a "bye" command to the streaming client, instructing it to stop pushing the stream. |
Beta Was this translation helpful? Give feedback.
-
Indeed, this is an issue. It may be necessary to introduce additional interfaces to synchronize the status between the SIP server and the media server. If required, you may contact me for customization. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem description: GB signaling service and SRS streaming service are two independent services. After the signaling service establishes a connection with the device, it successfully opens the stream to the device. The device establishes a TCP connection with the streaming server and actively pushes the stream to the streaming server. After the signaling service restarts abnormally, the device still pushes the stream to the streaming server. How can I safely disconnect the stream at this time?
Beta Was this translation helpful? Give feedback.
All reactions