You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description(描述)
When pulling HLS streams, after the stream is stopped, an on_stop callback event will be generated. However, each time there will be an extra on_stop event. The client_id in the first on_stop request is empty, while the subsequent ones are not. For example, if one HLS stream is pulled and then stopped, two on_stop events will be generated. If five HLS streams are pulled and then stopped, six on_stop events will be generated.
> Please describe how to replay the bug? (重现Bug的步骤)
1. Configure http_hooks in srs.conf and restart SRS.
2. Start pushing the stream: ./ffmpeg -threads 2 -fflags +genpts -stream_loop -1 -re -i /root/srs_dev/720_filter1.mp4 -c:v h264 -c:a aac -f flv rtmp://172.24.0.75:1935/live/livestream
3. Start pulling the stream: ./objs/sb_hls_load -c 1 -r http://172.24.0.75:8080/live/livestream.m3u8
4. Check the logs for relevant callbacks of on_stop.
Expect (Expected Behavior)
The number of on_stop callbacks should correspond to the number of pulling clients.
Additionally, during testing, it was found that for HLS pulling, the on_stop callback is generated after a certain time. When pulling 20 streams, the last on_stop callback is generated after 4 minutes. When pulling 50 streams, the last on_stop callback is generated after 6 minutes. This is likely related to the HLS protocol, which is an HTTP stateless protocol. Is there any optimization approach to reduce the time it takes for the on_stop callback to be generated after stopping the stream? Thank you.
TRANS_BY_GPT3
The text was updated successfully, but these errors were encountered:
winlinvip
changed the title
hls拉流停止后,产生on_stop回调事件每次都会多一个,如hls拉两路,停止拉流后,产生3个on_stop
API: Duplicated on_stop callback events by HTTP Callback.
Dec 25, 2022
Description(描述)
When pulling HLS streams, after the stream is stopped, an on_stop callback event will be generated. However, each time there will be an extra on_stop event. The client_id in the first on_stop request is empty, while the subsequent ones are not. For example, if one HLS stream is pulled and then stopped, two on_stop events will be generated. If five HLS streams are pulled and then stopped, six on_stop events will be generated.
1. SRS Version(版本):
6.0.6
1. SRS Log(日志):
1. SRS Config(配置):
> Please describe how to replay the bug? (重现Bug的步骤)
1. Configure http_hooks in srs.conf and restart SRS.
2. Start pushing the stream:
./ffmpeg -threads 2 -fflags +genpts -stream_loop -1 -re -i /root/srs_dev/720_filter1.mp4 -c:v h264 -c:a aac -f flv rtmp://172.24.0.75:1935/live/livestream
3. Start pulling the stream:
./objs/sb_hls_load -c 1 -r http://172.24.0.75:8080/live/livestream.m3u8
4. Check the logs for relevant callbacks of on_stop.
Expect (Expected Behavior)
The number of on_stop callbacks should correspond to the number of pulling clients.
Additionally, during testing, it was found that for HLS pulling, the on_stop callback is generated after a certain time. When pulling 20 streams, the last on_stop callback is generated after 4 minutes. When pulling 50 streams, the last on_stop callback is generated after 6 minutes. This is likely related to the HLS protocol, which is an HTTP stateless protocol. Is there any optimization approach to reduce the time it takes for the on_stop callback to be generated after stopping the stream? Thank you.
TRANS_BY_GPT3
The text was updated successfully, but these errors were encountered: