...
Code Block |
---|
|
curl -s http://localhost:8082/test/test.m3u8
sleep 1
curl -s http://localhost:8082/test-240p/test-240p.m3u8
sleep 1
curl -s http://localhost:8082/test-480p/test-480p.m3u8
sleep 1
curl -s http://localhost:8082/test-720p/test-720p.m3u8
sleep 1 |
HLS segments
...
storage
Using disk
By default, HLS segments are written to server hard drive to the /usr/local/FlashphonerWebCallServer/hls folder. The number of stored segments corresponds to the specified playlist size, 10 by default
Code Block |
---|
|
hls_list_size=10 |
The less segments number, the less playback latency. However subscribers with poor channel could request HLS segments which are already gone from playlist and disk if playlist is short. To fix it, since build 5.2.581 the certain number of segments can be stored on disk after they gone from playlist. This feature can be enabled by the following parameter
Code Block |
---|
|
hls_hold_segments_before_delete=true |
By default, 5 last segments will be stored
Code Block |
---|
|
hls_hold_segments_size=5 |
For example, if playlist contains 3 segments
Code Block |
---|
|
#EXTM3U
#EXT-X-VERSION:8
#EXT-X-TARGETDURATION:11
#EXT-X-MEDIA-SEQUENCE:15
#EXT-X-DISCONTINUITY-SEQUENCE:1
#EXTINF:3.415,
test_017.ts
#EXTINF:10.417,
test_018.ts
#EXTINF:9.084,
test_019.ts |
3 current segments and 5 previous segments will be stored on disk
Code Block |
---|
|
test_012.ts
test_013.ts
test_014.ts
test_015.ts
test_016.ts
test_017.ts
test_018.ts
test_019.ts |
Using memory
Under high load, for example on HLS streaming dedicated server, segments reading from hard drive to send them to subscribers can increase the latency. In this case, HLS segments storing in memory should be enabled
...