Using automated ABR in MediaConvert - MediaConvert

Using automated ABR in MediaConvert

With automated ABR, AWS Elemental MediaConvert sets up your adaptive bitrate (ABR) stack for you. MediaConvert chooses the right number of renditions and the resolution for each, based on the input video. MediaConvert minimizes the total minutes of transcoded output by eliminating renditions that increase bitrate without providing increased video quality. Automated ABR also maximizes video quality at various bitrates by employing the quality-defined variable bitrate (QVBR) rate control mode.

How automated ABR works

With all adaptive bitrate (ABR) streaming, the end viewer's player device adjusts which rendition of the package it downloads based on the available bandwidth. For example, a viewer with access to high-quality wifi would automatically see a high-bitrate rendition. When they move to a location with only limited bandwidth, their player device automatically switches over to a lower-bitrate rendition. How well the adaptive streaming works depends on the construction of the ABR stack and how well that construction suits the content of the specific video. For example, with a fast-moving, visually complex asset, your ABR stack might include two 720p outputs with different bitrates. If you used that same stack setup with a simple cartoon, those two outputs would likely look the same. The extra encoding, storage, and distribution would cost money without conferring any benefit to the end viewer.

When you run an automated ABR job, MediaConvert maximizes the video quality that the end viewer sees based on their available bandwidth. It does this by analyzing a broad set of possible renditions and eliminating any that increase required bandwidth without increasing video quality. When you run your job, MediaConvert analyzes the content of your input video and chooses the number of renditions and the characteristics of each rendition for you.

You can use the MediaConvert console to run your job without setting anything. There are three categories of optional settings you can specify if you choose to:

  • Limits on your adaptive bitrate (ABR) stack.

  • Limits that apply to the renditions in the ABR stack. These output-level limits apply to all renditions in the stack.

  • All other encoding settings.

    For these settings, MediaConvert uses default values unless you specify something different. This works the same as with outputs that don't use automated ABR, except that whatever values you set apply to all renditions in the stack. For example, if you set Profile to High 10-bit, every rendition will have that codec profile.

Settings that apply to the ABR stack

You can set the following limits that relate to the whole ABR stack:

  • Max renditions: This is the upper limit for the number of renditions in your ABR stack. The number of renditions in your stack might be less than this, but won't be more.

    You can specify a number from 3–15. If you don't specify this, the default maximum is 15.

  • Max ABR bitrate: The maximum average bitrate for the highest-bitrate rendition in your stack.

    This is the rendition that is delivered to viewers with the fastest internet connections. Use to limit the total bytes that are egressed to viewers who receive the highest-bitrate rendition.

    If you don't specify this, the default maximum is 8 mb/s.

    The average bitrate of your highest-quality rendition will be equal to or below this value, depending on the quality, complexity, and resolution of your content. Note that the instantaneous maximum bitrate may vary above the value that you specify.

  • Min ABR bitrate: The minimum average bitrate for the lowest-quality rendition in your stack.

    This is the rendition that is delivered to viewers with the slowest internet connections.

    If you don't specify this, the default minimum is 600 kb/s.

    Note that the instantaneous minimum bitrate may vary below the value that you specify.

Settings that apply to renditions in the stack

You can set the following limits that relate to properties of the renditions in the stack:

  • Max resolution: This is the maximum resolution of your highest-bitrate rendition. When you set this value, choose the resolution of the highest quality device that you expect end viewers to use. MediaConvert won't create a rendition with a resolution larger than this.

    If you don't specify this, the default maximum is the resolution of your input video.

    If you specify a value larger than your input video's resolution, MediaConvert uses your input resolution as the maximum. MediaConvert won't use a resolution larger than the input for any rendition because upscaling the input resolution would add bandwidth without adding video quality.

  • Max frame rate: MediaConvert uses this value as the frame rate for the for highest-bandwidth rendition in your stack. Depending on the input, this might be the frame rate for all renditions. When your input frame rate is high, MediaConvert might halve the frame rate for lower-bandwidth renditions. For example, if your input frame rate is 60 fps, MediaConvert might use 30 fps for some of the lower-bandwidth renditions, and perhaps 15 fps for the very lowest.

    If you don't specify this value, the default maximum is your input frame rate.

