Adaptive bitrate streaming in Next.js (video tutorial)
Last updated: Mar-10-2026
Overview
Learn how to improve video streaming in your Next.js application by adding adaptive bitrate streaming (ABR) using the CldVideoPlayer component from Next Cloudinary. ABR automatically adjusts video quality based on the viewer's network speed and CPU capacity, preventing buffering and keeping playback smooth.
Video tutorial
This video is brought to you by Cloudinary's video player - embed your own!
Use the controls to set the playback speed, navigate to chapters of interest and select subtitles in your preferred language.
Tutorial contents
This tutorial presents the following topics. Click a timestamp to jump to that part of the video.
Introduction to Adaptive Streaming
| Adaptive bitrate streaming (ABR) automatically adjusts video quality based on the viewer's network speed and CPU capacity. This prevents buffering and pausing, keeping playback smooth even on slower connections. |
How ABR Works
| ABR works by switching between different renditions based on real-time network and device conditions. Instead of buffering at one fixed quality, playback adapts to maintain a smoother viewer experience. |
Setting Up in Next.js
| Starting with a basic Next.js application using Next Cloudinary and the CldVideoPlayer component, you can add ABR support with just a few props. |
Implementing HLS and DASH
Add the sourceTypes property to the CldVideoPlayer component with an array containing hls (HTTP Live Streaming) and optionally dash (MPEG-DASH), then apply a streaming profile such as hd using the transformation prop. |
Testing the Setup
| To verify ABR is working, use Chrome DevTools to throttle the network speed (e.g., Slow 3G). The video will load briefly then play at a lower quality instead of buffering. You may need to do an empty cache and hard reload when testing locally. |
Keep learning
- Watch more Dev Hints videos on the Cloudinary YouTube channel.
- Learn more about adaptive bitrate streaming including HLS, MPEG-DASH, and predefined streaming profiles.
- Explore the CldVideoPlayer component in the Next Cloudinary docs.
- See how to embed videos in Next.js with the Cloudinary Video Player.
- Discover how to optimize video delivery for better performance.
If you like this, you might also like...
Check out the Cloudinary Academy for free self-paced Cloudinary courses on a variety of developer or DAM topics, or register for formal instructor-led courses, either virtual or on-site.
