About HLS m3u8 and .ts file refresh, and auto delete

About HLS m3u8 and .ts file refresh, and auto delete

Support ForumCategory: Usage and FeaturesAbout HLS m3u8 and .ts file refresh, and auto delete
kazehung asked 8 years ago
Hello  In our project , I need make a hls stream for the test, but it’s have a few problems. 1.My stream server VM only have 8GB space for hard drive, so I could not have too many cache for hls stream,  But I never find a command to control m3u8 and .ts file to auto delete too old file.  If any body know how to do it, please give me a hand ,thanks. ps:sorry for I am pool in english,.  

1 Answers
Don answered 8 years ago
Hi kazehung, Please check the documentation on the createHlsStream API command here:

You need to set playlistType=rolling (the default is appending) to prevent .ts files from accumulating.
If necessary, you can reduce playlistLength from its default value of 10 to limit the number of .ts files retained.
Optionally, you can set the staleRetentionCount parameter to a number lower than the playlistLength to reduce the number of retained .ts files further. To cleanup .m3u8 and .ts files before streaming starts, set cleanupDestination=1.
To cleanup .m3u8 and .ts files after streaming stops, set cleanupOnClose=1.



Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.