About HLS m3u8 and .ts file refresh, and auto delete
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
Hi kazehung,
Please check the documentation on the createHlsStream API command here:
http://docs.evostream.com/ems_api_definition/createhlsstream
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.
Cheers,
Don
http://docs.evostream.com/ems_api_definition/createhlsstream
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.
Cheers,
Don