harlanc / xiu

A simple,high performance and secure live media server in pure Rust (RTMP[cluster]/RTSP/WebRTC[whip/whep]/HTTP-FLV/HLS).🦀
https://rustxiu.com
MIT License
1.77k stars 187 forks source link

Is the HLS output stream "live" or cached? #18

Closed raptpz closed 2 years ago

raptpz commented 2 years ago

It seems that HLS chunks are cached in a local folder, so in some conditions it may happen to reproduce "old" content .
How is managed the local cache (.ts chunks) and "m3u8" index file with "live" / real time streams ?

Thank you very much,

harlanc commented 2 years ago

The TS list will keep the latest 6(now is hardcoded) ts trunks, and the old ones will be deleted automatically, the m3u8 file is generated according to the dynamic TS list.

In the future release , XIU will support to configure the value in the configuration file.

raptpz commented 2 years ago

Thank you very much for explanation, I check with a live stream source and the behaviour is correct. Yes, that feature sounds nice: it will also permit to optimize latency for HLS output stream.