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

After the RTMP streaming of the video source stops, can the corresponding HLS files m3u8 and ts be cleaned up? #209 #209

Closed
xxxman2008 opened this issue May 11, 2015 · 5 comments
Assignees
Labels
Enhancement Improvement or enhancement. Feature It's a new feature. TransByAI Translated by AI/GPT.
Milestone

Comments

@xxxman2008
Copy link

xxxman2008 commented May 11, 2015

https://github.com/winlinvip/simple-rtmp-server/issues/209

TRANS_BY_GPT3

@xxxman2008 xxxman2008 added Feature It's a new feature. question labels May 11, 2015
@xxxman2008 xxxman2008 added this to the srs 2.0 release milestone May 11, 2015
@winlinvip
Copy link
Member

winlinvip commented May 30, 2015

The cessation of RTMP streams does not necessarily mean the termination of the service. However, there are two situations in which cleaning can be done:

  1. Files can be cleaned after a certain period of time when the RTMP stream stops.
  2. When the server stops.

TRANS_BY_GPT3

@winlinvip winlinvip reopened this May 30, 2015
@winlinvip winlinvip added Enhancement Improvement or enhancement. and removed question labels May 30, 2015
@winlinvip
Copy link
Member

winlinvip commented May 30, 2015

        # the timeout in seconds to dispose the hls,
        # dispose is to remove all hls files, m3u8 and ts files.
        # when timeout or server terminate, dispose hls.
        # default: 300
        hls_dispose     300;

Add a new option to set the timeout for HLS, with a default value of 5 minutes. If there is no stream for 5 minutes, all existing HLS files will be cleared.

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented May 30, 2015

When the server stops, clean up HLS segments.

winlin:srs winlin$ ll objs/nginx/html/live/livestream
total 1784
-rw-r--r--  1 winlin  staff  576784 May 30 13:38 1432964311500.ts
-rw-r--r--  1 winlin  staff  330880 May 30 13:38 1432964326198.ts.tmp
-rw-r--r--  1 winlin  staff     159 May 30 13:38 live.m3u8
winlin:srs winlin$ time ./etc/init.d/srs stop
Stopping SRS(pid 13213)...                                 [  OK  ]
SRS stopped by SIGTERM                                     [  OK  ]


real    0m0.470s
user    0m0.035s
sys 0m0.049s
winlin:srs winlin$ ll objs/nginx/html/live/livestream
winlin:srs winlin$ 

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented May 30, 2015

Already resolved. Restart and clean up HLS when there is no flow timeout.

TRANS_BY_GPT3

@xiayongtao
Copy link

xiayongtao commented Sep 29, 2016

Which version of the code added the mechanism to delete HLS? I downloaded the develop code and restarted, but it still doesn't work. The configuration should be correct, right?
image

TRANS_BY_GPT3

@winlinvip winlinvip self-assigned this Aug 26, 2021
@winlinvip winlinvip changed the title 视频源RTMP推流停止后,对应的HLS文件m3u8、ts能否清理掉? #209 After the RTMP streaming of the video source stops, can the corresponding HLS files m3u8 and ts be cleaned up? #209 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
Enhancement Improvement or enhancement. Feature It's a new feature. TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

3 participants