How To Optimize Bitrate For Live Streaming Games

How To Optimize Bitrate For Live Streaming Games

One of the key elements of good live streaming is setting the bitrate. It will determine whether our streams look blurry, choppy, or crisp. In this article, we will cover using Twitch as the streaming platform and Glitch as the streaming tool to demonstrate the effect of different bitrates.

What Is Bitrate?

Bitrate is the amount of data that is streamed from your game to the end user, affecting the quality of the stream. Let's use an analogy to better describe it.

Since ancient times, water-powered mills with spinning wheels have served as a "power" source, from grinding grain to generating electrical power. The power source was the river itself. The bitrate can be thought of as the river, and the spinning wheel as the quality of the video stream.

If the stream was too slow and didn’t have enough power, the wheel wouldn’t turn or would turn too slowly. For our live stream if the bitrate is too low, this could mean no stream shows up, or the video looks "grainy" because there isn't enough data in the stream to create a high quality video.

Conversely, if the river flows too fast, the power produced might be more than the spinning wheel can handle. For live streaming, when this happens, the excess data can cause the stream to be choppy due to too much buffering. The bitrate must be balanced.

Advanced Topic - Variable Bitrates With Netflix

Services like Netflix can send videos a multiple different bitrates. The reason why is the bitrate capacity can change depending on factors like the user's internet connectivity to the device they are using like a desktop vs mobile phone.

Therefore, an adaptive bitrate can be used that calculates a users bandwidth and sends the appropriate video size and and bitrate that is optimized for that user. This make sure the user is always able to watch the media.

How Is Bitrate Measured?

Bitrate is commonly measured in bits per second (bps), which indicates how many bits of video data are processed every second. Video bitrates are often in kilobits per second (kbps) or megabits per second (Mbps) because video files contain a large number of bits.

When writing the bitrate in kbps, it can be written as 2000 kbps, or for Mbps, it would be 2 Mbps. Using kbps allows for more granular control of the bits.

Examples of Bitrate

To illustrate how bitrate functions, below are example videos of varying bitrates playing the first-person shooter game Valorant. The constants in each experiment are:

  • Streaming Destination: Twitch
  • Tool: Glitch Streaming platform, known for its user-friendly codec adjustments
  • Game: Valorant
  • FPS: 60
  • GPU: Nvidia GeForce RTX 3080
  • Chunk Size: 20
  • Encoder: Libx264
  • Resolution: 1920 x 1080

On Glitch’s platform, the bitrate is automatically set based on the resolution and FPS. However, Glitch also allows for manual bitrate settings for other services like Twitch and YouTube. When multicasting, you may encounter a bitrate option as follows:

Below are the various videos at different bitrates:

500 Kbps

2000 Kbps

7500 Kbps

Optimal Bitrates

Bitrates should vary for different games; a slow-paced game like chess will require a different bitrate than a first-person shooter. The most important factors that affect bitrate requirements are the FPS and the video resolution. Some common bitrates based on resolution and FPS are:

- 30 FPS at 720p Resolution - 3500 kbps

- 30 FPS at 1080p Resolution - 4500 kbps

- 60 FPS at 720p Resolution - 5500 kbps

- 60 FPS at 1080p Resolution - 6500 kbps

As a streamer, you will need to adjust these values based on your internet speed, the service you're streaming to, and the game you're playing.