Adaptive Bitrate Streaming (ABS) automatically adjusts video quality based on each viewer's network speed and device capabilities. This eliminates buffering, speeds up playback startup, and delivers the best possible experience across all connections.
Why ABS matters
- Zero buffering: Video automatically adapts to network conditions in real-time
- Fast startup: Begins playback immediately at the lowest quality, then upgrades as bandwidth becomes available
- Universal compatibility: Works seamlessly across all devices from mobile to 4K displays
- Cost efficient: Viewers on slow connections download smaller files, reducing bandwidth costs
Quick start
Recommended: Use the Video Player SDK for production implementations. It handles ABS automatically with zero configuration complexity:
const player = videoPlayer('my-video', {
imagekitId: 'YOUR_IMAGEKIT_ID',
abs: {
protocol: 'hls', // or 'dash'
sr: [240, 360, 480, 720, 1080] // Available resolutions
}
});
player.src({
src: 'https://ik.imagekit.io/<your-imagekit-id>/video.mp4'
});
That's it! The Video Player SDK handles:
- Manifest generation
- Quality adaptation based on bandwidth
- Seamless transitions between quality levels
- Playback optimization
How ABS works
Adaptive Bitrate Streaming works by splitting your video into multiple quality variants. The viewer's client (video player) loads the manifest file and continuously adapts playback:
- Player loads manifest file with all available variants
- Player starts playback at lowest bitrate for fast startup
- Player monitors network speed and device capabilities
- Player requests higher quality segments as bandwidth allows
- Player downgrades quality if network slows down
This continuous adaptation creates a smooth experience without buffering or interruptions.
How ImageKit handles ABS
ImageKit automatically generates all required variants and manifest files from your original video. You only need to provide the source video—ImageKit creates everything else:
- Generates multiple quality versions (240p through 4K)
- Creates HLS and/or DASH manifest files
- Serves all files through ImageKit's CDN
- Caches aggressively for performance
The original video can be hosted in ImageKit Storage or external storage integrated with your ImageKit account.
Streaming protocols
ImageKit supports both major ABS protocols. Both work with all modern video players and leverage standard HTTP infrastructure including CDN caching:
- HTTP Live Streaming (HLS): Apple's standard, excellent compatibility with all devices
- MPEG-DASH: Industry standard, more flexible and efficient
Choose based on your target audience and player requirements. The Video Player SDK supports both seamlessly.
Manual implementation
For custom implementations or when not using the Video Player SDK, construct manifest URLs directly.
HLS manifest URL
https://ik.imagekit.io/YOUR_ID/path/to/video.mp4/ik-master.m3u8?tr=sr-240_360_480_720_1080
DASH manifest URL
https://ik.imagekit.io/YOUR_ID/path/to/video.mp4/ik-master.mpd?tr=sr-240_360_480_720_1080
Generation timing
When you first request a manifest URL:
- Returns
202 Acceptedstatus (processing) - ImageKit generates variants in the background (takes seconds to minutes depending on file size)
- Second request returns
200 OKwith the manifest
Use the <video> element with the appropriate MIME type for your chosen protocol (HLS uses application/x-mpegURL, DASH uses application/dash+xml).
Quality representations (sr parameter)
Use the sr parameter to specify which quality variants to generate. You can include any combination of the supported representations below:
Usage: sr-240_360_480_720_1080
This tells ImageKit to generate 5 variants: 240p, 360p, 480p, 720p, and 1080p.
Supported resolutions
| Representations | Resolution | Max Bitrate | Video Codec | Audio Codec | Format |
|---|---|---|---|---|---|
| 240 | 426x240 | 200K | h264 | aac | mp4 |
| 360 | 640x360 | 400K | h264 | aac | mp4 |
| 480 | 854x480 | 800K | h264 | aac | mp4 |
| 720 | 1280x720 | 3300K | h264 | aac | mp4 |
| 1080 | 1920x1080 | 5500K | h264 | aac | mp4 |
| 1440 | 2560x1440 | 12000K | h264 | aac | mp4 |
| 2160 | 3840x2160 | 18000K | h264 | aac | mp4 |
ImageKit uses H.264 codec for encoding video and AAC for encoding audio for both HLS and DASH.
All ABS representations will use at_max cropping strategy to resize the representations. Output will match the aspect ratio of the original video after this change.
Best practices
- Use Video Player SDK: The Video Player SDK handles ABS automatically with optimal quality adaptation.
- Include 360p and higher: Always include at least 360p for mobile, then 720p and 1080p for desktop.
- Test manifest generation: Allow 2-5 minutes for processing on first request depending on video size.
Transformation limitations: You cannot apply width (w), height (h), aspect ratio (ar), format (f), video codec (vc), audio codec (ac), or quality (q) transformations when using ABS. All other transformations work normally.
Related features
- Video Player SDK: Built-in ABS with automatic adaptation and enhanced playback controls
- Video transformations: Apply transformations alongside ABS for quality optimization
- Video optimization: Best practices for video delivery and performance
- Core delivery features: CDN caching, security, and delivery optimization