Open farfelu opened 8 years ago
Same thing happens for HLS m3u8 playlist.
Yeap. It's wrong cache cleanup logic.
Also if you have set open_file_cache on;
- set it off for http location.
Can you try code from 82-fix-playlists-cleanup
branch?
And try to set keyframe / GOP interval on publusher/encoder to fragment length.
82-fix-playlists-cleanup
seems to work, init/manifest files no longer get deleted.
Merged #82 to master.
I'm still seeing this with the latest master. DASH init files disappear occasionally while the stream is still publishing.
Try latest dev
branch - merged some cleanup fixes for nginx-1.11.5+
Note that I'm still on 1.10. I assume the init segments can get accidentally deleted right after they're written, before the playlist is first created.
So as a workaround I now try to leave them around for another cleanup cycle rather than risk deleting them while still needed.
diff --git a/dash/ngx_rtmp_dash_module.c b/dash/ngx_rtmp_dash_module.c
index 13d6572d662c0a90..1038ae285272fc58 100644
--- a/dash/ngx_rtmp_dash_module.c
+++ b/dash/ngx_rtmp_dash_module.c
@@ -1565,7 +1565,7 @@ ngx_rtmp_dash_cleanup_dir(ngx_str_t *ppath, ngx_msec_t playlen)
"dash: cleanup '%V' allowed, mpd missing '%s'",
&name, mpd_path);
- max_age = 0;
+ max_age = playlen / 500;
} else if (name.len >= 4 && name.data[name.len - 4] == '.' &&
name.data[name.len - 3] == 'm' &&
That line already in latest code from dev
branch.
Need to re-test cleanup of init segments.
Trying to stream DASH I found out that the [streamname]-init file gets deleted when having a low dash_playlist_length set
it does not happen with the default of 30s.
my config on nginx 1.9.9
the manifest and init file vanish on every other cleanup. I couldn't really tell when, it's not happening all the time. on the next chunk the manifest file gets recreated, but the init file stays deleted. no one can connect to the stream afterwards anymore because of it.