Skip to content

Commit 024421d

Browse files
authored
Merge pull request #102326 from Juliako/patch-174
Update content-aware-encoding.md
2 parents e7fa1da + b0070c7 commit 024421d

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

articles/media-services/latest/content-aware-encoding.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
# Mandatory fields. See more on aka.ms/skyeye/meta.
3-
title: A preset for content-aware encoding - Azure Media Services |
3+
title: A preset for content-aware encoding - Azure Media Services
44
description: This article discusses content-aware encoding in Microsoft Azure Media Services v3.
55
services: media-services
66
documentationcenter: ''
@@ -17,19 +17,19 @@ ms.custom:
1717

1818
---
1919

20-
# A preset for content-aware encoding
20+
# Use the content-aware encoding preset to find the optimal bitrate value for a given resolution
2121

22-
In order to prepare content for delivery by [adaptive bitrate streaming](https://en.wikipedia.org/wiki/Adaptive_bitrate_streaming), video needs to be encoded at multiple bit-rates (high to low). In order to ensure graceful degradation of quality, as the bitrate is lowered so is the resolution of the video. This results in a so-called encoding ladder – a table of resolutions and bitrates; see the Media Services [built-in encoding presets](https://docs.microsoft.com/rest/api/media/transforms/createorupdate#encodernamedpreset).
22+
In order to prepare content for delivery by [adaptive bitrate streaming](https://en.wikipedia.org/wiki/Adaptive_bitrate_streaming), video needs to be encoded at multiple bit-rates (high to low). This ensures graceful degradation of quality, as the bitrate is lowered so is the resolution of the video. Such multiple bit-rate encoding makes use of a so-called encoding ladder – a table of resolutions and bitrates, see the Media Services [built-in encoding presets](https://docs.microsoft.com/rest/api/media/transforms/createorupdate#encodernamedpreset).
2323

24-
## Overview
24+
You should be aware of the content you are processing, and customize/tune the encoding ladder to the complexity of the individual video. At each resolution, there is a bitrate beyond which any increase in quality is not perceptive – the encoder operates at this optimal bitrate value. The next level of optimization is to select the resolutions based on the content – for example, a video of a PowerPoint presentation does not benefit from going below 720p. Going further, the encoder can be tasked to optimize the settings for each shot within the video.
2525

26-
Interest in moving beyond a one-preset-fits-all-videos approach increased after Netflix published their [blog](https://medium.com/netflix-techblog/per-title-encode-optimization-7e99442b62a2) in December 2015. Since then, multiple solutions for content-aware encoding have been released in the marketplace; see [this article](https://www.streamingmedia.com/Articles/Editorial/Featured-Articles/Buyers-Guide-to-Per-Title-Encoding-130676.aspx) for an overview. The idea is to be aware of the content – to customize or tune the encoding ladder to the complexity of the individual video. At each resolution, there is a bitrate beyond which any increase in quality is not perceptive – the encoder operates at this optimal bitrate value. The next level of optimization is to select the resolutions based on the content – for example, a video of a PowerPoint presentation does not benefit from going below 720p. Going further, the encoder can be tasked to optimize the settings for each shot within the video. Netflix described [such an approach](https://medium.com/netflix-techblog/optimized-shot-based-encodes-now-streaming-4b9464204830) in 2018.
26+
Microsoft's [Adaptive Streaming](autogen-bitrate-ladder.md) preset partially addresses the problem of the variability in the quality and resolution of the source videos. Our customers have a varying mix of content, some at 1080p, others at 720p, and a few at SD and lower resolutions. Furthermore, not all source content are high quality mezzanines from film or TV studios. The Adaptive Streaming preset addresses these problems by ensuring that the bitrate ladder never exceeds the resolution or the average bitrate of the input mezzanine. However, this preset does not examine source properties other than resolution and bitrate.
2727

28-
In early 2017, Microsoft released the [Adaptive Streaming](autogen-bitrate-ladder.md) preset to address the problem of the variability in the quality and resolution of the source videos. Our customers had a varying mix of content, some at 1080p, others at 720p, and a few at SD and lower resolutions. Furthermore, not all source content was high quality mezzanines from film or TV studios. The Adaptive Streaming preset addresses these problems by ensuring that the bitrate ladder never exceeds the resolution or the average bitrate of the input mezzanine.
28+
## The content-aware encoding
2929

30-
The new content-aware encoding preset extends that mechanism, by incorporating custom logic that lets the encoder seek the optimal bitrate value for a given resolution, but without requiring extensive computational analysis. This preset produces a set of GOP-aligned MP4s. Given any input content, the service performs an initial lightweight analysis of the input content, and uses the results to determine the optimal number of layers, appropriate bitrate and resolution settings for delivery by adaptive streaming. This preset is particularly effective for low and medium complexity videos, where the output files will be at lower bitrates than the Adaptive Streaming preset but at a quality that still delivers a good experience to viewers. The output will contain MP4 files with video and audio interleaved
30+
The content-aware encoding preset extends the "adaptive bitrate streaming" mechanism, by incorporating custom logic that lets the encoder seek the optimal bitrate value for a given resolution, but without requiring extensive computational analysis. This preset produces a set of GOP-aligned MP4s. Given any input content, the service performs an initial lightweight analysis of the input content, and uses the results to determine the optimal number of layers, appropriate bitrate and resolution settings for delivery by adaptive streaming. This preset is particularly effective for low and medium complexity videos, where the output files will be at lower bitrates than the Adaptive Streaming preset but at a quality that still delivers a good experience to viewers. The output will contain MP4 files with video and audio interleaved
3131

32-
See the following sample graphs that show the comparison using quality metrics like [PSNR](https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio) and [VMAF](https://en.wikipedia.org/wiki/Video_Multimethod_Assessment_Fusion). The source was created by concatenating short clips of high complexity shots from movies and TV shows, intended to stress the encoder. By definition, this preset produces results that vary from content to content – it also means that for some content, there may not be significant reduction in bitrate or improvement in quality.
32+
The following sample graphs show the comparison using quality metrics like [PSNR](https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio) and [VMAF](https://en.wikipedia.org/wiki/Video_Multimethod_Assessment_Fusion). The source was created by concatenating short clips of high complexity shots from movies and TV shows, intended to stress the encoder. By definition, this preset produces results that vary from content to content – it also means that for some content, there may not be significant reduction in bitrate or improvement in quality.
3333

3434
![Rate-distortion (RD) curve using PSNR](media/cae-experimental/msrv1.png)
3535

@@ -49,9 +49,13 @@ Below are the results for another category of source content, where the encoder
4949

5050
**Figure 4: RD curve using VMAF for low quality input (at 1080p)**
5151

52-
## Use the content-aware encoding preset
52+
## How to use the content-aware encoding preset
53+
54+
You can create transforms that use this preset as follows.
55+
56+
> [!TIP]
57+
> See the [Next steps](#next-steps) section for tutorials that use tranform outputs. The output asset can be delivered from Media Services streaming endpoints in protocols such as MPEG-DASH and HLS (as shown in the tutorials).
5358
54-
You can create transforms that use this preset as follows. If using a tutorial [such as this](stream-files-tutorial-with-api.md), you can update the code as follows:
5559

5660
```csharp
5761
TransformOutput[] output = new TransformOutput[]
@@ -70,8 +74,12 @@ TransformOutput[] output = new TransformOutput[]
7074
```
7175

7276
> [!NOTE]
73-
> The underlying algorithms are subject to further improvements. There can and will be changes over time to the logic used for generating bitrate ladders, with the goal of providing an algorithm that is robust, and adapts to a wide variety of input conditions. Encoding jobs using this preset will still be billed based on output minutes, and the output asset can be delivered from our streaming endpoints in protocols such as DASH and HLS.
77+
> Encoding jobs using the `ContentAwareEncoding` preset are being billed based on the output minutes.
7478
7579
## Next steps
7680

77-
Now that you have learned about this new option of optimizing your videos, we invite you to try it out. You can send us feedback using the links at the end of this article.
81+
* [Tutorial: Upload, encode, and stream videos with Media Services v3](stream-files-tutorial-with-api.md)
82+
* [Tutorial: Encode a remote file based on URL and stream the video - REST](stream-files-tutorial-with-rest.md)
83+
* [Tutorial: Encode a remote file based on URL and stream the video - CLI](stream-files-cli-quickstart.md)
84+
* [Tutorial: Encode a remote file based on URL and stream the video - .NET](stream-files-dotnet-quickstart.md)
85+
* [Tutorial: Encode a remote file based on URL and stream the video - Node.js](stream-files-nodejs-quickstart.md)

0 commit comments

Comments
 (0)