For these settings, MediaConvert determines these values for each rendition automatically:

  • Quality tuning level: MediaConvert encodes all renditions with Multi pass HQ.

    This behavior is automatic in the MediaConvert console but not when you submit your job programmatically. When you set up your JSON job specification without using the MediaConvert console, you must explicitly set qualityTuningLevel to MULTI_PASS_HQ.

  • Rate control mode: MediaConvert encodes all renditions with QVBR rate control mode.

    This behavior is automatic in the MediaConvert console but not when you submit your job programmatically. When you set up your JSON job specification without using the MediaConvert console, you must explicitly set rateControlMode to QVBR.

  • These QVBR required settings:

    • QVBR quality level:

    • Max bitrate

    • Max average bitrate

  • HDR buffer size

  • HDR buffer initial fill

Creating an automated ABR stack

When you know whether you want to specify values for the optional limits, use one of the following procedures to set up automated ABR in your job. For more information about these optional settings, see How automated ABR works.

Console

To set up an automated ABR job using the MediaConvert console:

  1. Begin setting up your job as usual. For more information, see Getting started with MediaConvert .

    Instead of following the general instructions for setting up output groups and outputs, follow this procedure.

  2. Enable accelerated transcoding. This is optional, but we strongly recommend it. For more information, see Accelerated transcoding.

  3. On the Create job page, in the Job pane on the left, next to Output groups, choose Add.

  4. Choose a streaming output group type: Apple HLS, DASH ISO, Microsoft Smooth Streaming, or CMAF.

  5. Below the Group settings section, enable Automated ABR.

  6. Optionally, specify any Automated ABR rules.

  7. For the settings in the Automated ABR section, optionally specify values. These are the settings that specify limits that relate to the whole ABR stack. If you choose to keep the default values, you should get good results.

    For more information, see How automated ABR works.

  8. From the Job pane on the left, just below your output group, choose Automated ABR base output.

  9. On the right, in the Base encoding settings for auto-generated ABR renditions section, optionally specify values for the limits that relate to properties of the renditions in the stack. If you choose to keep the default values, you should get good results.

    For more information, see How automated ABR works.

  10. Optionally, specify values for encoding settings that aren't directly related to automated ABR, such as codec profile and level. Values you specify apply to all renditions in the stack. If you choose to keep the default values, you should get good results.

    For information about each individual setting, choose the Info link next to the setting in the MediaConvert console to view the setting description.

  11. If your workflow requires video and audio in separate unmuxed outputs, remove Audio 1 from Base encoding settings for auto-generated ABR renditions. If you require video and audio to be in the same muxed output, skip this step.

    1. Choose the Audio 1 tab.

    2. Choose Remove audio in the upper right of the Base encoding settings for auto-generated ABR renditions section.

  12. Optionally, add audio renditions. Follow these steps for each audio rendition that you want in your ABR stack.

    1. From the Job pane on the left, choose your output group.

    2. In the Outputs section, choose Add output with captions or audio to add a new output.

      Output 1 holds your automated ABR video settings and represents every video rendition in your stack.

    3. Choose the new output from the list of outputs.

    4. In the Encoding settings section, set up your audio rendition as you would for a job that doesn't use automated ABR. For more information, see Creating audio ABR streaming outputs.

  13. Optionally, add captions. Do this as you would for a manually specified ABR stack. For more information, see Setting up captions in AWS Elemental MediaConvert jobs.

  14. Optionally, repeat this procedure to create additional ABR packages in different formats. In a job that includes an automated ABR output group, all ABR output groups must use automated ABR.

API, SDK, or CLI

To set up an automated ABR job using the API, SDK, or AWS command line interface (CLI):

If you use the API, CLI, or an SDK, specify the relevant settings in your JSON job specification and then submit it programmatically with your job. For more information about submitting your job programmatically, see one of the introductory topics of the AWS Elemental MediaConvert API Reference:

  1. Determine the values that you want to set for automated ABR. If you keep all the defaults, you should get good results. For more information, see How automated ABR works.

  2. Use the MediaConvert console to generate your JSON job specification. We recommend this approach, because the console functions as an interactive validator against the MediaConvert job schema. Follow these steps to generate your JSON job specification using the console:

    1. Follow the previous procedure for the console.

    2. In the Job pane on the left, under Job settings, choose Show job JSON.

Information for manually editing your JSON job specification

Find additional information, including where each setting belongs in the job settings structure, in the AWS Elemental MediaConvert API Reference. Links in this list go to information about the setting in that document:

Important

If you set up automated ABR by manually editing your JSON job specification, rather than exporting it from the MediaConvert console, you must explicitly set qualityTuningLevel to MULTI_PASS_HQ and rateControlMode to QVBR.

  • Explicitly set these required settings:

    • Set qualityTuningLevel to MULTI_PASS_HQ.

    • Set rateControlMode to QVBR.

      When you enable automated ABR, the usual required settings for QVBR, such as qvbrSettings and qvbrQualityLevel, aren't required. Instead specify the required automated ABR settings.

  • Set the accelerated transcoding mode to PREFERRED or ENABLED. This is optional, but we strongly recommend it.

  • Optionally, specify these limits that relate to the whole ABR stack:

    • Automated ABR : abrSettings

      • Max renditions: maxRenditions in the AutomatedAbrSettings properties table

      • Max ABR bitrate: maxAbrBitrate in the AutomatedAbrSettings properties table

      • Min ABR bitrate: minAbrBitrate in the AutomatedAbrSettings properties table

  • Optionally, specify these limits that relate to properties of the renditions in the stack:

    Note

    The API properties that correspond to these MediaConvert console settings function differently depending on whether they are in outputs that are part of an automated ABR stack.

    • Max resolution: width and height

      • In automated ABR: Use these settings together to represent the maximum possible resolution in the ABR stack.

      • In other outputs: Use these settings together to represent the output resolution.

    • Max frame rate: frameratecontrol, numerator, and denominator

      For information about how these properties work and links to them in the API Reference, see Converting the frame rate of your video.

      • In automated ABR: Use these settings to specify the frame rate of the highest-bandwidth rendition in your stack. If you don't specify these settings, MediaConvert uses the frame rate of your input video.

      • In other outputs: Use these settings to specify the output frame rate.

Automated ABR rules

Use Automated ABR rules to specify restrictions for the rendition sizes that MediaConvert creates in your automated ABR stack. We recommend using these rules if your ABR workflow has specific rendition size requirements, but you still want MediaConvert to optimize for video quality and overall file size.

You can define the following rules:

  • Min top rendition size

  • Min bottom rendition size

  • Force include renditions

  • Allowed renditions

Min top rendition size

Specify a minimum size for the highest video resolution in your ABR stack. The highest resolution is greater than or equal to the value that you enter.

For example: If you specify 1920x1080, the highest resolution in your ABR stack is greater than or equal to 1920x1080.

Min bottom rendition size

Specify a minimum size for the lowest video resolution in your ABR stack. The lowest resolution in your ABR stack is greater than or equal to the value that you enter.

For example: If you specify 512x288, the lowest resolution in your ABR stack is greater than or equal to 512x288.

Force include renditions

Specify one or more video resolutions to include in your ABR stack. To optimize automated ABR, we recommend that you specify as few resolutions as possible.

The ABR stack may include other resolutions that you do not specify here, depending on the Max renditions setting. For example: If you specify 2 resolutions under Force include renditions, and specify 7 Max renditions, then 5 resolutions are automatically determined.

