Skip to content
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

HLS: Support kickoff player for HLS stream. Unable to kick stream using http-api. #2972

Closed
lbli opened this issue Mar 18, 2022 · 4 comments · Fixed by #3371
Closed

HLS: Support kickoff player for HLS stream. Unable to kick stream using http-api. #2972

lbli opened this issue Mar 18, 2022 · 4 comments · Fixed by #3371
Assignees
Labels
API HTTP-API, HTTP-Callback, etc. HLS For HLS, MPEG-DASH or CMAF. TransByAI Translated by AI/GPT.
Milestone

Comments

@lbli
Copy link

lbli commented Mar 18, 2022

Note: Before asking a question, please read the FAQ (Please read FAQ before filing an issue) #2716

Description
Failed to kick the HLS stream using the API DELETE http://***:1985/api/v1/clients/{id}.

1. SRS Version: xxxxxx
4.0.249

2. SRS Log:

[2022-03-18 18:15:19.951][Trace][18437][e639m802] HTTP #0 172.20.0.146:62045 DELETE http://172.24.0.75:1985/api/v1/clients/o7zw2527, content-length=-1
[2022-03-18 18:15:19.951][Error][18437][e639m802][11] kickoff client id=o7zw2527 error(Resource temporarily unavailable)
[2022-03-18 18:15:19.951][Trace][18437][e639m802] TCP: before dispose resource(HttpConn)(0x27a87b0), conns=2, zombies=0, ign=0, inz=0, ind=0
[2022-03-18 18:15:19.951][Trace][18437][e639m802] client finished.
[2022-03-18 18:15:19.951][Trace][18437][scsv2r69] TCP: clear zombies=1 resources, conns=2, removing=0, unsubs=0
[2022-03-18 18:15:19.951][Trace][18437][e639m802] TCP: disposing #0 resource(HttpConn)(0x27a87b0), conns=2, disposing=1, zombies=0
[2022-03-18 18:15:19.982][Trace][18437][15790dv8] HTTP #0 172.20.0.146:62046 GET http://172.24.0.75:9080/live/livestream.m3u8?hls_ctx=o7zw2527, content-length=-1
[2022-03-18 18:15:19.982][Trace][18437][15790dv8] http match file=./objs/nginx/html/live/livestream.m3u8, pattern=/, upath=/live/livestream.m3u8
[2022-03-18 18:15:19.982][Trace][18437][15790dv8] TCP: before dispose resource(HttpStream)(0x27a87b0), conns=2, zombies=0, ign=0, inz=0, ind=0

> Steps to reproduce the bug:
obs streaming: rtmp://172.24.0.75:1935/live/livestream

vlc streaming:
http://172.24.0.75:9080/live/livestream.m3u8

Streaming can be successfully pulled and viewed normally.

Get streaming client information, then kick the stream using API
DELETE http://172.24.0.75:1985/api/v1/clients/o7zw2527

Returns "code": 400

However, for the same streaming,
if VLC pulls the stream using rmtp://172.24.0.75:1935/live/livestream, it can successfully kick the stream using the API.
If VLC pulls the stream using http://172.24.0.75:9080/live/livestream.flv, it can also successfully kick the stream using the API.

May I ask if SRS does not support HLS API stream kicking, or is there another reason?

Expected behavior (Expect)

Expected API behavior:

Expect the API to support HLS stream kicking.

TRANS_BY_GPT3

@lbli
Copy link
Author

lbli commented Mar 18, 2022

Is it because HLS is connectionless, only downloading index files, so there is no concept of streaming, therefore unable to eliminate?

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented Mar 19, 2022

For consultation and discussion, please join the video live room to communicate. It takes place every Saturday night at 20:00. You can also join the WeChat group for communication within the group.

This issue will be deleted, please read the FAQ first: #2716.

TRANS_BY_GPT3

@winlinvip winlinvip self-assigned this Mar 19, 2022
@zh19900725
Copy link

zh19900725 commented Oct 9, 2022

Has the original poster resolved it? I have also encountered the same issue. HLS is essentially file downloading. It seems that the /api/v1/clients and /api/v1/streams interfaces do not include HLS statistics. I want to know how to selectively kick out video streams in HLS.

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented Dec 25, 2022

If HLS is distributed through NGINX, it requires support for stream eviction on NGINX.

If using SRS distribution, SRS 5 already supports streaming HLS, so it is possible to achieve this capability.

This capability can be considered in SRS 6.

TRANS_BY_GPT3

@winlinvip winlinvip reopened this Dec 25, 2022
@winlinvip winlinvip changed the title hls拉流,用http-api 无法踢流 HLS: hls拉流,用http-api 无法踢流 Dec 25, 2022
@winlinvip winlinvip added this to the 6.0 milestone Dec 25, 2022
@winlinvip winlinvip added API HTTP-API, HTTP-Callback, etc. HLS For HLS, MPEG-DASH or CMAF. labels Dec 25, 2022
@duiniuluantanqin duiniuluantanqin linked a pull request Dec 30, 2022 that will close this issue
@duiniuluantanqin duiniuluantanqin linked a pull request Dec 30, 2022 that will close this issue
@winlinvip winlinvip changed the title HLS: hls拉流,用http-api 无法踢流 HLS: Support kickoff player for HLS stream. hls拉流,用http-api 无法踢流 Jan 2, 2023
@duiniuluantanqin duiniuluantanqin linked a pull request Jan 3, 2023 that will close this issue
@duiniuluantanqin duiniuluantanqin linked a pull request Jan 10, 2023 that will close this issue
@winlinvip winlinvip changed the title HLS: Support kickoff player for HLS stream. hls拉流,用http-api 无法踢流 HLS: Support kickoff player for HLS stream. Unable to kick stream using http-api. Jul 28, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API HTTP-API, HTTP-Callback, etc. HLS For HLS, MPEG-DASH or CMAF. TransByAI Translated by AI/GPT.
Projects
None yet
4 participants