Adaptive Bitrate Streaming

Last update:2026-07-15 18:36:04

Adaptive Bitrate (ABR) streaming addresses the challenges of diverse user devices and varying network conditions. This technology automatically delivers video content at the most appropriate bitrate based on each user’s current connection, ensuring an optimal viewing experience across devices and network environments.

Atomile 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 output format. Supported values include m3u8 (HLS), mpd (DASH), and others.
envBandWidth No Bandwidth thresholds for HLS stream switching.

• You can configure up to five thresholds, with a minimum of two required.
• Valid range: 50000 to 30000000 b/s
• Example: 60000:150000:500000

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

• You can configure up to five audio bitrates, with a minimum of two required.
• Example: 64k:128k:256k

Important Notes:
1. The number of values must match the number of multiVb and multiResolution values.
2. This parameter cannot be used together with the standard audio transcoding parameter ab.
multiVb No Video bitrates for each quality level, in bits per second.

• You can configure up to five video bitrates, with a minimum of two required.
• Example: 128k:600k:1.25m

Important Notes:
1. The number of values must match the number of multiAb and multiResolution values.
2. This parameter cannot be used together with the standard video transcoding parameter vb.
multiResolution No Resolutions for each quality level, in the format wxh.

• You can configure up to five resolutions, with a minimum of two required.
• Resolution can be specified in two ways:

1. Width and Height: Specify both dimensions explicitly, for example 320x240:640x480:1080x720.
Note: This may stretch the video if the output aspect ratio differs from the original.

2. Width or Height: Specify only one dimension and set the other to -1, for example 320x-1:-1x480:1080x-1.
The unspecified dimension is automatically scaled to preserve the original aspect ratio.
saveas Yes Output location as a URL-safe Base64-encoded string, in the format 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 kb/s
    • Audio bitrate: 64 kb/s
    • Resolution: 320x240
  • Level 2:
    • Bandwidth threshold: 100 kb/s
    • Video bitrate: 600 kb/s
    • Audio bitrate: 128 kb/s
    • Resolution: 640x480

Pseudocode Request:

curl -v -X POST \
  -d "bucket=Urlsafe_Base64_Encode(vod-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-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 kb/s
    • Resolution: 320x240
  • Video Stream 2:
    • Bitrate: 600 kb/s
    • Resolution: 640x480
  • Audio Stream:
    • Bitrate: 64 kb/s

Pseudocode Request:

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

For the actual request format, refer to Example 1.