AWS for M&E Blog

Part 2: 4K HDR VOD workflows using AWS Elemental MediaConvert and AWS Elemental Server

Part 1: Expanding the color gamut with HDR and AWS Elemental
Part 2: HDR VOD workflows using AWS Elemental Server and AWS Elemental MediaConvert (this post)
Part 3: Live and VOD-to-Live HDR workflows on AWS

You have probably heard 4K and HDR many times, but exactly what do they mean for you and your customers? What tools and services can you use today to process these video assets, and how do you avoid mistakes and get your job done efficiently? In the second part of our series, we show you how to prepare 4K HDR media assets using AWS Elemental MediaConvert and AWS Elemental Server.

4K UHD in general refers to a 3840×2160 video resolution, which is 4 times the HD resolution of 1920×1080. 4K is also interchangeably used as Ultra HD or UHD. The increased resolution provides improved image clarity and sharpness, and allows for larger displays. 4K DCI refers to a variation for digital cinema that is 4096 x 2160 pixels.

You can use MediaConvert or AWS Elemental Server to process 4K HDR VOD assets. In addition, MediaConvert can support up to 8K, 8192×4320 resolution with HEVC encoding, 10-bit, including HDR. Customers often ask what the best video codec settings for 4K HDR content are, and how they can avoid common mistakes in media processing to increase efficiency. We put together the following as a reference to use or share with production teams for 4K HDR assets, so you don’t have to worry about the compatibly issues with MediaConvert or Elemental Server.

MediaConvert and AWS Elemental Server support MXF and QuickTime container format. The following table shows detailed codecs supported by each container. Most often, MXF containers are used with VC-3 and JPEG 2000 codec, or QuickTime with ProRes codec for 4K HDR video assets.

Container Video Codecs Audio
MXF Uncompressed, Apple ProRes (supported types), AVC Intra 50/100, VC-3, DV/DVCPRO, DV25, DV50, DVCPro HD, AVC (H.264), JPEG 2000 (J2K), MPEG-2, Panasonic P2, SonyXDCam, SonyXDCam MPEG-4 Proxy AAC, AIFF, Dolby E frames carried in PCM streams, MPEG Audio, PCM
QuickTime Uncompressed, Apple ProRes (supported types), AVC Intra 50/100, DivX/Xvid, DV/DVCPRO, H.261, H.262, H.263, AVC (H.264), HEVC (H.265), JPEG 2000 (J2K), MJPEG, MPEG-2, MPEG-4 part 2, QuickTime Animation (RLE) AAC, MP3, PCM

Let’s dig into how customers can use MediaConvert and Server to prepare the content for OTT delivery.

Use MediaConvert to prepare 4K HDR for content delivery

As previously mentioned, AWS Elemental MediaConvert is a file-based video transcoding service with broadcast-grade features, and supports up to 8K, HEVC, 10-bit HDR transcoding. Based on the HLS authoring specification from Apple, we touch upon the key configuration choices customers can make on the MediaConvert service.

In the following example, we assume that the customer already has 4K HDR10 VOD assets existing in an Amazon S3 bucket. For OTT delivery, we plan to create an HDR ABR stack and an SDR ABR stack, and combine them into one single master manifest. We need to ensure the following two items are in place before we start:

  1. Use fragmented mp4 container instead of MPEG transport stream. This is because for HEVC video, the container format must be fMP4 per the HLS specification.
  2. Use MediaConvert built-in color conversion feature to produce SDR content. For customers who prefer to use their own color-graded SDR VOD assets, they can use SDR video source for transcoding, and manually combine the manifests into a single master manifest.

Now let’s take a look what are the key constructs in MediaConvert for this transcoding workflow.

1. Log into AWS Management Console, go to MediaConvert service, and Create a job.

2. In Output groups, click Add button, select CMAF option in the popup menu.

a. CMAF output group enables MediaConvert to produce fMP4 container for the output video.

Add CMAF output group

3. Select the newly created output group, and make changes to the common parameters such as ‘Custom group name’, ‘Destination’, and provide Segment control settings and HLS specific settings.

4. For segment control settings, set Fragment length to 2 seconds, and Segment length to 6 seconds. By default, Write HLS manifest and Write Dash manifest are both checked.

Settings for segment control, fragment length, segment length.

5. For HLS specific settings, set Manifest duration format to Floating point, set Include resolution to Include, and uncheck Client cache checkbox. Set Codec specification to RFC 6381.

6. The next step is to add multiple outputs. We will create a total of 8 video outputs, and 2 audio outputs. The following table shows the output details.

HDR Outputs:

  • 1280x720p, H.264 (AVC): QVBR, QVBR quality level 8, Multi pass HQ, 3.5Mbps
  • 1920x1080p, H264 (AVC): QVBR, QVBR quality level 8, Multi pass HQ, 6Mbps
  • 1920x1080p, H265 (HEVC): QVBR, QVBR quality level 8, Multi pass HQ, 5.5Mbps
  • 3840x2160p, H265 (HEVC): QVBR, QVBR quality level 9, Multi pass HQ, 15Mbps

7. Now it’s time to decide if you are targeting HDR10 or HDR10+, which supports dynamic metadata. We walk through both in steps 8 and 9, but you should only choose one or the other.

8. HDR10 → For all HDR outputs, make sure set Profile to High 10-bit for H.264 codec, and set Profile to Main10/Main for H.265 codec. For all HDR output, enable Color corrector in the Preprocessors section, and set Color space conversion to Force HDR 10.

Color corrector settings

9. HDR10+ → enable HDR10+ in the Preprocessors section, and set the Mastering Monitor Nits to match the settings for the monitor where the source was graded and Target Monitor Nits to the expected peak target monitor, which is usually 1000.

Enable HDR10+ settings

10. For all SDR outputs, we use built-in color conversion feature to convert HDR to SDR color space. Enable Color corrector in the Preprocessors section, and set Color space conversion to Force Rec. 709.

SDR Outputs:

  • 1280x720p, H.264 (AVC): QVBR, QVBR quality level 8, Multi pass HQ, 3Mbps
  • 1920x1080p, H264 (AVC): QVBR, QVBR quality level 8, Multi pass HQ, 5Mbps
  • 1920x1080p, H265 (HEVC): QVBR, QVBR quality level 8, Multi pass HQ, 5Mbps
  • 3840x2160p, H265 (HEVC): QVBR, QVBR quality level 9, Multi pass HQ, 12Mbps

Audio Outputs:

  • AAC audio 96kbps, Stereo, 48Khz
  • AAC audio 256kbps, Stereo, 48Khz

11. Now you have setup the complete MediaConvert codec settings, finish the rest configuration, and you can start submit your transcoding job.

Use AWS Elemental Server to prepare 4K, HDR content delivery

Customers who have AWS Elemental Server appliances can use it to prepare 4K HDR assets for OTT delivery.

1. To create a transcoding job in AWS Elemental Server web user interface, in the Job Queue section, click New Job button.

2. Use CMAF output group to generate fragmented mp4 container format. Set Segment Length to 6 seconds.

Elemental Server CMAF Output

3. Expand Advanced option, find HLS Specific Settings, check HLS Use EFC 6381 (Pantos 7) CODEC identifiers checkbox.

HLS Specific Settings on Elemental Server

4. In New Output section, click Add Output button to add an output, a new Stream is automatically created to associate with the new output. In the Streams section, for each stream, remove Audio from video only streams, and remove Video from audio only streams.

5. Configure your video and audio using the parameters in the sample configurations section. For streams using HEVC codec, the Write HVC1 for H.265 checkbox shows in Outputs section, make sure this checkbox is checked to conform to the section 1.10 in HLS authoring specification.

1.10. You SHOULD use video formats in which the parameter sets are stored in the sample descriptions, rather than the samples. (that is, use 'avc1', 'hvc1', or 'dvh1' rather than 'avc3', 'hev1', or 'dvhe'.)

Sample Configurations

The following is an example of the Elemental Server UI. You can provide a name modifier to each of the output, and it is used as part of the output variant name in the manifest file.

The following is a sample output profile you can use as a reference.

Video Stream HDR Outputs

1280x720p, H.264 (AVC): Rate Control Mode: QVBR 2-pass, Max Bitrate: 3.5Mbps, Quality Level: 8, GOP: 2.0, Units: Seconds, B Frames: 2, Closed GOP Cadence: 1, Reference Frames: 3, GOP Reference B-Frame: check, Dynamic Sub-Gop: check, Scene Change Detect: Transition detection, Profile: High 10-bit, Density vs Quality: 0

1920x1080p, H264 (AVC): Rate Control Mode: QVBR 2-pass, Max Bitrate: 6.0Mbps, Quality Level: 8. Follow 720p profile for the rest parameter settings.

1920x1080p, H265 (HEVC): Rate Control Mode: QVBR 2-pass, Max Bitrate: 5.5Mbps, Quality Level: 8, GOP: 2.0, Units: Seconds, B Frames: 2, Closed GOP Cadence: 1, Reference Frames: 3, GOP Reference B-Frame: check, Dynamic Sub-Gop: check, Scene Change Detect: Transition detection, Profile: Main10/Main, Density vs Quality: 0.5

3840x2160p, H265 (HEVC): Rate Control Mode: QVBR 2-pass, Max Bitrate: 15Mbps, Quality Level: 9, GOP: 2.0, Units: Seconds, B Frames: 2, Closed GOP Cadence: 1, Reference Frames: 1, GOP Reference B-Frame: uncheck, Dynamic Sub-Gop: uncheck, Scene Change Detect:Enabled, Profile: Main10/Main, Density vs Quality: 0.5

For all HDR output, enable Color corrector in the Preprocessors section, and set Color space conversion to Force HDR 10.

Video Stream SDR Outputs

  • 1280x720p, H.264 (AVC): Rate Control Mode: QVBR 2-pass, Max Bitrate: 3.0Mbps, Quality Level: 8, GOP: 2.0, Units: Seconds, B Frames: 2, Closed GOP Cadence: 1, Reference Frames: 3, GOP Reference B-Frame: check, Dynamic Sub-Gop: check, Scene Change Detect: Transition detection, Profile: Main, Density vs Quality: 0
  • 1920x1080p, H264 (AVC): Rate Control Mode: QVBR 2-pass, Max Bitrate: 5.0Mbps, Quality Level: 8, GOP: 2.0, Units: Seconds, B Frames: 2, Closed GOP Cadence: 1, Reference Frames: 3, GOP Reference B-Frame: check, Dynamic Sub-Gop: check, Scene Change Detect: Transition detection, Profile: High, Density vs Quality: 0
  • 1920x1080p, H265 (HEVC): Rate Control Mode: QVBR 2-pass, Max Bitrate: 4.5Mbps, Quality Level: 8, GOP: 2.0, Units: Seconds, B Frames: 2, Closed GOP Cadence: 1, Reference Frames: 3, GOP Reference B-Frame: check, Dynamic Sub-Gop: check, Scene Change Detect: Transition detection, Profile: Main/High, Density vs Quality: 0.5
  • 3840x2160p, H265 (HEVC): Rate Control Mode: QVBR 2-pass, Max Bitrate: 12Mbps, Quality Level: 8, GOP: 2.0, Units: Seconds, B Frames: 2, Closed GOP Cadence: 1, Reference Frames: 1, GOP Reference B-Frame: uncheck, Dynamic Sub-Gop: uncheck, Scene Change Detect: Enabled, Profile: Main/High, Density vs Quality: 0.5

For all SDR output, enable Color corrector in the Preprocessors section, and set Color space conversion to Force Rec. 709.

Audio Stream Outputs

  • AAC audio 96kbps, Stereo, 48Khz
  • AAC audio 256kbps, Stereo, 48Khz

Summary

In this post, we showed you how to use AWS Elemental MediaConvert and AWS Elemental Server to prepare a 4K HDR video asset for OTT delivery, and how to put them into an ABR stack. We provided detailed configuration steps, and sample configuration options to help you navigate through the options quickly, and gave you flexibility to adjust them to your own needs. In the third post of this series, we dive into live HDR and VOD playout workflows.

Reference:

HLS Authoring Specification for Apple Devices: https://developer.apple.com/documentation/http_live_streaming/hls_authoring_specification_for_apple_devices