-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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-FLV: Play a stream with no data, no timeout or 404, or the player waits #1134
Comments
Clearing the cache when the encoder stops streaming is reasonable.
|
How was the lack of a timeout disconnect mechanism considered when playing rtmp?
|
Should support configuring read timeout.
|
|
After introducing 404, the only downside is that the player may disconnect due to unpublishing or edge reconnection. Considering that the player itself cannot remain connected indefinitely, I personally think it is acceptable.
|
Postpone to SRS4. |
|
|
Dup to #931 Attention should be paid to whether to disconnect or maintain the connection, as there are different demands in different scenarios, so it is best to make this configurable. The issue of connecting to the origin with Edge is the same. Close this issue, please refer to #931 for details.
|
Branch: 2.0
@winlinvip hi,
First of all, currently in srs2.0, there is a timeout disconnection handling for the publishing end, but there is no related handling for the player. This is considered another issue, and it is mentioned here just as an introduction.
In the case of RTMP, this is not surprising. However, when providing HTTP-FLV services, the usual scenario is to proxy through Nginx to SRS. At this time, Nginx has a
proxy_read_timeout
configuration, whether it is default or custom. In intuitive logic, there is a timeout disconnection for the player through Nginx proxy, and this situation is indeed valid for the SRS origin server.However, when SRS serves as an edge server for HTTP-FLV, the behavior can be a bit "unexpected". In order to implement the
reduce_sequence_header
feature, SRS does not clean up thecache_metadata
,cache_sh_audio
, andcache_sh_video
when unpublishing. The edge ingester triggered by the HTTP-FLV player on the edge SRS will keep retrying due to the absence of a stream from the origin server, and each retry will resend the metadata and sequence header obtained from the origin server to the client. As a result, from the perspective of the HTTP-FLV player, even though there is no actual stream, the edge ingester keeps sending this data to Nginx at the interval of the edge ingester's timeout. This makes it seem like theproxy_read_timeout
is not working as expected, unless a very smallproxy_read_timeout
is set, otherwise the connection will remain open indefinitely.TRANS_BY_GPT3
The text was updated successfully, but these errors were encountered: