DEV Community

Cover image for Understanding Streaming Video Bitrate
Ilaibavati
Ilaibavati

Posted on • Updated on

Understanding Streaming Video Bitrate

What is Streaming Video Bitrate?

Bitrate (written as bit/s) is the number of bits per second in a video stream. It determines the size and quality of video and audio files. Bitrate is related to file size as follows:

Filesize = bit/s x duration

So the higher the bit rate, the higher the file size and quality. In most cases, 1 byte per second (1 B/s) corresponds to 8 bits per second.

The bitrate of a video affects video quality in many ways. Higher video bitrate results in higher video quality, and lower bitrate results in lower quality. The bitrate video users receive in practice mainly depends on their Internet connection speed and the ability of the streaming computer to encode the video.

Understanding Live Streaming Settings

Below are some of the key technical aspects you should understand to set up a live stream. Determining the right bitrate for your file and streaming platform is a key step when optimizing video for streaming.

Bitrate is a critical factor for any streaming video protocol, including HLS, WebRTC, or MPEG-DASH.

Video Quality

Video quality is typically a critical aspect that can make or break a video. Video quality should be focused on two things: resolution and frame rate. Resolution measures the size of the video on the screen in pixels. An example of high resolution is 1080p, meaning the video takes up 1920 x 1080 pixels. Common resolutions are:

  • 4K (2160p)
  • HD (High Definition)
  • SD (Standard Definition)

Videos are made up of a large number of still images in sequence. Each image in this sequence is called a frame. So if the frame rate of your video is 30fps (frames per second), it will display 30 images per second. The more frames, the smoother the video. If the frame rate is low (15 fps for example), the video will stutter. Ideally, aim to broadcast at a high frame rate of 30 fps or more. For a cinema feel, you can use 24fps, which is the frame rate used when shooting movies.

A higher the resolution = a higher bit rate = a higher a framerate = more hardware resources are required to encode the video while streaming.

Bitrate and Internet speed

Internet bandwidth on the client side is limited. Users can check their Internet download speed by running a test on a site like Speedtest.net. Bitrate refers to the amount of data transmitted through the network in real time. So higher resolutions require higher bitrates.

The video and audio bitrate must always be 20% lower than the download rate to achieve stable live streaming. For example, if the download speed is 10 Mbps, the video and audio must be less than 8 Mbps. However, the higher the resolution, the higher the demand on computing resources.

Run a test before the live stream to ensure stability and quality. Many live streaming apps have presets, so you don't have to be a bitrate expert, but test the default settings and adjust them if necessary.

Encoding & Latency

Encoding converts the video to a format that streaming media platforms can understand. Encoding software typically has presets like “high quality / low quality” or “high speed / low speed” to determine the quality of the stream.

The faster the encoding speed, the lower the video quality, but the easier it is for your hardware to encode the video. Selecting a slower encoding preset can improve quality, but there is a greater delay between what happens in the camera and what the viewer sees.

In addition to configuring the encoding software, define the relevant settings in your streaming platform. On YouTube, the delay as a result of encoding is called a live stream delay. If you need to interact with the viewers in real time, low latency is recommended, but increases the playback buffer. However, if this is not a priority, there will be less buffering, but with slightly higher latency.

How to Choose the Right Bitrate for your Stream

Here are some of the key considerations you should be aware of as you prepare to deliver a live stream to viewers.

Find your Upload Speed

Internet speed is the key to deciding which bitrate option to use. For a quick test, go to Ookla's speed test (speedtest.net) and record your results. What really matters to me is the upload speed in Mbps. Knowing your upload speed can help you determine how much bandwidth is available for streaming.

Note that the unit of video bitrate is Kbps, but the unit of internet speed is Mbps. The conversion is simple:

1000 Kbps = 1 Mbps

If you are streaming multiplayer games, reserve a quota of at least 2 Mbps for the game, on top of the bandwidth you require for streaming, because the game itself needs Internet connectivity to run.

Select your Resolution

The resolution of the stream determines the amount of detail to encode before it is sent to the streaming platform. In most cases it is best to use one the two most popular streaming resolutions: 720p and 1080p.

  • 720p (1280 x 720) resolution is considered HD and is a high resolution that most streamers can easily reproduce.
  • 1080p (1920 x 1080) resolution is considered full HD, and requires more processing power and a higher bit rate. Similarly, without sufficient bandwidth, video viewers may find it choppy.

Select your Framerate

The bitrate and resolution determine the video size, and the frame rate determines the smoothness of the video.

