Reduce HLS latency from +30 seconds

元气小坏坏 提交于 2019-12-02 19:47:29

I once had the same problem. I added two parameters in nginx.conf then the latency was cut to 10s even less. Here is my conf:

    application hls {
        hls_playlist_length 4s; 
        hls_fragment 1s
    }

However, I have to say 10s seems to be our limitation. Any better solutions?

The answer detailing reducing the hls_playlist to 4s and the hls_fragment to 1s is good. However, it is important to note that if the source video has a key frame interval greater than the hls_fragment length then nginx will usually have to create longer fragments and the latency will increase.

The lowest latency we have achived was with the hls_fragment at 1s and the source video key frame interval also at 1s. With these settings we achieved latency of less than 7 seconds.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!