Force include renditions has the following restrictions with other automated ABR rules or settings:

  • At least one resolution must be greater than or equal to Min top rendition size.

  • All resolutions must be greater than or equal to Min bottom rendition size.

  • Allowed renditions cannot be not specified.

  • The number of resolutions must be less than or equal to Max renditions.

  • Duplicate resolutions are ignored.

Allowed renditions

Specify a list of possible video resolutions in your ABR stack. MediaConvert creates an ABR stack exclusively from the list of resolutions that you specify.

Some resolutions in the Allowed renditions list may not be included. However you can force a resolution to be included by setting Required to ENABLED.

Allowed renditions has the following restrictions with other automated ABR rules:

  • At least one resolution must be greater than or equal to Min top rendition size.

  • At least one resolution must be greater than or equal to Min bottom rendition size.

  • Force include renditions cannot be not specified.

  • The number of resolutions must be less than or equal to Max renditions.

  • Duplicate resolutions are ignored.

Automated ABR frequently asked questions

How can I see what renditions AWS Elemental MediaConvert created for me?

You can see the properties of the outputs in your ABR stack in these places:

Will my automated ABR job take a long time to run?

We recommend that you always use accelerated transcoding with automated ABR. When you do, your job should take only slightly longer than an accelerated transcoding job for a manually specified ABR stack with similar outputs. You don't pay more for enabling accelerated transcoding because automated ABR is already billed at the 2 Pass (Quality Optimized) professional tier rate.

When you run an automated ABR job without accelerated transcoding, it takes much longer to run than a job with a manually specified ABR stack with similar outputs..

Why do some of my output renditions have the same resolution?

When display devices stream an ABR asset, they request segments based on the bitrate of the rendition, not based on the resolution of the rendition. Therefore, an ABR stack can have renditions for different bandwidths that have the same resolution. The higher bandwidth rendition will have better quality at the same resolution.

Whether increasing the resolution improves video quality when you go up to the next rendition of the stack depends on the complexity of the video. The ability to automatically adjust these choices on a per-job basis is one of the ways that this feature gives you better results with less effort.

Can I tell ahead of time how many renditions will be in my stack?

No. MediaConvert determines which renditions to use during the transcoding process. Because the encoding decisions depend on qualities of your input video, there's no way to know before running the job what those decisions will be.

You can use the optional limits settings to make sure that the number of renditions, and the size of those renditions, won't exceed what you want.

How will I be billed for an automated ABR stack?

MediaConvert bills you for only the renditions that it writes to your output location. For example, you might set Max renditions to 12, but MediaConvert might determine that there is no advantage to creating more than eight renditions. In this case, MediaConvert would bill you for only eight renditions.

Automated ABR is a professional-tier feature and also requires 2 pass encoding. Every rendition is billed per-minute at the 2 Pass (Quality Optimized) rate. For example, say your automated ABR stack ends up with 10 renditions, each of them being 60 minutes long. You would then be charged for 600 minutes. For rates, see AWS Elemental MediaConvert Pricing in the AWS Cloud Products website.

What about audio?

Automated ABR does the set up for your video renditions only. You add audio renditions as audio-only outputs inside of your automated ABR output group. For instructions, see Creating an automated ABR stack.

What about captions?

Add captions to your automated ABR package as captions-only output. For instructions, see Creating an automated ABR stack.

Feature restrictions for automated ABR

Jobs that include automated ABR output groups are restricted in the following ways:

  • You must use an on-demand queue. You can't use a reserved queue.

  • You can enable automated ABR in jobs and job templates only. You can't use automated ABR in output presets.

  • In a job that includes an automated ABR output group, all ABR output groups must use automated ABR.

  • Your output Video codec must be AVC (H.264) or HEVC (H.265).

  • Your output video Scaling behavior must be Default, Stretch to output, Fit, or Fill. You can't use Fit without upscaling.

  • You must specify these required settings when you create your JSON job specification manually. The MediaConvert console sets them for you when you enable automated ABR.

    • Set qualityTuningLevel to MULTI_PASS_HQ.

    • Set rateControlMode to QVBR.