Monday, August 22, 2022

Managing Your Home Network

One of the most important technical aspects of streaming is your connection to the internet. It goes without saying that without that connection, you can’t do a live broadcast. There isn’t much you need to know in order to simply go live. Most home network setups allow for some level of basic livestreaming, especially if you use the default recommended settings in your streaming software. But just because you can go live doesn’t mean there won’t be issues. Home networks have a lot of moving parts. We connect to the internet in more ways than we sometimes realize, and many of those connections can affect the stability of our Twitch broadcasts. 

I’ve spoken before about various ways to improve your stream’s connectivity. In the entry Getting Your Stream Output Settings Just Right, I helped you to understand how your stream is transmitted to the viewer. In Understanding Network Settings for Streaming, I went more in-depth about how to temper your stream’s output expectations to ensure a more stable broadcast. And in the recent entry How Does Your Internet Work?, I elaborated on the very important distinction between upload and download speeds. In this entry, I want to go more specifically into the way your home’s internet allocations are doled out. If you’ve experienced dropped frames or short outages on your streams and couldn’t figure out why, it could be because you’re not properly managing your home network. 


Not to be confused with Bit from the 
movie TRON.

Before talking more about this subject, I should clear something up. You may have been thrown off in the past about the capabilities of your network, because of two unfortunately similar terms. It’s a bit confusing, but Mega
bits aren’t the same thing as Megabytes. The first, megabits, is used to measure the transfer speed of files. The second value, megabytes, measures how large your files are. Simply put for our purposes, megabits measure speed and megabytes measure size. The measurements don’t directly correspond to one another. Kind of like how an ounce isn’t the same thing as a fluid ounce. They sound similar, and they even measure similar things in practical use, but they’re not the same. 

A video on your computer might take up 500 megabytes of hard drive space, and your stream might transfer at 2 megabits per second. When measuring things on your home network, make sure you aren’t confusing megabits with megabytes. You might think, for example, that if you were to upload a gigantic video file to the cloud while streaming, that would be guaranteed to tank your broadcast. However, the size of a file doesn’t technically have any bearing on whether your stream is bothered. The only thing that matters is the speed at which that file is transferred: namely, megabits are what you should be most concerned with. A small file can cause major hiccups in your stream’s connectivity if transferred at high speed, and a massive file can cause no problems at all if transferred at a low speed. As long as you know how to control those speeds, your stream will be unaffected by competing uploads. 


Now I’m going to present a simple example to help demonstrate how home networking works. Let’s say for the sake of argument that your internet service provider gives you an upload speed of 10 megabits per second. Let’s also say that your stream broadcasts at 2.5 megabits per second. So in this example, your stream uses one quarter of your maximum upload speed. 

Now, in this example we’re going to use the (perhaps tired, but very convenient) old metaphor of the internet as a highway. Imagine anything you want to upload as a shipping truck driving along that highway. Our example highway will have four lanes. Now, your stream, which we’ve established uses ¼ of your internet speed, takes up one lane of that four-lane highway. Let’s say it’s the left lane. Because the stream needs to continuously use that amount of data in order to stay live, it’ll be represented by a series of trucks riding one by one, all in a big line in that left lane of the highway. Those trucks are clear to continue driving. Each one will arrive at its destination without issue, because there’s nothing else in their lane and there’s plenty of room on the road. 

Don't let anything run you 
off the road.

But let’s say you want to upload a video to YouTube as well, while your stream is running. Even if it’s a small video, this can cause a problem. The reason for this friction is that many upload tools will use as much bandwidth as they can possibly drain from your internet, regardless of whatever else is using it. This is in the interest of getting your content uploaded as quickly as possible. However, imagine this in our highway example. Even if your YouTube video is relatively small- let’s say it’s represented by four cars rather than a series of trucks- it’s spreading itself all across the road, using all four lanes of bandwidth. And because the trucks representing your stream are in the left lane, these reckless cars suddenly barge into your lane and run you off the road. This, in a nutshell, is how a stream drops frames. Something else is coming in and using up more of the bandwidth space than it should, and there’s no more room for your stream to maneuver. 


There’s a way to prevent this issue, however. Just like how you can choose the upload speed of your stream, you can also manage the upload speed of other content in your home network. Some apps, like the auto-syncing Dropbox, give you built-in tools to decide how quickly files get transferred. You can input a value just like in your streaming software. If you set it to 2.5 megabits per second, like our hypothetical stream example from earlier, all four cars representing your uploaded file would stay in one single lane of the highway, just like your stream does. Since they’re now in single file, it will take longer before the full load of cargo is delivered to the destination, but it won’t cause traffic accidents along the way. Ultimately, that's a lot more valuable. 

Sometimes you can’t natively control the upload speed of your files. Most websites, including YouTube, don’t give any option for how fast your files transfer to their servers. There are third party apps you can use however, which can throttle speeds to your desired value. Some web browsers even feature built-in tools to ensure that uploads don’t get out of hand. Depending on what various devices and software you use, look into what apps or tools are most compatible with your setup. 

Some vehicles specialize in offroading, 
but not when it comes to our
streaming highways.

And of course, if you don’t want to go quite this technical, there’s always the easiest option: don’t start to upload anything immediately before, or during, your streams. This works just fine, though many people don’t have that option. The ‘highway’ of your home network isn’t only populated by your own vehicles, of course. Cars and trucks operated by anyone else in your home will also drive by. You want to make sure there’s ample space for them to pass as well. In other scenarios, you may have automatic transfers which can’t be stopped while going live. My work, for example, requires that I upload very large video files to Dropbox all throughout the day in order to stay synced. In this case, it helps that I can throttle Dropbox’s speeds to prevent stream problems from cropping up. To prove that my statement about large files not causing a problem is true: every stream I've done has had a large video file uploading at the same time. However, there are still no dropped frames, because I've caused the video files to upload at a lower speed.

Whatever your home networking setup looks like, make sure to stay aware of the various ways data might be transferred. As long as you leave enough space for other cars to drive along the highway, and you properly manage whichever vehicles you can personally control, you’ll notice a much smoother ride during your broadcasts. Now get onto the road and enjoy the drive! 

No comments:

Post a Comment