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 cleanup not working #265

Closed
hpms1972 opened this issue Oct 6, 2013 · 11 comments
Closed

HLS cleanup not working #265

hpms1972 opened this issue Oct 6, 2013 · 11 comments

Comments

@hpms1972
Copy link

hpms1972 commented Oct 6, 2013

Hi,

i have the problem that hls_cleanup is not working at all, nginx does not delete anything, the path with the fragments is getting bigger and bigger until the is no space left on the disk
Here is my config:

        hls on;
        hls_path /tmp/hls;
        hls_fragment 10s;
        hls_playlist_length 10s;
        hls_cleanup on;

I used different settings for hls_fragment and hls_playlist_length but that does not change anything. Even with the above settings in a short time i get easily over 100 fragments without one of them is getting deleted.

Nginx is running on an RaspberryPi with an Arch-Linux.
Any ideas?

Thanks,
hpms1972

@arut
Copy link
Owner

arut commented Oct 6, 2013

what's in error.log?

@hpms1972
Copy link
Author

hpms1972 commented Oct 6, 2013

Unfortunately the error.log is empty.

@arut
Copy link
Owner

arut commented Oct 7, 2013

Then full debug log
However most probably it's configuration issue. Please check your configuration once again.

@towolf
Copy link

towolf commented Oct 7, 2013

He got the config from me: It's posted here (sorry for the bad colors)

We checked the GOP period also. The cam sends a keyframe every 250 frames at 25 fps so that should divide into neat 10s chunks.

@hpms1972
Copy link
Author

hpms1972 commented Oct 7, 2013

So now i made a full debug log for a time period of approx. 12 min. (started at 18:34, ended at 18:46), 71 fagments where made in this time with the above posted settings, with 'grep cleanup' i get the following output:

[root@alarmpi tmp]# grep cleanup nginx.error.log
1970/01/01 00:00:18 [debug] 234#0: hls: cleanup path='/tmp/hls' playlen=10000
2013/10/07 18:46:13 [debug] 233#0: run cleanup: 017D6F50
2013/10/07 18:46:13 [debug] 233#0: cleanup resolver
2013/10/07 18:46:13 [debug] 232#0: run cleanup: 017D6F50
2013/10/07 18:46:13 [debug] 232#0: cleanup resolver

Are there more interesting parts you may want to see?

Thanks,
hpms1972

@towolf
Copy link

towolf commented Oct 7, 2013

Here's the full log he sent me in email (3MB gzipped)

http://ftp.tuebingen.mpg.de/pub/kyb/towolf/raspberry-camera-streaming/resources/nginx.error.log.gz

@towolf
Copy link

towolf commented Oct 7, 2013

Err, why does it say: playlen=10000?

note to self: milliseconds

@towolf
Copy link

towolf commented Oct 7, 2013

Does it matter that on startup the clock is still set to 1970-01-01?

It might be that NTP network time comes later. It is visible in the log.

@hpms1972
Copy link
Author

hpms1972 commented Oct 7, 2013

Indeed the time seems to be the problem.
When nginx starts after time-sync all works fine.

Many thanks to towolf and arut.

@arut arut closed this as completed Oct 7, 2013
@jhanvi22
Copy link

I have the same issue.
I have set hls_cleanup on; in nginx conf file.
Still it is not removing old hls segments. How did you fix it?

@Krautmaster
Copy link

why closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants