Overview
Basic Concepts
Quick Start
Domain Management
Origin Settings
Media Processing
Before You Start
How to Use
Transcoding
Transmuxing
Packaging
Adaptive Bitrate Streaming
Video Encryption
Intelligent Transcoding
Editing
Appendix
Cache Settings
Cache Purge and Prefetch
HTTP/HTTPS Settings
Access Control
Advanced Settings
Logs and Reports
Tutorials
Content Protection

Adaptive Bitrate Streaming

Last update:2025-03-21 14:58:38

Adaptive Bitrate (ABR) streaming solves the challenges of diverse user devices and varying network conditions. This technology automatically delivers video content at the most appropriate bitrate for each user’s current connection, ensuring optimal viewing experiences across all devices and network conditions.

CDNetworks provides comprehensive ABR support for both HLS and DASH packaging formats.

How to Use

Structure your fops parameter in the request body as follows:

<op>/<Format>
    /envBandWidth/<value>
    /multiAb/<value>
    /multiVb/<value>
    /multiResolution/<value>
    |saveas/<Urlsafe_Base64_Encode(bucket:filekey)>

Parameters

Parameter Required Description
op Yes Operation type. For Adaptive Bitrate Streaming, use avthumb.
format Yes Target format for output. Supports m3u8 (HLS), mpd (DASH), etc.
envBandWidth No The bandwidth thresholds for HLS streaming that trigger stream switching.

• Configure up to five thresholds (minimum of two required)
• Valid range: 50,000 to 30,000,000 b/s
• Example: 60000:150000:500000

Important Notes:
1. Required when output is in HLS format
2. Must match the count of multiVb, multiAb, and multiResolution values
3. Threshold values should be close to transcoding bitrate values
4. Values must be arranged in ascending order
multiAb No Audio bitrates for each quality level, in bits per second.

• Configure up to five audio bitrates (minimum of two required)
• Example: 64k:128k:256k

Important Notes:
1. Must match the count of multiVb and multiResolution values
2. Cannot be used with the standard audio transcoding parameter ab
multiVb No Video bitrates for each quality level, in bits per second.

• Configure up to five video bitrates (minimum of two required)
• Example: 128k:600k:1.25m

Important Notes:
1. Must match the count of multiAb and multiResolution values
2. Cannot be used with the standard video transcoding parameter vb
multiResolution No Resolutions for each quality level, formatted as wxh.

• Configure up to five resolutions (minimum of two required)
• Resolution can be specified in two ways:

1. Width and Height: Define both dimensions explicitly (e.g., 320x240:640x480:1080x720)
Note: This may stretch videos if output aspect ratios differ from the original

2. Width or Height: Set only one dimension and use -1 for the other (e.g., 320x-1:-1x480:1080x-1)
The unspecified dimension will automatically scale to maintain the original aspect ratio
saveas No Output location as URL-safe Base64-encoded string: Urlsafe_Base64_Encode(bucket:savedfilename)

Examples

Example 1: HLS Adaptive Bitrate

This example creates an adaptive bitrate HLS stream with two quality levels from a source file named test_hls.m3u8:

Quality Levels:

  • Level 1:
    • Bandwidth threshold: 60 kb/s
    • Video bitrate: 128 kbit/s
    • Audio bitrate: 64 kbit/s
    • Resolution: 320x240
  • Level 2:
    • Bandwidth threshold: 100 kb/s
    • Video bitrate: 600 kbit/s
    • Audio bitrate: 128 kbit/s
    • Resolution: 640x480

Pseudocode request:

curl -v -X POST 
–d "bucket=Urlsafe_Base64_Encode(vod-wcs-test001)&key=Urlsafe_Base64_Encode(test_hls.m3u8)&fops=Urlsafe_Base64_Encode(avthumb/m3u8/envBandWidth/60000:100000/multiAb/64k:128k/multiVb/128k:600k/multiResolution/320x240:640x480|saveas/Urlsafe_Base64_Encode(vod-wcs-test001:test_file.m3u8))&force=1&separate=1"
–H "Authorization:AccessKey:EncodeSign" 
--url "http://mgrDomain/fops"

Actual request:

curl -v -X POST 
-d "bucket=dm9kLXdjcy10ZXN0MDAx&key=dGVzdF9obHMubTN1OA==&fops=YXZ0aHVtYi9tM3U4L2VudkJhbmRXaWR0aC81MDAwMDoxMDAwMDAvbXVsdGlBYi82NGs6MTI4ay9tdWx0aVZiLzEyOGs6NjAway9tdWx0aVJlc29sdXRpb24vMzIweDI0MDo2NDB4NDgwfHNhdmVhcy9kbTlrTFhkamN5MTBaWE4wTURBeE9uUmxjM1JmWm1sc1pTNXRNM1U0&force=1&separate=1"
-H "Authorization:AccessKey:EncodeSign" 
--url "http://mgrDomain/fops"

Example 2: DASH Adaptive Bitrate

This example creates an adaptive bitrate DASH stream with two video quality levels and one audio stream from a source file named test.mp4:

Streams:

  • Video Stream 1:
    • Bitrate: 128 kbit/s
    • Resolution: 320x240
  • Video Stream 2:
    • Bitrate: 600 kbit/s
    • Resolution: 640x480
  • Audio Stream:
    • Bitrate: 64 kbit/s

Pseudocode request:

curl -v -X POST 
–d "bucket=Urlsafe_Base64_Encode(vod-wcs-test001)&key=Urlsafe_Base64_Encode(test_hls.m3u8)&fops=Urlsafe_Base64_Encode(avthumb/mpd/multiVb/128k:600k/multiAb/64k/multiResolution/320x240:640x480|saveas/Urlsafe_Base64_Encode(vod-wcs-test001:test.mpd))&force=1&separate=1"
–H "Authorization:AccessKey:EncodeSign" 
--url "http://mgrDomain/fops"

For the actual request format, please refer to Example 1.

Is the content of this document helpful to you?
Yes
I have suggestion
Submitted successfully! Thank you very much for your feedback, we will continue to strive to do better!