Of all the calamities that can occur on stream, lag is one of the most common and most annoying to wrestle with. There are many potential reasons for why lag occurs, all of which require different sets of solutions.
Though I plan on covering all three major sources of lag, we’re going to cover just network lag in this guide. The post got incredibly long just covering the ways one can troubleshoot their networking difficulties, so we’ll focus on that. If your stream is suffering from network lag, try out some of these tips!
How do I know I’m suffering from network lag?
There are three types of lag that can wreak havoc in your stream: network lag, rendering lag, and encoder lag. Network lag is caused by your network being unable to transfer data fast enough to your ingest server. Rendering lag is caused when the CPU is unable to render frames fast enough. Encoding lag occurs when the GPU is unable to encode frames fast enough.
When I stream in OBS, I keep the Stats widget on my dashboard so that I can track performance in real time. As frame drops occur, this will tell you what the source of the issue is related to your network, how frames are being rendered, or how frames are being encoded. For this case, you’re looking for the numbers of Dropped Fames (Network) to rise.
If you’re checking after the fact, OBS and Streamlabs OBS record log files every time you use the software. These files can be critical in isolating potential issues, even if they can be a nightmare to read at times. You can find the files here:
OBS: C:\Users\[Your PC account name]\Roaming\obs-studio\logs
Streamlabs OBS: C:\Users\[Your PC account name]\Roaming\slobs-client\node-obs\logs
Look for the timestamps that align with any problematic streams you’ve had and start there. For the sake of this discussion, search for the term “lag” in that log file. It will break down how many frames were lost by each type of lag, along with a percentage of frames impacted by that factor. Again, if most of the dropped frames came from the network, the logs will tell you.
Network lag occurs when your online connection is unable to upload your stream to the server at a fast enough rate. Before you take any drastic actions, the first thing you want to do is an internet speed test. In particular, look at your upload speed test scores. Do you have enough bandwidth to broadcast at your current resolution and frame rate? Below is a rough guide on how much bandwidth you’ll need, though I’ll also provide a link with more detailed specs.
1080p 60fps: 6,000 kbps (6 MB/s)
720p 60fps: 4,500 kbps (4.5 MB/s)
720p 30fps: 3,000 kbps (3 MB/s)
If you’re trying to stream at 1080p 60fps and your fastest recorded upload speed is 3MB, it’s not going to work. Lower your bitrates, resolutions, and frame rates to get your output below the threshold.
If your max upload speed is below 3,000 kbps, you’re really cutting it close. You may need to drop your resolution to 420p and your bitrate to somewhere around 1,500 just to get something live. However, your image quality will be greatly compromised, especially with fast action games. Should your upload speed be too slow for the standards you want to aim for, you might need to reach out to your ISP and upgrade your plan.
If your tests have an acceptable level of upload speed, but your stream is still lagging. Try these tips:
Use a wired connection: Wireless connections are generally slower and more prone to packet loss, which will create lag. Plug your streaming PC directly into your router.
If you can’t use a wired connection: I strongly advise against streaming wirelessly. But if you have no choice, consider doing the following:
- Move your router as close to your streaming PC as possible
- Use a wifi extender if you’re far away
- Disconnect all other wifi devices that could be eating up precious bandwidth
- Stream over 5G and move all your other devices to the 2.4 channel
Set your ingest server to the one closest to you: If you’re located in New York and uploading to the ingest server in Miami, you’re not getting the most optimal path. OBS can automatically set that for you, but double-check to see that nothing kooky is going on.
Adjust your firewall settings: Your firewall or antivirus software might be throttling your data transfer. Make any adjustments needed to ensure that it’s not interrupting your broadcast.
If all of that fails…
It might have to do with something between your ISP and Twitch/YouTube/your streaming platform of choice.
Try a tool called TwitchTest. This tool allows you to test your connection bandwidth and quality with multiple servers at once. The key metric here is quality, as a server needs to score 80 or above in order to broadcast without severe issues. There was a time when my scores were all zeroes, despite my bandwidth metrics scoring really high. Won’t matter if the quality isn’t there.
At this point, you’re probably going to have to complain to your ISP. That’s what I had to do in order to resolve this issue. They’ll do a number of tests with you on their end. The thing that ultimately proved that the issue was on my ISP and not on me was…
Streaming with a VPN
In rare cases where your ISP and Twitch/YouTube are struggling to transfer data through optimal routes, you might get a better performance through VPN. VPN access will cost you, though it’s fairly cheap, does give you added security, and may provide better streaming performance due to VPNs routing data differently.
Again, this is not the definitive list of everyt possible solution. I encourage you to do more research and find the solution that works for you. Next week, we’ll cover off how to handle rendering lag and encoding lag!
[Purchasing through this Amazon affiliate link gives me a small commission without adding any extra cost or effort to you. Thanks for your support!]