本文介绍了Icecast和Darkice的高音频延迟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在ubuntu机器上成功安装了icecast和darkice,并能够在局域网上进行直播.但令我失望的是它有15秒到20秒的延迟.这是非常差的性能.我不认为这是由于我的局域网连接所致,因为即使我尝试在同一台ubuntu机器上收听,仍然会有延迟!

I have successfully installed icecast and darkice on my ubuntu machine and was able to stream live on my lan. but to my disappointment it has a 15sec to 20sec delay.This is very poor performance. I don't think it is because of my lan connection because even when i tried to listen in that same ubuntu machine there was still a delay!

我尝试将icecast配置为不具有突发大小,这意味着将没有缓冲,这帮助我将延迟减少了大约6秒到8秒.因此,如果您有任何建议或非常好的配置值,对我会有很大帮助.

I have tried to configure icecast to have no burst-size which means there will be no buffering,this helped me reduce the delay to around 6sec to 8sec.So please if you have any suggestions or very good configuration values it would be of great help to me.

P.S我正在流式传输的格式是mp3.有人建议我应该使用opus编解码器,但我不认为icecast或darkice支持它.

P.S the format i am streaming is mp3. someone suggested that i should use opus codec but i don't think icecast or darkice support it.

推荐答案

这并不是很差的性能……这是有意为之的,因此,一旦播放开始,客户端就不会经历重新缓冲. Internet无线电服务器不是为低延迟而构建的.

This is not poor performance... it is deliberate so that clients don't experience re-buffering once playback has begun. Internet radio servers are not built for low-latency.

延迟的原因很多:

  • 捕获缓冲区(
  • 编码缓冲区(〜250ms-1s,具体取决于编解码器)
  • 编码器到服务器的网络传输和缓冲区(
  • 服务器缓冲区(您禁用的缓冲区,通常设置为1MB,根据比特率的不同,时间可能会很长)
  • 服务器到客户端的网络传输和缓冲区(通常小于10ms-1s,移动时间更长)
  • 客户端缓冲区(范围广泛,但通常为2s)
  • 客户端回放缓冲区(

如您所见,其中最大的是服务器缓冲区.您已经消除了这一点,而这就是您所能做的.如果您想要更低延迟的东西,则需要另一种技术.

The biggest of these as you can see is the server buffer. You have eliminated that, and that is all you can do. If you want something with lower latency, you need a different technology.

这篇关于Icecast和Darkice的高音频延迟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-18 21:30