

# Enabling manifest decoration in the output
<a name="enable-manifest-decoration"></a>

You can choose to interpret SCTE 35 messages from the input sources in a MediaLive channel and insert corresponding instructions into the output manifest. This manifest decoratino is supported in the following types of MediaLive outputs:
+ HLS
+ Microsoft Smooth (the instructions are inserted in the sparse track).

MediaPackage outputs, which are a type of HLS output, are set up with manifest decoration enabled. You can't disable decoration in these outputs.

Manifest decoration is enabled at the output group level. If you enable the feature in a specific output group, all the outputs in that group have their manifests decorated.

To include manifest decoration in some outputs and not others, you must create two output groups of the specified type, for example, two HLS output groups.

**Topics**
+ [Enabling decoration – HLS](procedure-to-enable-decoration-hls.md)
+ [Enabling decoration – Microsoft Smooth](procedure-to-enable-decoration-ms-smooth.md)
+ [How SCTE 35 events are handled in manifests and sparse tracks](how-scte-35-events-are-handled-in-manifests.md)
+ [Sample manifests - HLS](sample-manifests-hls.md)

# Enabling decoration – HLS
<a name="procedure-to-enable-decoration-hls"></a>

In an HLS output group, manifest decoration is enabled at the output group level, which means that the manifests for all outputs in that group include instructions based on the SCTE 35 content.

**To enable decoration**

1. In the channel that you are creating, make sure that you have set the ad avail mode. See [Getting ready: Set the ad avail mode](getting-ready-set-the-ad-avail-mode.md).

1. In the navigation pane, find the desired HLS output group. 

1. In **Ad Marker**, choose **Add ad markers**. 

1. For **HLS ad markers**, select the type of ad marker. For information about the different types of markers, see [Sample manifests - HLS](sample-manifests-hls.md). 

1. Repeat to add more types of markers, as desired.

The manifest for each output will include a separate set of tags for each type that you select.

# Enabling decoration – Microsoft Smooth
<a name="procedure-to-enable-decoration-ms-smooth"></a>

In a Microsoft Smooth output group, if you enable manifest decoration, instructions are inserted in the sparse track.

Manifest decoration is enabled at the output group level, which means that the sparse tracks for all outputs in that group will include instructions based on the SCTE 35 content.

**To enable decoration**

1. In the channel that you are creating, make sure that you have set the ad avail mode. See [Getting ready: Set the ad avail mode](getting-ready-set-the-ad-avail-mode.md).

1. In the navigation pane, find the desired Microsoft Smooth output group. 

1. For **Sparse track**, for **Sparse track type**, choose **SCTE\$135**. 

1. Complete **Acquisition point ID**, only if encryption is enabled on the output. Enter the address of the certificate. 

# How SCTE 35 events are handled in manifests and sparse tracks
<a name="how-scte-35-events-are-handled-in-manifests"></a>

When you enable manifest decoration or sparse track in an HLS or Microsoft Smooth output group, MediaLive inserts up to three types of information. The triggers for inserting this information depend on the mode. 

## Types of information
<a name="manifest-types-of-info"></a>


| Type of instruction | When inserted | 
| --- | --- | 
| Base64 | Information about all SCTE 35 messages in the output is incorporated into the manifest; the entire SCTE 35 message is added in base64 format. | 
| Cue-out, cue-in | SCTE 35 messages that are ad avails result in the insertion of cue-out, cue-in instructions. | 
| Blackout |  Only applies to the SCTE 35 Enhanced ad marker style (for HLS output; see [Enabling decoration – HLS](procedure-to-enable-decoration-hls.md)). SCTE 35 messages that are *not *ad avails result in the insertion of blackout start/end instructions, assuming that blackout is enabled. If blackout is not enabled, these instructions are not inserted.  | 

## Splice insert mode
<a name="splice-insert-mode"></a>

This table describes MediaLive handling when splice insert mode is enabled. The table shows how MediaLive will react when it encounters a specific message type and segmentation type in the source.

To read this table, find a message type in the first column and a segmentation type in the second column. Then read across in the other three columns. A *Yes* indicates that MediaLive will insert this type of information in the manifest when it encounters this message type and segmentation type.

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/how-scte-35-events-are-handled-in-manifests.html)

## Timesignal APOS mode
<a name="timesignal-apos-mode"></a>

This table describes MediaLive handling when timesignal APOS mode is enabled. The table shows how MediaLive will react when it encounters a specific message type and segmentation type in the source.

To read this table, find a message type in the first column and a segmentation type in the second column. Then read across in the other three columns. A *Yes* indicates that MediaLive will insert this type of information in the manifest when it encounters this message type and segmentation type.

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/how-scte-35-events-are-handled-in-manifests.html)

# Sample manifests - HLS
<a name="sample-manifests-hls"></a>

MediaLive supports the following HLS manifest styles for outputs:
+ Adobe
+ Elemental
+ SCTE 35 Enhanced

This section describes the ad marker tagging for each style of output manifest.

**Note**  
MediaLive doesn't interpret the ad avail decoration information in the manifest attached to the input source.

## Ad marker: Adobe
<a name="sample-manifests-hls-adobe"></a>

Inserts a CUE: DURATION for each ad avail. Does not insert any CUE-OUT CONT (continuation tags) to indicate to a client player joining midbreak that there is a current avail. This does not insert a CUE-IN tag at the end of the avail.

**Structure**      
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/sample-manifests-hls.html)

**Tag contents**  
+ CUE:DURATION contains the following:
  + duration – Duration in fractional seconds
  + id – An identifier, unique among all ad avails CUE tags
  + type – SpliceOut
  + time – The PTS time for the ad avail, in fractional seconds

**Example**  
This is the tag for an ad avail lasting 414.171 PTS:  

```
#EXT-X-CUE:DURATION="201.467",ID="0",TYPE="SpliceOut",TIME="414.171"
```

## Ad marker: Elemental
<a name="sample-manifests-hls-elemental"></a>

**Structure**    
****    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/sample-manifests-hls.html)

**Tag contents**  
+ CUE-OUT contains DURATION
+ CUE-OUT-CONT contains Elapsed time and Duration
+ CUE-IN has no content

**Example**  

```
#EXT-X-CUE-OUT:30.000 
.
.
.
# EXT-X-CUE-OUT-CONT: 8.308/30 
.
.
.
# EXT-X-CUE-OUT-CONT: 20.391/30
.
.
.
# EXT-X-CUE-IN
```

## Ad marker: SCTE 35 enhanced
<a name="sample-manifests-hls-scte-35-enhanced"></a>

Structure    
****    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/sample-manifests-hls.html)

Tag contents  
+ OATCLS-SCTE35 containing the base64 encoded raw bytes of the original SCTE 35 ad avail message.
+ ASSET containing the CAID or UPID as specified in the original SCTE35 message.
+ 1 CUE-OUT per ad avail.
+ CUE-OUT-CONT containing the following:
  + The elapsed time of the avail.
  + The duration declared in the original SCTE35 message.
  + SCTE35 containing the base64 encoded raw bytes of the original SCTE 35 ad avail message.

    These lines repeat until the ad avail ends.
+ CUE-IN to indicate the end of the avail.

Example  

```
#EXT-OATCLS-SCTE35:/DA0AAAAAAAAAAAABQb+ADAQ6QAeAhxDVUVJQAAAO3/PAAEUrEoICAAAAAAg+2UBNAAANvrtoQ==  
#EXT-X-ASSET:CAID=0x0000000020FB6501  
#EXT-X-CUE-OUT:201.467
.
.
.
#EXT-X-CUE-OUT-CONT:ElapsedTime=5.939,Duration=201.467,SCTE35=/DA0AAAA+…AAg+2UBNAAANvrtoQ==
.
.
.
#EXT-X-CUE-IN
```