srs
srs copied to clipboard
HLS: restore HLS information when republish stream.(#3088)
Feature
HLS continuous mode: In this mode HLS sequence number is started from where it stopped last time. Old fragments are kept. Default is on.
Configuration
vhost __defaultVhost__ {
hls {
enabled on;
hls_path ./objs/nginx/html;
hls_fragment 10;
hls_window 60;
hls_continuous on;
}
}
Due to the HLS state recovery, it is necessary to parse the m3u8 files on the disk, which also involves the recovery of various states of HLS. From a broader perspective, it is not suitable for SRS to do, which is very similar to DVR.
Of course, SRS has also implemented DVR FLV and MP4, because sometimes it is necessary to have various basic functions and capabilities for convenience. Unfortunately, it is not possible to implement a more complete capability in SRS, because SRS is a C++ server, and it is difficult to customize the business.
The best solution is to use Go with SRS in the SRS Stack, just like the recording we implemented in the SRS Stack, which includes recording to local disk, DVR to cloud storage, and even a VoD cloud on-demand system.
In summary: HLS status recovery can be implemented in SRS, but only basic recovery capabilities are implemented to keep it simple, and full coverage testing is required. Complete HLS recovery capabilities are implemented in the SRS Stack.
TRANS_BY_GPT4