Let’s understand framerate by comparing two types of video games. For fast action games, a suitable framerate is 60 fps or higher, otherwise the action will be choppy. For a slower-paced single player game, 30 fps may suffice.

For video streaming, you should realize that framerate and bitrate work together. You may have to sacrifice resolution to increase the framerate. Framerate will become more important the more fast-paced action occurs in your stream.

Don’t Make Bitrate Too High: Consider Your Users

All streamers should consider that the bandwidth available to their viewers is limited. Even if you have an upload connection of 500 Mbps, do not use a very high bitrate, because this will cause problems for the viewer.

The problem is that some streaming platforms (for example, Twitch) don’t allow users to change resolution unless you are an official partner and the platform performs transcoding for you.

It is not always the case that you should send the best video and users will reduce quality as needed. In reality, the platform may reject the video or may have transcoding issues, which can cause your video to jitter.

How To Choose The Best Bitrate For Youtube, Twitch, and Facebook

Twitch

Twitch set an upload limit maximum of 6000kbps, and this limitation is set in stone. Consider using lower uploads, because Twitch reserves bandwidth for partners. If you are not a partner, your viewers will not be able to use high quality video options.

In most cases, viewers are required to view video quality as uploaded to Twitch’s servers, rather than getting high quality options. To ensure optimal viewing, the download speed of the viewer should match the bitrate of your upload. Since a bitrate of 6000kbps is too high for the majority of viewers, you should use lower bitrate when uploading.

You can limit most of your uploads to 720P at 60FPS. This is highly suitable for high fast action games, and you can also use Twitch’s set up recommendations:

  • Bitrate—4500kbps
  • Keyframe interval—2 seconds
  • Preset—Max Quality
  • B-frames—2
    Here are Twitch bitrate recommendations per upload speed:

  • For 4,000kbps or less—720p 30fps

  • 5,000 kbps or less—720p 60fps

  • 6,000 kbps—900p 60fps

  • 6,000kbps for partners—1080p 60fps

YouTube

YouTube performs automated transcoding for streams, regardless of the number of viewers. That ensures viewers gain access to all quality options, including low options like 360p as well as the highest possible quality. Since there is no limitation, you can stream using high bitrates. Viewers can choose quality options without experiencing buffering issues.

While there’s no limitation to bitrate, you should note YouTube’s recommended streaming resolution ranges. Typically, the higher resolution range can ensure the most ideal viewing experience.

Here is a list of recommended ranges for YouTube:

  • 4K 60fps—use a range of 20,000-51,000
  • 4K—use a range of 13,000-34,000
  • 1440p 60fps—use a range of 9,000-18,000
  • 1440p—use a range of 6,000-13,000
  • 1080p 60fps—use a range of 4,500-9,000
  • 1080p—use a range of 3,000-6,000
  • 720p 60fps—use a range of 2,250-6,000
  • 720p—use a range of 1,500-4,000
  • 480p—use a range of 500-2,000

Facebook

In comparison to YouTube and Twitch, Facebook provides the lowest streaming quality. Note that the maximum video resolution on Facebook is 1080p. YouTube, on the other hand, enables resolutions as high as 4K / 2160p. However, not all streaming is meant for high resolution. You should run some tests to see what works best for your setup.

Here are the video format guidelines recommended for Facebook Live:

  • Recommended max Facebook bitrate—4000 Kbps (4 Mbps)
  • Max resolution—1080p (1920×1080) resolution at 60 fps.
  • An I-frame (keyframe)—must be sent at least every 2 seconds throughout the stream
  • Titles—must have fewer than 255 characters or the stream will fail
  • Use H264 encoded video and AAC encoded audio-only

Conclusion

Bitrate is a number that influences the quality and speed of video streaming. In order to provide your users with good video quality and loading speed, you should carefully choose the right bitrate for your stream. There are different specs for each platform, as explained above for Twitch, YouTube, and Facebook. If you are using another streaming platform, be sure to check out their specifications and set the appropriate bitrate.

Top comments (2)

Collapse
 
vigneshbs profile image
Vignesh

This article provides a clear and concise explanation of streaming video bitrate, making it easier for both content creators and viewers to understand the importance of this technical aspect in delivering high-quality video content.

Read about the Upload Speed Video Streaming to get high-quality video streaming outputs.

Collapse
 
scarlettjohnson6321 profile image
scarlettjohnson6321

Bitrate plays a vital role in online video platform ensures the greatest possible video quality & crystal viewing experience regardless of internet connectivity, devices or software.