问题描述
我正开始设计可以在网络上任意传输音频的客户端/服务器音频系统。一台中央服务器抽出音频流,x个客户端接收音频数据并进行播放。到目前为止,不需要任何魔术,我什至可以使这种情况与VLC媒体播放器兼容。
I'm in startup of designing a client/server audio system which can stream audio arbitrarily over a network. One central server pumps out an audio stream and x number of clients receives the audio data and plays it. So far no magic needed and I have even got this scenario to work with VLC media player out of the box.
但是,棘手的部分似乎是在同步音频播放。这样所有客户端都可以听到声音同步(只要人类听众认为它是同步的,就可以允许实际延迟)。
However, the tricky part seems to be synchronizing the audio playback so that all clients are in audible synch (actual latency can be allowed as long as it is perceived to be in sync by a human listener).
我的问题是,如果有任何已知的方法或算法可用于此类同步问题(视频可能以相同的方式解决)。我最初的想法是围绕物理机之间的时钟同步,从而创建一个虚拟的主计时器,并以某种方式将音频数据包与之对准。
My question is if there's any known method or algorithm to use for this type of synchronization problem (video is likely solved the same way). My own initial thoughts centers around synchronizing clocks between physical machines and thereby creating a virtual "main timer" and somehow aligning audio data packets against it.
一些已经解决了该问题的产品(但是对于我的总体用例而言仍然不够):
Some products already solving the problem (however still not sufficient for my overall use-case):
最欢迎使用任何指针。
谢谢。
Any pointers are most welcome.Thanks.
PS:似乎早就死了。
PS: This related question seems to have died long ago.
推荐答案
Ryan Barrett在。
Ryan Barrett wrote up his findings on his blog.
他的解决方案涉及使用作为使所有时钟保持同步的一种方法:
His solution involved using NTP as a method to keep all the clocks in-sync:
这篇关于通过网络同步音频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!