Streaming issues

If you have been watching the Formula Pi streams recently you have probably seen our intermittent issues with streaming. The last broadcast was especially bad with some people loosing the connection altogether!

During the stream we did everything we could short of disconnecting from the internet. Afterwards we decided this meant that the most likely culprits were all related to either our router (a BT business hub), the internet connection itself, or maybe even YouTube... :(

We started by looking at how long it takes a message from us to reach the YouTube servers using the ping program. At first things looked okay, but after a short time we saw this:

Put simply those very large numbers are because some of the messages took a very long time to reach the other end. The worst was over two seconds! This confirmed what we already suspected, the problem is not to do with the streaming software, but our internet connection in some way.

We did another test to see if the issue was with YouTube or the internet in general. This time we pinged YouTube, a US site and a local UK site to see if they all had the same issue:

Sure enough this was not a YouTube issue, but a general issue with either our router or the internet connection itself. We started by using PingLogger to get a graph of what was going on:

As you can see we had some horrendously large spikes, these went away when we restarted the router. However even after the restart we still had a large number of spikes going on.

We used PingPlotter to get some more detail on what was actually going on. This gives us a view where we can see each "hop" on the way between the PC and YouTube:

The graphs at the bottom are:

  1. The time to our router
  2. The time to the cabinet down the road
  3. The complete time all the way to YouTube

At this stage it is plain to see that the problem must be related to our hub in some way, it has the same horrible spikes that we were seeing to YouTube itself!

The first thing we tried was a replacement router (we had another from BT already). Unfortunately we gave up after a couple of hours because the router did not seem to like two of our track cameras. We decided to leave that for another day and see what settings we could change on the old router that may have an effect.

Eventually during our trial and error changes we disabled the BT public WiFi option:

Public Wi-fi Status:	BT Wi-fi - Not active on your BT Hub

The result was nice and clean for an hour after this change:

In fact over that hour our ping times to YouTube never even reached three digits, only spiking to the low thirties. For those who are curious the red triangles on the graph are where the YouTube server IP changed, which we suspect to be their method of load-balancing between several servers.

Today we did some more testing, and things still seem good. We get some spikes occasionally in the low hundreds, but nothing remotely close to what we saw before.

I even did a test while downloading a large amount of data to see what happens when the connection is very busy:

You can see some of these lesser spikes, along with the nosier connection ping over the 15 minute download. This is still more than acceptable for streaming and we are very careful to make sure nothing is using the internet here when we are live.

We think this will be the end of our streaming glitches, we have no need to have the BT public WiFi feature turned on and we would recommend that anyone who has a BT hub at home and is experiencing strange delays or spikes in lag time should also try turning it off to see if it helps.

It just goes to show that sometimes the default settings are not the best choice :)


Geoff Riley's picture

That's a very interesting piece of research that you've done there Arron: I'm going to try disabling the public side channel on my BT hub to see if it makes any difference here.

I have a feeling that with it disabled, BT don't allow us free access to other hotspots. I rarely use any other hotspots, so it's not a worry for me, but it might be for some. I'll see how it goes anyway.


Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre>
  • Syntax highlight code surrounded by the <pre class="brush: lang">...</pre> tags, where lang is one of the following language brushes: bash, cpp, perl, python.
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.