We’ve all been in situations where a video would end up taking forever to buffer. You’d rather leave the video platform than be patient enough to sit through a poor-quality stream. As a user, you always have the option to go to another platform. But as a video platform, this can be really bad news, as you end up losing your important users.
Poor quality streams usually happen when your internet speed fluctuates and your video starts buffering. Buffering happens due to the fact that your internet can’t download the video files fast enough to keep with the video playback. This is why in a lot of players, you get the option of choosing a different bitrate. You can switch to the right bitrate according to your internet. But choosing it manually can itself be a hassle. This is where Adaptive Bitrate Streaming comes in. With ABR, your player detects any changes in the internet speed and automatically switches over to the right video bitrate in real-time.
In this article, I’ll talk about what adaptive bitrate streaming is and how it works. Then I’ll take a deep dive into adaptive streaming profiles and how to implement ABR.
Setting the context: What might happen when you don’t have Adaptive Bitrate Streaming (ABR)?
Before I explain ABR or adaptive bitrate streaming, let’s talk about why did the need arise.
Earlier video playback used, “progressive streaming”. Progressive streaming or “progressive video streaming” as we call it refers to the streaming of one single video file over the Internet.
This kind of streaming uses one video file only irrespective of the device. The video streaming app might adjust the video to fit different screen sizes. However, there’s never another video file or another version of it.
How does that impact the user experience? The impacts are as follows:
- Video quality: A 1280 x 720 pixel (px) video will play satisfactorily on a device with the same screen size. It can’t have that video quality on a device with a 1920 x 1080 px screen. The app will stretch the video. Users will see “pixelation”. Pixelation refers to fuzziness in computer graphics due to enlarging images.
- Buffering: When a video pauses, we call it “buffering”. Users might have a poor-quality internet connection. They might not be able to download videos quickly enough. The video pauses, and it waits for more data. The video playback then restarts. Buffering adversely impacts the user experience. Mobile users commonly face this scenario since the Internet connection may be poor in some locations.
Adaptive bitrate streaming solves these problems, and I’ll shortly go into more details.
Bitrate: What it is
Bitrate refers to the rate at which bits of data travel over a network connection from one computer to another. Faster Internet connections have higher bitrates than slower Internet connections.
Video bitrate is the amount of data needed to encode one second of video. Megabits per second (Mbps) is the unit to measure bitrate.
A high video bitrate results in a high-quality video streaming experience. A low video bitrate lowers the quality of the video streaming experience.
HD videos need bitrates in the range of 5-20 Mbps. Standard-definition videos require bitrates in the 1-6 Mbps range. High-quality web videos require bitrates of approximately 2 Mbps. Video bitrates can be either constant or variable in certain cases, it depends on the use case, find out more about CBR vs VBR, in the article linked.
What is Adaptive Bitrate Streaming(ABR)?
Adaptive bitrate streaming is a video streaming technique where you offer various streams with different bitrate to your users. The player detects any fluctuations in the network speed along with the device’s processing to automatically chose the right bitrate for streaming in real-time.
It solves the problems, earlier “progressive streaming” caused due to only allowing a single stream.
ABR allows you to create multiple bitrates for a single video. You’ll have different video quality based on your device’s capacity. This means that if you want to target devices with a 1920 x 1080 px screen size, then they create another video file for it. Similarly, you can create video files for screen sizes 1280 x 720 px, 854 x 480 px, and 426 x 240 px i.
ABR solves the problem of buffering with the help of a trade-off. Recall that buffering happens when a poor internet connection prevents the app from downloading a video file fast enough. Online Video players typically need to download 24 frames per second to avoid buffering. In cases of sports or even graphic-intensive videos this can further rise up to 60fps or more
ABR switches to a smaller video bitrate file when the Internet connection is poor. Note that smaller videos can be downloaded quicker than larger videos.
Consider the example of a video to be played on a device with a 1920 x 1080 px screen. ABR will play a 1920 x 1080 px video when the Internet connection is good. It will use a 1280 x 720 px video when the Internet connection is poor.
Users will see a video of lower quality in that case. However, a temporary downgrading of quality is better than buffering. Users typically accept this trade-off. Adaptive bitrate streaming adapts to the Internet connection of users to solve the problem of buffering.
As you can see, users benefit from higher video bitrates when the Internet connection is good. They get a high-quality video streaming experience. On the other hand, lower video bitrates prevent buffering when the Internet connection is poor.
How Does ABR streaming work?
By now, you can see that ABR streaming allows broadcasters to offer multiple video streams. These video streams have different bitrates. The player detects fluctuations in the Internet connection and serves the right file.
The key concept in ABR streaming is adaptation. Some questions might pop up in your mind such as: Which video is most suitable to a user at a given point in time? How does the ABR decide the quality of the video when the quality of the Internet connection changes?
ABR uses segments of a video file for this. The creation of these segments takes place during the video encoding. Video encoding refers to making a video file smaller by compressing it.
Segments in ABR streaming are typically 4 seconds long. They can be shorter or longer than that though. The video playback software plays one such segment, and then it switches to a different segment.
Adaptive bitrate streaming proactively prepares for the fluctuation in the Internet connection of users. It allows video broadcasters to create different video files from one video file. These different video files correspond to different bitrates.
When a user has a good Internet connection, the ABS technology shows a high-quality video segment. That segment large enough for the screen of the users’ device. When the quality of the Internet connection degrades, the ABS technology picks up a video file segment that’s smaller than the screen size of the users’ device.
As we explained earlier, this results in a temporary degradation of the video quality. The application can download 24 frames-per-second of this smaller segment even in a degraded Internet connection though. This trade-off prevents buffering.
Adaptive Streaming Profiles: What they are
We talked about ABR enabling broadcasters to create different formats of one video file. They do this to cater to different video bitrates. Broadcasters use adaptive streaming profiles for this.
An adaptive streaming profile is a set of variations across different parameters. The parameters for this are as follows:
- The type of network: Cellular phone, WiFi, etc.;
- Dimensions in pixels: The commonly used dimensions are 480×320, 416×324, 480×270, 640×360, 960×540, 1280×820, and 1920×1080;
- Video frame rate;
- Total bitrate;
- Audio bitrate;
You can’t really have one ideal adaptive streaming profile that caters to all situations. The type of network, the quality of the Internet connection, device, etc. vary. Broadcasters need to use different streaming profiles for different scenarios.
The Key Steps In The Working Of ABR Streaming
The working of ABR involves the following key steps:
- The preparation of video files: Broadcasters prepare video files for ABR. They use video encoders to encode video files to different bitrates depending on the target streaming profile. All well-known video platforms can create different video formats from one source video file.
- Starting up the video player: Online Video players need to download a manifest file for video playback. This file contains the streaming profile information about the video segments. Manifest files act as guides. Video players use them to request the video segments that are suitable for different devices and Internet connections.
- Dynamic playback: This is where a video player plays back a video segment and downloads the next segment. Video players use their algorithms to decide which bitrates they should use next. E.g., “throughput” and “buffer” are two common types of algorithms.
Implementing Adaptive Bitrate Streaming: The Key Considerations
Developing a video streaming app using ABS involves the following key steps:
1. Choosing the appropriate video streaming protocol
Video streaming protocols are software programs containing standardized rules for delivering video files over the Internet. You can choose one of the following streaming protocols:
- MPEG-DASH (Moving Pictures Expert Group-Dynamic Adaptive Streaming of HTTP): This is a modern video streaming protocol that’s suitable for ABS. Many video playback platforms support MPEG-DASH. It’s video and audio codec-agnostic.
- HLS (HTTP Live Streaming): Apple developed HLS, which is a popular video streaming protocol. It supports ABS, and many popular video playback platforms support this protocol. It supports important video and audio codecs.
2. Choosing the range of bitrates to offer
We recommend that you offer at least the following bitrate ranges to stream videos:
- 400 Kbps – 1,000 Kbps: for 360p videos;
- 500 Kbps – 2 Mbps: for 480p videos;
- 1.5 Mbps – 4 Mbps: for 720p videos;
- 3 Mbps – 6 Mbps: for 1080p videos.
3. Choosing video playback frameworks
- Video.js: It’s a free and open-source framework that supports ABS. Video.js supports HLS and MPEG-DASH. It supports HTML5 too.
- HLS.js: HLS.js is a free and open-source video playback framework that supports ABS. It supports the HLS protocol.
- DASH.js: DASH.js is an open-source and free video playback framework. It supports ABS and the MPEG-DASH protocol.
The Benefits Of Adaptive Bitrate Streaming
ABR offers the following advantages:
- Optimal streaming experience: With ABR, viewers don’t need to content with buffering even when they have a poor Internet connection.
- Quicker start-up: ABR streaming starts with a low bitrate stream, therefore, the video playback starts immediately.
- Better streaming experience on smartphones and tablets: Lower processing powers on smartphones impose constraints, however, ABR ensures optimal streaming experience on these devices too.
- Compatibility: ABR utilizes HTTP for delivery, therefore, it works with most web servers and CDNs (content delivery networks).
Adaptive Bitrate Streaming Player By VdoCipher
Now that we’ve gone through the importance of ABS, you would’ve realized how vital ABS is for video playback. Implementing ABR on your own can be quite tricky. Especially when you don’t have the right resources for it. Right now a lot of video platforms, outsource their video infrastructure from a more experienced tech partner. This allows them to do what they do best, i.e. creating quality content.
VdoCipher’s html5 player enables you to provide adaptive bitrate streaming for your users. When you upload your videos on our platform, we ensure that through video transcoding, different bitrate qualities of your videos are created. This ensures that you deliver content to your users seamlessly regardless of their internet connection speed. Since your videos are hosted using VdoCipher, it doesn’t put an extra load on your servers.
You can easily add the videos to your website using our embed codes. You also get SDK integrations for iOS and Android apps. Also, if you’re looking to ensure video protection, VdoCipher would be the safest bet you ever made. With our Hollywood Grade DRM encryption, you can rest assured that your videos can’t be downloaded. On top of it, you get screen recording protection on iOS and Android apps, which ensures that no one can screen record on these devices. Even after that, we have dynamic watermarking, which discourages screen capture on the website.
We’ve helped 2000+ customers in over 40+ countries, and we’d be glad to have you on board. If you are interested, you can click on the signup link and experience it yourself with our 30 days free trial.
So far, I’ve explored why adaptive bitrate streaming is required to ensure smooth playback for your users. Then I further went into how it actually works. You’d have a fair understanding of how it works, in case of any questions feel free to reach out in the comment section down below.
If you’ve got any friends or colleagues trying to learn more about ABR, feel free to share this article with them. We’ve also written various articles on Video tech, do go through them and let me know what you think.
Supercharge Your Business with Videos
At VdoCipher we maintain the strongest content protection for videos. We also work extremely hard to deliver the best viewer experience. We'd love to hear from you, and help boost your video streaming business.
Head of Digital Marketing at Vdocipher. I love the art of connecting the right product to their users. When i’m not doing that i love getting lost in books.