This is the second in a three-part imgix blog series covering streaming video: part one - its value, part two - how adaptive bitrate streaming makes streaming video work, and part three - the HTTP live streaming/HLS standard. imgix will be adding streaming video optimization in 2022 — if you foresee a need for this, contact us at firstname.lastname@example.org.
You fill your website with compelling images to enhance the customer experience. You know how critical it is to manage file sizes and to optimize your images for the fastest downloads and greatest-possible resolution. And you’re probably noticing how quickly videos are supplementing and sometimes replacing images. As suggested in the preceding blog, if a picture is worth a thousand words, a video is worth untold static images.
As e-commerce, social and sharing, and news and media sites create more video content, the goal for optimizing video content is the same as with images: enable the fastest downloads for the greatest-possible resolution. The key technology to achieve this with videos is adaptive bitrate streaming (ABS).
When you had to wait for video-on-demand (VOD)
The easiest way to understand ABS is to remember the evolution of video on demand (VOD). Before broadband became widely available, if you wanted to watch a video, you clicked and waited as the entire file downloaded to your device. Maybe it took a few minutes, maybe a few hours, and you did something else while the transfer took place. After the entire file downloaded, you opened your video player app and watched.
VOD got faster, but getting quality was complicated
When networks got faster, progressive downloads entered the picture. It started with JPEG images—high-resolution photos would slowly become sharper as data arrived. Video players got smart enough to play content as it was downloading, and the network was fast enough to support a better user experience.
The limitation of a progressive download was that there was only one file size available for all devices. The content provider made a decision about the file’s quality (size) and users took what they could get. A huge MP4 played well on big-screen TVs but on a smartphone over a cell network, forget it. And if the content provider decided to post a small file that everyone could download quickly, it might work great for a smartphone user, but anyone watching a full screen experienced blurry and pixelated footage.
Finally—responsive video with ABS
So many networks, so many devices, so many uncontrollable conditions. Users driving across town, ranging from one cell tower to the next. Users sitting in home theatres with their gaming desktops hooked up to fiber. Crazy network traffic. How does a content provider adapt?
Your connection speed limits how fast data can move from the source to the device. An ethernet cable connected to a fiber optic line is fast, on the order of one or two Gigabytes per second (Gbps). Whereas a shared WiFi connection at your local coffee shop or library could go as low as 1Mbps, or nearly 1000 times slower. Delivering content smoothly across this range of speeds can be quite the challenge.
Adaptive streaming is about recognizing the connection speed at any given moment and responding accordingly — sending less data when the connection is slow and more data when the connection is fast. This recognition and response is the magic of ABS.
Abracadabra — one file serves everyone
When you click a link to watch a video, your device communicates with a web server. Web servers and their client devices constantly communicate via HTTP requests and responses. That exchange includes critical factors to streaming video: the connection speed, the device’s CPU and memory capacity, and the device’s screen resolution.
The web server then communicates with a server that performs video encoding and transcoding. Encoding is compressing a file, transcoding is changing it to a different format. Based on the web server’s request, the encoder processes the original file and responds with a video stream that matches the needs of the viewer’s device, sized according to network and device conditions.
With ABS, as conditions change, the encoder will instantly change what it’s streaming. When the viewer is close to a cell tower, they’ll get a 4K stream. When they get farther away, they’ll get an HD stream. Further away, an SD stream, and back and forth. The stream constantly adapts to changing connection speed.
Can you repeat that?
- You click a video link.
- An HTTP request goes to your web server.
- Your web server requests a video from the encoder.
- The encoder sends a small chunk of the video and the web server forwards it to your device.
- Your device acknowledges receiving the data.
- Your device calculates how fast your connection is and requests an appropriate quality stream from the encoder.
- And over and over and over again until you’re done watching the video.
The essential business value of ABS and encoders/transcoders
It’s valuable to understand the technology but what’s most important is to understand its value — how it impacts your business. If your website offers visual content, ABS is essential to an optimized customer experience. When someone views your products, you want them to have an uninterrupted experience with the best graphic quality possible. It’s that simple, regardless of the complexity of the technologies behind it.
And to reach as many different customers as possible, just-in-time encoding and transcoding ensures graphic quality as devices, formats, and codecs proliferate. It future-proofs your content.
Our next blog will get yet more technical and explain HTTP live streaming/HLS, the most popular method of ABS. And again, if you’re thinking about how imgix can deliver a top streaming video service, contact us at email@example.com.