[LAU] Buffering, soundcard clocks, synchronization, streaming

From: Ken Restivo <ken@email-addr-hidden>
Date: Thu Nov 06 2014 - 13:35:39 EET

I asked this on the liquidsoap list but nobody there seems too interested in this subject.

I have DJ's streaming from various parts of North America and Europe to a Linux VPS in New York.

Many of the DJ's have periodic dropouts where their sound goes away, and its annoying.

The liquidsoap software logs the buffer status at every packet received.

So I've been logging this stuff. I see a strange pattern.

The DJ's streaming from California who have good internet connectivity (some don't; I'm not including them in my data) show a buffer that steadily decreases, until it drops out and there are 2 seconds of the backing jukebox playing, until the buffer catches up.

The DJ's from New York show perfectly solid buffer status. The buffer fills, and stays filled for hours. One DJ even has a buffer that increases in size as his show goes along!

A separate station I've set up, streams from a Linux PC in California to a Linux VPS in California... rock-solid buffer status.

Now, I've been told that the buffer problem is due to clock synchronization on soundcards. Some soundcards on't stream exactly at 44.1khz, they're like 44.0Khz, and that causes a buffer that gradually declines in size, as it's been explained to me.

But!

Why would everyone in California have "slow" soundcards and everyone in New York have "fast" ones? That seems very unlikely.

I'm assuming everyone is using random soundcards, mostly SoundBlasters or HDAINtels. The mix of OS's is very random: two Linux guys, the rest mostly Winbloze, one or two Macs, and there's no geographic pattern. Almost everyone is using the same GPL streaming software-- The BUTT-- though one is using Nicecast I think.

I'm told that the power grid AC mains sync is not uniform across North America and that the east coast is at 60.1Hz or similar, the west coast at 59.9Hz, but that's irrelevant, it's all rectified/regulated +5V by the time the soundcard (and its clock crystal) sees it.

The obvious answer here is just network latency, since one set of DJ's are streaming locally and the others are traversing a continent. And I might just have to do some kind of time-stretching to avoid dropouts.

But what about this business with the sound cards? Is that a red herring?

-ken
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Thu Nov 6 16:15:02 2014

This archive was generated by hypermail 2.1.8 : Thu Nov 06 2014 - 16:15:02 EET