

# Processing SCTE 35 messages
SCTE 35

You can configure an MediaLive channel to handle SCTE 35 messages and SCTE-104 messages. These messages provide information about ad avails (advertisement availability events), and other non-ad avail events, and other non-ad avail events (such as programs and chapters).

**Topics**
+ [

# About message processing
](about-message-processing.md)
+ [

# Getting ready: Set the SCTE 35 source—segments or manifest
](scte35-getting-ready-source.md)
+ [

# Getting ready: Set the ad avail mode
](getting-ready-set-the-ad-avail-mode.md)
+ [

# Enabling manifest decoration in the output
](enable-manifest-decoration.md)
+ [

# Enabling ad avail blanking in the output
](enable-ad-avail-blanking.md)
+ [

# Enabling blackout in the output
](enable-blackout.md)
+ [

# Enabling SCTE 35 passthrough or removal
](scte-35-passthrough-or-removal.md)
+ [

# Inserting SCTE 35 messages using the schedule
](setup-scte35-insertion.md)
+ [

# POIS signal conditioning
](scte35-pois-conditioning.md)

# About message processing


SCTE 35 messages are messages that can be included in a source MPEG-2 transport stream (TS). SCTE-104 messages are messages that can be included in source content from SMPTE 2110 stream or an AWS Elemental Link hardware device. SCTE-104 messages are automatically converted into SCTE 35 messages as soon as MediaLive ingests the input. 

**Note**  
To use the ad avail features of MediaLive, you should be familiar with the SCTE 35 standard and optionally with the SCTE-67 standard. You should also be familiar with how the input that you are encoding implements those standards.  
This section assumes that you are familiar with creating or editing a channel, as described in [Creating a channel from scratch](creating-channel-scratch.md).

**Support for SCTE 35 on the input side**

On the input side of a MediaLive channel, SCTE 35 messages can appear only in inputs containing MPEG-2 transport streams (TS). You can set up a channel so that if an input includes these messages, the messages are either processed during ingest (passed through) or ignored.

**Support for SCTE 35 on the output side**

On the output side of a MediaLive channel, if you set up to pass through the input (rather than remove it), then you can set up each output so that the SCTE 35 messages from the input are turned into cueing information that is appropriate for that output type. This cueing information can be in the form of one or both of the following:
+ SCTE 35 messages in a TS output
+ Manifest (or sparse track) decoration

You set up each output separately, so that you can set up some outputs to include cueing information and some to exclude it.

As an adjunct to the ad avail information, you can also set up the outputs to blank out the video, audio, and captions within the cueing information.

**Topics**
+ [

# Supported features by input type
](input-processing-options.md)
+ [

# Supported output features
](processing-options.md)
+ [

# Processing features – default behavior
](processing-options-default.md)
+ [

# Scope of processing by feature
](scope-by-feature.md)
+ [

# Supported features by output type
](processing-applicability-by-output-type.md)

# Supported features by input type


SCTE 35 messages can appear only in the following types of MediaLive inputs:
+ Elemental Link inputs
+ HLS inputs
+ MediaConnect inputs
+ RTP inputs
+ SMPTE 2110 inputs (SCTE 104 messages that are automatically converted to SCTE 35 messages)
+ SRT Caller
+ Transport Stream (TS) File inputs
+ AWS CDI inputs

The following table shows which inputs might include ad avail information and how MediaLive handles that information. To read the table, find an input in the first column, then read across in the row.


****  

| Input | Interpret SCTE 35 messages in the source stream | Interpret ad avail information in the input manifest | 
| --- | --- | --- | 
| Elemental Link |  Yes  | Not applicable | 
| HLS |  Yes  | Yes | 
| MediaConnect | Yes | Not applicable | 
| RTMP | No | Not applicable | 
| RTP | Yes | Not applicable | 
| SMPTE 2110 | Yes (interpret SCTE 104 messages in the ancillary data packets) | Not applicable | 
| SRT Caller | Yes | No applicable | 
| SRT Listener | Yes | Not applicable | 
| Transport Stream (TS) file | Yes | Not applicable | 
| AWS CDI | Yes | Not applicable | 

# Supported output features


MediaLive supports different types of processing that you can implement in different combinations.

## Manifest decoration


You can set up an output so that its manifest is decorated with ad avail information. Manifest decoration works on two sources of ad avail information: 
+ Ad avail information found in the channel input, if the input is a transport stream (TS)
+ Ad avail information from SCTE 35 messages added to the output using the MediaLive schedule

Manifest decoration applies only to HLS outputs, MediaPackage outputs, and Microsoft Smooth outputs:
+ You can set up HLS outputs so that their manifests are decorated according to one of the following styles:
  + Adobe
  + Elemental
  + SCTE 35 enhanced
+ MediaPackage outputs are always set up so that their manifests are decorated. The marker style is always SCTE 35 enhanced style. Keep in mind that if you don't actually want SCTE 35 messages in the output that you deliver from AWS Elemental MediaPackage, then on the AWS Elemental MediaPackage side you can set up the channel to remove the markers. 
+ You can set up Microsoft Smooth outputs so that the sparse track includes instructions that correspond to the original SCTE 35 message content.

You must set up the channel for the behavior that you want. For more information, see [Enabling manifest decoration in the output](enable-manifest-decoration.md).

## Blanking and blackout


The *cue out* and *cue in* instructions in SCTE 35 messages in TS inputs line up with specific content in the video, audio, and captions streams. You can set up the channel so that this content is blanked out in the output:
+ To blank out content for ad avails, use the ad avail blanking feature. 
+ To blank out content for other messages, use the blackout feature.

For more information, see [Enabling ad avail blanking in the output](enable-ad-avail-blanking.md) and [Enabling blackout in the output](enable-blackout.md).

## SCTE 35 passthrough


You can set up TS outputs so that all the SCTE 35 messages from the input are passed through to the output. Or you can set up to remove these messages from the output.

The behavior that you want must be set up in the channel. For more information, see [Enabling SCTE 35 passthrough or removal](scte-35-passthrough-or-removal.md).

## Inserting SCTE 35 messages using the schedule


You can insert SCTE 35 messages in TS outputs using the [channel schedule](x-actions-in-schedule-SCTE35.md). For example, you can add an action in the channel schedule to insert a splice insert in the running channel. 

The main use case for this feature is to add SCTE 35 messages to the output, when the input doesn't already include SCTE 35 messages. 

For more information, see [Inserting SCTE 35 messages using the schedule](setup-scte35-insertion.md).

# Processing features – default behavior


The default handling of SCTE 35 by MediaLive is the following:
+ No passthrough – Remove SCTE 35 messages in any data stream outputs. There is one exception: for MediaPackage outputs, passthrough is always enabled.
+ No blanking or blackout – Do not blank out video content for any events. Leave the content as is.
+ No manifest decoration – Do not convert any SCTE 35 messages to event information in any output manifests or data streams. There is one exception: for MediaPackage outputs, manifest decoration is always enabled and can't be disabled.

If this is the behavior that you want, you don't need to read any further in this SCTE 35 section.

Typically, you change these defaults only if you want to include ad avail information in the channel outputs. The following are examples of when you change the defaults
+ You enable passthrough.
+ You enable manifest decoration, if your channel includes HLS, MediaPackage, or Microsoft Smooth output groups.
+ You blank or blackout video content depending on your agreement with the content provider. 

# Scope of processing by feature


The SCTE 35 features that you can implement in a MediaLive channel have different scopes in terms of the output groups and outputs that they affect:

**Blackout or ad avail blanking**

Blackout applies at the *global output* level. If you enable blackout, all the relevant content in every output in every output group is blanked. 

Ad avail blanking also applies at the *global output* level. If you enable blanking, all the ad avails in every output in every output group are blanked.

![\[Diagram showing channel with two output groups, each containing two outputs, and blanking option.\]](http://docs.aws.amazon.com/medialive/latest/ug/images/scte35_scope_blanking.png)


**Decoration **

Manifest decoration applies at the *output group* level. If you enable manifest decoration in an output group, all the outputs in that output group have their manifests decorated.

![\[Diagram showing manifest decoration applied at output group level within a channel.\]](http://docs.aws.amazon.com/medialive/latest/ug/images/scte35_scope_manifest.png)


**SCTE 35 passthrough or removal**

SCTE 35 passthrough or removal applies at the *output* level. You can enable passthrough or removal in individual TS outputs. The messages are passed through or removed only in those outputs.

![\[Channel diagram showing two output groups, each containing two outputs, with passthrough or removal option.\]](http://docs.aws.amazon.com/medialive/latest/ug/images/scte35_scope_passthrough.png)


# Supported features by output type


This section describes which SCTE 35 features apply to the various types of outputs that MediaLive supports. 

**Topics**
+ [

# Archive output with MPEG-2 container
](archive-output-with-mpeg-2-container.md)
+ [

# Frame capture output
](framecapture-output.md)
+ [

# HLS output
](hls-output.md)
+ [

# MediaPackage output
](mediapackage-output.md)
+ [

# Microsoft Smooth output
](ms-smooth-output.md)
+ [

# RTMP output
](adobe-rtmp-output.md)
+ [

# UDP or SRT output
](udp-ts-output.md)

# Archive output with MPEG-2 container


In an Archive output (a transport stream in an MPEG-2 container), MediaLive supports SCTE 35 features as follows:
+ Passthrough of the SCTE 35 messages – Supported.
+ Manifest decoration – Not supported because these outputs don't have manifests.
+ Blanking and blackout – Applicable. Content in the output is blanked or blacked out if the features are enabled at the channel level.

Be careful of setting up so that you have removed messages from the input (passthrough disabled) and you have not enabled blanking and blackout. In this case, the video content that was marked by messages (in the input) will not be marked (in the output). 
+ If you have the rights to that video content, there is no problem setting up this way.
+ If you don't have the rights, then the only way to find that content will be to look for the IDR i-frames that identify where the SCTE 35 message used to be.

# Frame capture output


In a Frame capture output, MediaLive supports SCTE 35 features as follows:
+ Passthrough of the SCTE 35 messages – Not applicable. 
+ Manifest decoration – Not supported because these outputs don't have manifests.
+ Blanking and blackout – Applicable. Content in the output is blanked or blacked out if the features are enabled at the channel level.

A Frame capture output doesn't support passthrough of the SCTE 35 messages. However, if blanking or blackout is enabled (at the channel level), then content that falls between the start and stop of the blackout is blanked or blacked out, even though no SCTE 35 messages are present. 

# HLS output


In an HLS output (a transport stream), MediaLive supports SCTE 35 features as follows:
+ Passthrough of the SCTE 35 messages – Supported.
+ Manifest decoration – Supported.
+ Blanking and blackout – Applicable. Content in the output is blanked or blacked out if the features are enabled at the channel level.

MediaLive supports the following combinations of passthrough and manifest decoration:
+ Passthrough enabled, decoration enabled.
+ Passthrough disabled, decoration enabled.
+ Passthrough disabled, decoration disabled. Be careful of setting up with this combination but leaving blanking and blackout disabled. In this case, the video content that was marked by messages (in the input) are not marked (in the output). In addition, the manifests don't have information for identifying that video content. 
  + If you have the rights to that video content, there is no problem setting up this way.
  + If you don't have the rights, the only way to find that content is to look for the IDR i-frames that identify where the SCTE 35 message used to be.

# MediaPackage output


In a MediaPackage output, MediaLive supports SCTE 35 features as follows:
+ Passthrough of the SCTE 35 messages – Always enabled.
+ Manifest decoration – Always enabled.
+ Blanking and blackout – Applicable. Content in the output is blanked or blacked out if the features are enabled at the channel level.

# Microsoft Smooth output


In a Microsoft Smooth output, MediaLive supports SCTE 35 features as follows:
+ Passthrough of the SCTE 35 messages – Not applicable. SCTE 35 messages are never included in this output. 
+ Manifest decoration – Not supported because these outputs don't have manifests. However, you can set up to include instructions in the sparse track.
+ Blanking and blackout – Applicable. Content in the output is blanked or blacked out if the features are enabled at the channel level.

Be careful of setting up so that you have the following combination:
+ You have not enabled sparse track.
+ You have not enabled blanking and blackout. 

In this case, the video content that was marked by messages (in the input) is not marked (in the output). 
+ If you have the rights to that video content, there is no problem setting up this way.
+ If you don't have the rights, it is impossible to find these blanks and blackouts programmatically in a Microsoft Smooth output.

# RTMP output


In an RTMP output, MediaLive supports SCTE 35 features as follows:
+ Passthrough of the SCTE 35 messages – Not applicable.
+ Manifest decoration – Not supported.
+ Blanking and blackout – Applicable. Content in the output is blanked or blacked out if the features are enabled at the channel level.

# UDP or SRT output


In a transport stream output (for example, UDP or SRT), MediaLive supports SCTE 35 features as follows:
+ Passthrough of the SCTE 35 messages – Supported.
+ Manifest decoration – Not supported because these outputs don't have manifests.
+ Blanking and blackout – Supported.

Be careful of setting up so that you have removed messages from the input (passthrough disabled) and you have not enabled blanking and blackout. In this case, the video content that was marked by messages (in the input) is not marked (in the output). 
+ If you have the rights to that video content, there is no problem setting up this way.
+ If you don't have the rights, then the only way to find that content is to look for the IDR i-frames that identify where the SCTE 35 message used to be.

# Getting ready: Set the SCTE 35 source—segments or manifest
Get ready: Set the SCTE 35 source

If you have HLS inputs in a MediaLive channel, you must configure the input to identify the source of the SCTE 35 messages. There are two possible sources:
+ The segments in the transport stream (TS). This type of source applies to all inputs that can include SCTE 35 messages. Unless a specific SCTE 35 packet identifier (PID) is selected, the first PID present in the TS will be used.
+ Tags in an HLS input manifest. This type of source applies only to HLS inputs.

**To set the source in a non-HLS input**

1. On the **Create/Edit channel** page, in the navigation pane, choose **Input attachments**.

1. In **General input settings**, complete the following field:
   + **SCTE 35 PID**: Enter the PID value. If the value is left blank, the first SCTE 35 PID present in the input will be selected.

1. If appropriate, repeat for other **Input attachments**.

**To set the source in an HLS input**

1. On the **Create/Edit channel** page, in the navigation pane, choose **Input attachments**. 

1. For each HLS input, in **Network input settings**, in **HLS input settings**, choose **HLS input**. More fields appear.

1. Set SCTE 35 source to **SEGMENTS** (the default) or **MANIFEST**.

**Topics**
+ [

## Supported manifest formats
](#scte35-get-ready-source-support)
+ [

## How MediaLive creates the SCTE 35 messages
](#scte35-get-ready-source-create-message)
+ [

## How MediaLive inserts the message: preroll
](#scte35-get-ready-source-preroll)

## Supported manifest formats


Read the following sections if you set up to use the HLS input manifest as the SCTE 35 source.

MediaLive can generate SCTE35 splice insert messages from **EXT-X-CUE-OUT** and optionally **EXT-X-CUE-IN** tags within the source HLS manifest. Following are examples of supported formats for these tags.
+ `#EXT-X-CUE-OUT:DURATION=60.000`
+ `#EXT-X-CUE-OUT:DURATION="60.000"`
+ `#EXT-X-CUE-OUT:60.000`
+ `#EXT-X-CUE-OUT:"60.000"`
+ `#EXT-X-CUE-IN`

## How MediaLive creates the SCTE 35 messages


For each `EXT-X-CUE-OUT`, MediaLive creates an SCTE 35 message of type splice insert with the following data:
+ `splice_event_id`: A number that increments, starting with 1 for the first CUE-OUT message that MediaLive creates from the current input. 
+ `out_of_network_indicator`: true (1)
+ `program_splice_flag`: true (1)
+ `duration_flag`: true (1)
+ `break_duration`:
  + `auto_return`: 1
  + `reserved`: 0
  + `duration`: The duration from the manifest, converted to 90kHz ticks. For example, 15 seconds is 1350000 ticks.
+ `splice_immediate_flag`: 0 (false)
+ `splice_time`: Use the video PTS of the first frame of the video segment that follows this EXT-X-CUE-OUT in the input manifest
+ `unique_program_id`: 0
+ `avail_num`: A number that increments, starting with 1 for the first CUE-OUT message that MediaLive creates from the current input.
+ `avails expected`: 0

For each `EXT-X-CUE-IN`, MediaLive creates an SCTE 35 message of type splice insert with the following data:
+ `splice_event_id`: The ID from the most recent EXT-X-CUE-OUT in the manifest.
+ `out_of_network_indicator`: false (0)
+ `program_splice_flag`: true (1)
+ `duration_flag`: false (0)
+ `splice_immediate_flag`: 0 (false)
+ `splice_time`: Use the video PTS of the first frame of the video segment that follows this EXT-X-CUE-IN in the input manifest
+ `unique_program_id`: 0
+ `avail_num`: The value from the most recent EXT-X-CUE-OUT
+ `avails expected`: 0

## How MediaLive inserts the message: preroll


MediaLive includes a preroll when it inserts the SCTE 35 message that corresponds to the CUE-OUT. This preroll is 5 seconds in advance of the splice\$1time in the SCTE 35 message. 

MediaLive reduces the preroll if the channel doesn't have enough buffering to allow the preroll. The buffer, in seconds, is the product of the following:
+ Input segment duration, which is specified in the input manifest
+ Number of segments to include in the buffer. You set this value in the **Buffer segments** field when you attach the HLS input.

For example, if the segment duration is 6 seconds and the number of segments is 3, then the buffer is 18 seconds.

**Ensuring an adequate preroll**

If the calculated buffer for your input is shorter than 5 seconds, MediaLive reduces the preroll. MediaLive might reduce the preroll to 0, which would mean that the PTS value of the SCTE35 message equals the PTS of the splice time.

To avoid an inadequate preroll, we recommend that you make sure that the buffer is *at least* equal to the preroll, plus one segment. Follow these steps:
+ Step 1: Calculate the minimum buffer, in seconds, for your input: Preroll in seconds \$1 length of one segment in seconds
+ Step 2: Calculate the number of segments in that minimum buffer: Divide the minimum buffer by the segment length
+ Step 3: Round that minimum up to a whole number. Or that minimum is less than 3, round that number up to 3.
+ Step 4: Enter this number (or a bigger number, if you want) in the **Buffer segments** in the Input attachment. 

For example, assume the segment length is 2 sec. 
+ Step 1: 5 \$1 2 = 7
+ Step 2: 7 secs divided by 2 = 3.5
+ Step 3: Round up to 4.
+ Step 4: Enter that number (or a bigger number) in the **Buffer segments** in the Input attachment. 

# Getting ready: Set the ad avail mode
Get ready: Set ad avail modeSegment breaks triggered by SCTE 35 messages.

You can now configure how MediaLive performs segmentation in some types of output group, when a SCTE 35 message is inserted into the output.

You must set the mode for SCTE 35 handling. The blanking, blackout, and manifest decoration features of MediaLive work different depending on the mode.

**To set the ad avail mode**

1. In the channel that you are creating, in the navigation pane, choose **General settings**. Choose **Avail configuration**.

1. Complete the fields as follows:    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/getting-ready-set-the-ad-avail-mode.html)

This table identifies how the two different ad avail modes work. It identifies the combinations of message type and segmentation type that each mode considers as an *ad avail*. Note that in both modes, MediaLive looks at both splice insert messages and time signal messages.

To read this table, find a message type in the first column and a segmentation type in the second column. The third and fourth columns specify whether MediaLive treats this message combination as an ad avail when the mode is splice insert mode and when the mode is timesignal APOS mode.

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/getting-ready-set-the-ad-avail-mode.html)

# Enabling manifest decoration in the output
Manifest decoration

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


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


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


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



| 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


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


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


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


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


**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


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
```

# Enabling ad avail blanking in the output
Ad avail blankingHandling of SCTE 35 messages based on description

The chapter includes information that describes how MediaLive handles SCTE 35 messages depending on the ad avail mode and the segmentation descriptor in the message. This information has been corrected to clarify that in splice insert mode, messages with no segmentation descriptor are not treated as ad avails.

In a MediaLive channel, you can enable ad avail blanking to blank out the content for an SCTE 35 message that is considered an ad avail (as defined by the ad avail mode in [Getting ready: Set the ad avail mode](getting-ready-set-the-ad-avail-mode.md)).

A similar feature is [blackout](enable-blackout.md).

Blanking involves the following processing:
+ Replace the video content associated with this event with an image that you specify or is with a black image. 
+ Remove the audio that is associated with this event. 
+ Remove the captions that are associated with this event. 

**Comparison to Manifest Decoration and Passthrough**

Ad avail blanking applies to all outputs. You cannot choose to blank out for some outputs (for example, the HLS output) and not blank out for others (for example, the Microsoft Smooth output). It is an all-or-nothing decision. 

Manifest decoration and passthrough have a smaller scope: they apply only to outputs that support these features. 

**Important**  
Be careful not to get into the following situation:  
You do *not* do passthrough.
You do *not* do manifest decoration in a specific output (because they are not supported or because you choose not to).
You do implement blanking
In this situation, there will be no markers for where the blanked content occurs. The only way to identify where this blanking is occurring will be to look for the IDR i-frames that identify where the SCTE 35 message used to be.

**Topics**
+ [

# Enabling blanking
](procedure-to-enable-ad-avail-blanking.md)
+ [

# Triggers for ad avail blanking
](triggers-for-ad-avail-blanking.md)
+ [

# Ad avail blanking restriction flags
](ad-avail-blanking-restriction-flags.md)

# Enabling blanking


Follow this procedure if you want to enable the ad avail blanking feature in a MediaLive channel.

**To enable blanking**

1. In the channel that you are creating, in the navigation pane, choose **General settings**. 

1.  Set the ad avail mode, if you have not already done so. See [Getting ready: Set the SCTE 35 source—segments or manifest](scte35-getting-ready-source.md). The mode identifies which of all possible events are treated as triggers for blanking, which determines [when video is blanked](triggers-for-ad-avail-blanking.md). 

1. Still in **General settings**, in **Avail blanking**, in **State**, choose **Enabled**.

1. In **Avail blanking image**, choose the appropriate value:
   + Disable: To use a plain black image for blanking.
   + Avail blanking image: To use a special image for blanking. In the **URL** field, type the path to a file in an S3 bucket. For integration with MediaLive, the bucket name mustn't use dot notation. For example, `mycompany-videos` is acceptable but `mycompany.videos` isn't. The file must be of type .bmp or .png. Also enter the user name and Systems Manager password parameter for accessing the S3 bucket. See [About the feature for creating password parameters](requirements-for-EC2.md#about-EC2Password).

# Triggers for ad avail blanking


For ad avail blanking, the ad avail mode that you set controls which SCTE 35 events result in the blanking of the content in the MediaLive outputs.

## Triggers in splice insert mode


This section describes which message type and segmentation type combination is blanked by ad avail blanking when the Ad Avail mode is Splice Insert mode. 

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/triggers-for-ad-avail-blanking.html)

## Triggers in timesignal APOS mode


This section describes which message type/segmentation type combination is blanked by ad avail blanking when the Ad Avail mode is Timesignal with APOS mode. 

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/triggers-for-ad-avail-blanking.html)

# Ad avail blanking restriction flags


This section provides information about the restriction flags that you can set in a MediaLive channel, when you set up for ad avail blanking.

**Restrictions in the input**

SCTE 35 messages of type time\$1signal always contain segmentation descriptors. 

SCTE 35 messages of type splice\$1insert might or might not include segmentation descriptors.

If the input has SCTE 35 messages that do include segmentation descriptors, these segmentation descriptors always include two types of flags. Each flag has a value of "true" or "false" and provides additional information as guidance for blanking in specific situations:
+ web\$1delivery\$1allowed\$1flag 
  + True means that there is no restriction on including the ad avail event’s content in a stream that is intended for web delivery: there is no need to blank out content in streams intended for web delivery. 
  + False means there is a restriction: the content should be blanked out. 
+ no\$1regional\$1blackout\$1flag

  (The wording of this flag is confusing. Think of it as the "regional\$1delivery\$1allowed\$1flag".)
  + True means that there is no restriction on including the ad avail event’s video in a stream that is intended for regional markets: there is no need to blank out content in streams intended for regional markets. 
  + False means there is a restriction: the content should be blanked out.

If neither flag is present (usually the case with splice\$1inserts), then both are considered to be false. Blanking should occur.

If both flags are present (which is usually the case with time\$1signal; it is unusual to have only one flag present), then a "false" for one flag takes precedence over a "true" for the other flag. Blanking should occur.

Typically, in any message in the input only one of these flags is ever set to false, so only one restriction is ever in place. There would typically never be *both* a regional delivery restriction and a web delivery restriction. This is because if content is considered restricted for regional delivery, then it would not also be considered restricted for web delivery (where the concept of a region makes no sense).

**Representation of these Restrictions in MediaLive**

There are two fields in MediaLive that let you control how MediaLive responds to the these flags. See [Enabling blanking](procedure-to-enable-ad-avail-blanking.md). Typically, you set the two fields to Follow (the default), to instruct MediaLive to follow the behavior implied by the value of the flag.

# Enabling blackout in the output
Blackout

In a MediaLive channel, you can enable blackout to blank out the content for an SCTE 35 message that is of type *other event* (as defined by the mode in [Getting ready: Set the ad avail mode](getting-ready-set-the-ad-avail-mode.md)). For example, chapters and programs.

(A similar feature is described in [Enabling ad avail blanking in the output](enable-ad-avail-blanking.md).)

Blackout involves the following processing:
+ Replace the video content associated with the event with an image that you specify or is with a black image.
+ Remove the audio that is associated with the event.
+ Remove the captions that are associated with the event.

**Comparison to manifest decoration and passthrough**

Blackout applies to all outputs. You cannot choose to black out for some outputs (for example, the HLS output) and not black out for others (for example, the Microsoft Smooth output). It is an all-or-nothing decision. 

Manifest decoration and passthrough have a smaller scope: they apply only to outputs that support these features. 

**Important**  
Take note of this fact, because if you do *not* do passthrough and do *not* do manifest decoration in a specific output (because they are not supported or because you choose not to) but you do implement blanking, there will be no "markers" for where the blanked content occurs. The only way of identifying where this blanking is occurring will be to look for the IDR i-frames that identify where the SCTE 35 message used to be.

**Topics**
+ [

# Enabling blackout
](procedure-enable-blackout.md)
+ [

# Triggers for blackout
](triggers-for-blackout.md)
+ [

# Blackout restriction flags
](blackout-restriction-flags.md)

# Enabling blackout


Follow this procedure if you want to enable the blackout feature in a MediaLive channel.

**To enable blackout**

1. In the channel that you are creating, in the navigation pane, choose **General settings**. 

1.  Set the ad avail mode, if you have not already done so. See [Getting ready: Set the SCTE 35 source—segments or manifest](scte35-getting-ready-source.md). The mode identifies which of all possible events are treated as triggers for blackouts, which determines [when video is blacked out](triggers-for-blackout.md). 

   

1. Still in **General settings**, in **Blackout slate**, in **State**, choose **Enabled**.

1. For **Blackout slate image**, choose the appropriate value:
   + **Disable**: To use a plain black image for blackout.
   + **Avail blanking image**: To use a special image for blackout. In the **URL** field, enter the path to a file in an Amazon S3 bucket. For integration with MediaLive, the bucket name mustn't use dot notation, which means it mustn't use . (dot) between the words in the bucket name. The file must be of type .bmp or .png. Also enter the user name and Systems Manager password parameter for accessing the S3 bucket. For information about this key, see [About the feature for creating password parameters](requirements-for-EC2.md#about-EC2Password).

1. If you want to enable network end blackout (in other words, black out content when network transmission has ended and remove blackout only when network transmission resumes), continue reading. If you don't want to enable it, you have now finished setting up. 

1. For **Network end blackout**, choose **Enabled**.

1. For **Network end blackout image**, choose the appropriate value:
   + **Disable**: To use a plain black image for blackout.
   + **Network end blackout image**: To use a special image for network end blackout. In the **URL** field, enter the path to a file in an Amazon S3 bucket. For integration with MediaLive, the bucket name mustn't use dot notation, which means it mustn't use . (dot) between the words in the bucket name. The file must be of type .bmp or .png. Also enter the user name and Systems Manager password for accessing the S3 bucket. See [About the feature for creating password parameters](requirements-for-EC2.md#about-EC2Password).

1. For **Additional settings**, in **Network ID**, type the EIDR ID of the network in the format 10.nnnn/xxxx- xxxx- xxxx- xxxx-xxxx-c (case insensitive). Only network end events with this ID will trigger blackout.

# Triggers for blackout


The blackout feature is triggered only by time\$1signal messages of segmentation type **Other**. It is not triggered by splice\$1insert messages of any segmentation type, and is not triggered by time\$1signal messages of any type except **Other**. 

SCTE 35 messages of type ID "splice insert" and messages of type ID "time signal" can both include "Other" time\$1signal messages. Therefore, when enabling blackout, the [ad avail mode](getting-ready-set-the-ad-avail-mode.md) is not relevant. Blackout works the same with either mode.

The segmentation ID triggers blackout based on events, as shown in the following table.

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/triggers-for-blackout.html)

For example, if the blackout feature is enabled, then blanking always occurs when a Program Start message is encountered and always ends when a Program End message is encountered.

Note that the triggers for blackout on a Network event are different from the other events:
+ With Network, blanking starts when the Network *End* instruction is encountered.
+ With other events, blanking starts when the "Event *Start*" instruction is encountered.

**End event trigger hierarchy**

Events have the *strength hierarchy* shown in the following table. A blackout can be ended only by an event of equal or greater strength than the event that started it.

For example, if the blackout is started by a Program Start, it can be ended by a Network Start, an Unscheduled Event End or a Program End. It cannot be ended by a Chapter End. MediaLive ignores the "end blackout" instruction implied by the Chapter End.


| SCTE 35 segmentation type | Strength | 
| --- | --- | 
| Network | 1 (Strongest) | 
| Unscheduled Event | 2 | 
| Program | 3 | 
| Chapter | 4 (Weakest) | 

# Blackout restriction flags


This section provides information about the restriction flags that you can set in a MediaLive channel, when you set up for blackout.

**Restrictions in the input**

The segmentation descriptors in messages that are blackout triggers always include two types of flags. These flags provide additional information as guidance for blackout in specific situations:
+ web\$1delivery\$1allowed\$1flag
  + True means that there is no restriction on including the event’s content in a stream that is intended for web delivery. There is no need to black out content in streams intended for web delivery. 
  + False means that there is a restriction. The content should be blacked out. 
+ no\$1regional\$1blackout\$1flag
  + True means that there is no restriction on including the event’s video in a stream intended for regional markets. There is no need to black out content in streams intended for regional markets. 
  + False means that there is a restriction. The content should be blacked out.

If both flags are present (which is usually the case; it is unusual to have only one flag present), then a "false" for one flag takes precedence over a "true" for the other flag. Blackout should occur.

Typically, in any message in the input only one of these flags is ever set to false, so only one restriction is ever in place. There would typically never be both a regional delivery restriction and a web delivery restriction. This is because if content is considered restricted for regional delivery, then it would not also be considered restricted for web delivery (where the concept of a region makes no sense).

**Representation of these flags in MediaLive**

There are two fields in MediaLive that let you control how MediaLive responds to these flags. See [Enabling blanking](procedure-to-enable-ad-avail-blanking.md). Typically, you set the two fields to Follow (the default), to instruct MediaLive to follow the behavior implied by the value of the flag.

# Enabling SCTE 35 passthrough or removal
Passthrough of SCTE 35 messages

You can set up the MediaLive channel so that SCTE 35 messages from the input are passed through (included) in the data stream for the following outputs:
+ Outputs in an Archive output group.
+ Outputs in an HLS output group.
+ Outputs in a MediaPackage output group. For these types of output groups, passthrough is always enabled. You can't disable it.
+ Outputs in a Multiplex output group. For Multiplex output groups, SCTE 35 passthrough is enabled by default.
+ Outputs in an SRT caller output group.
+ Outputs in a UDP output group.

**Alignment with video**

The PTS of the SCTE 35 message is adjusted to match the PTS of the corresponding video frame. 

**Passthrough is at the output level**

SCTE 35 passthrough or removal applies at the output level. The messages are passed through or removed only in a specific output. For most outputs, the default behavior (if you do not change the configuration fields) is to remove the messages. For MediaPackage outputs, the default behavior is to pass through the messages; you can't change this behavior.

**Packet identifier (PID) selection from the input**

If your source contains multiple SCTE 35 PIDs, you might want to select a specific PID to pass through to the output. By default, MediaLive will select the first SCTE 35 PID that is present on the input. This can be changed by selecting a specific PID value from the **General input settings** section of the **Input attachment**. If the PID value selected is not present in the input, no SCTE 35 PID will be passed from input and an alert will be triggered.

**Topics**
+ [

## Enabling passthrough for Archive outputs
](#procedure-to-enable-passthrough-archive)
+ [

## Enabling passthrough for CMAF Ingest outputs
](#procedure-to-enable-passthrough-cmafi)
+ [

## Enabling passthrough for HLS outputs
](#procedure-to-enable-passthrough-hls)
+ [

## Enabling passthrough for SRT caller outputs
](#procedure-to-enable-passthrough-srt)
+ [

## Enabling passthrough for UDP outputs
](#procedure-to-enable-passthrough-udp)

## Enabling passthrough for Archive outputs


Follow this procedure if you want to enable or disable passthrough of SCTE 35 message for MediaLive Archive outputs.

**To enable passthrough**

1. In the channel that you are creating, find the **Archive** output group that contains the output that you want to set up.

1. Choose that output.

1. In **PID settings**, complete the following fields:
   + **SCTE 35 control**: Set to **Passthrough**.
   + **SCTE 35 PID**: Leave the default PID or enter the PID where you want the SCTE 35 messages to go. 

1. If appropriate, repeat for other outputs in this or other **Archive** output groups.

All SCTE 35 messages from the input are included in the data stream of the outputs that you have set up.

## Enabling passthrough for CMAF Ingest outputs


Follow this procedure if you want to enable or disable passthrough of SCTE 35 message for MediaLive CMAF Ingest outputs.

**To enable passthrough**

1. In the **Create channel** or **Edit channel** page for the channel, in the **Channel** panel, find the **CMAF Ingest** output group that you want to set up. Select the output group by its name. The details appear in the right panel.

1. In **CMAF Ingest settings** section, set **SCTE35 type** to the appropriate value:
   + **NONE**: Omits the SCTE 35 messages from the output group.
   + **SCTE\$135\$1WITHOUT\$1SEGMENTATION**: Includes (passes through) the SCTE 35 messages in the output group.

     Each SCTE 35 message inserted will result in a new IDR in the video, but it won't result in a new segment. Note that CMAF Ingest doesn't require that SCTE 35 messages force a new segment. 

## Enabling passthrough for HLS outputs


Follow this procedure if you want to enable or disable passthrough of SCTE 35 message for MediaLive HLS outputs.

**To enable passthrough**

1. In the channel that you are creating, find the HLS output group that contains the output that you want to set up. 

1. Choose that output.

1. In **PID settings**, complete the following fields:
   + **SCTE 35 behavior**: Set to **Passthrough**.
   + **SCTE 35 PID**: Leave the default PID or enter the PID where you want the SCTE 35 messages to go. 

1. If appropriate, repeat for other outputs in this or other HLS output groups.

All SCTE 35 messages from the input will be included in the data stream of the outputs that you have set up.

## Enabling passthrough for SRT caller outputs


Follow this procedure if you want to enable or disable passthrough of SCTE 35 message for MediaLive SRT caller outputs.

**To enable passthrough**

1. In the channel that you are creating, find the SRT caller output group that contains the output that you want to set up. 

1. Choose that output.

1. In **PID settings**, complete the following fields:
   + **SCTE 35 control**: Set to **Passthrough**.
   + **SCTE 35 PID**: Leave the default PID or enter the PID where you want the SCTE 35 messages to go. 

All SCTE 35 messages from the input will be included in the data stream of the outputs that you have set up.

## Enabling passthrough for UDP outputs


Follow this procedure if you want to enable or disable passthrough of SCTE 35 message for MediaLive UDP outputs.

**To enable passthrough**

1. In the channel that you are creating, find the UDP output group that contains the output that you want to set up. 

1. Choose that output.

1. In **PID settings**, complete the following fields:
   + **SCTE 35 control**: Set to **Passthrough**.
   + **SCTE 35 PID**: Leave the default PID or enter the PID where you want the SCTE 35 messages to go. 

1. If appropriate, repeat for other outputs in this or other UDP output groups.

All SCTE 35 messages from the input will be included in the data stream of the outputs that you have set up.

# Inserting SCTE 35 messages using the schedule
Inserting messages

Use the [channel schedule](x-actions-in-schedule-SCTE35.md) to insert SCTE 35 messages into the outptus of a MediaLive CHANNEL. For example, you can add an action in the channel schedule to insert a splice insert in the running channel at a specific time. 

The main use case for this feature is to add SCTE 35 messages, when the source content doesn't already include SCTE 35 messages. 

To insert SCTE 35 messages in the content, create actions in the schedule. For detailed information, see [Creating an AWS Elemental MediaLive schedule](working-with-schedule.md).

After MediaLive inserts the SCTE 35 message in the channel, MediaLive processes the message in the same way as it would process SCTE 35 messages that were in the input. You define this processing when you create the channel and configure these options:
+ Blanking
+ Blackout
+ Manifest decoration
+ Passthrough

For a summary of these options, see [Scope of processing by feature](scope-by-feature.md) and [Supported features by output type](processing-applicability-by-output-type.md). 

# POIS signal conditioning
POIS signal conditioning

You can configure an AWS Elemental MediaLive channel so that your POIS server can perform *signal conditioning* on SCTE 35 messages that are in the content. Each time MediaLive encounters a SCTE 35 message in the content, MediaLive sends the message to the POIS server. The POIS server sends back a response to create a new SCTE 35 message, to replace the original message with different content, to delete the existing message, or to do nothing. 

**Note**  
To implement POIS signal conditioning, your organization must have access to a POIS server. 

**Topics**
+ [

# Supported version of the specification
](scte35-pois-about-spec.md)
+ [

# About POIS signal conditioning
](scte35-pois-about.md)
+ [

# Setting up for POIS signal conditioning
](scte35-pois-setup.md)

# Supported version of the specification


MediaLive communicates with a POIS server using the ESAM API. MediaLive follows the following version of the ESAM specification: 

*OpenCable Specifications Alternate Content Real-time Event Signaling and Management API, OC-SP-ESAM-API-I03-131025*

# About POIS signal conditioning


You can configure a MediaLive channel so that your POIS server handles SCTE 35 message that are in the content. 

**Note**  
To implement POIS signal conditioning, your organization must have access to a POIS server. 

## Supported conditioning actions


Each time MediaLive encounters a SCTE 35 message in the content, MediaLive sends the message to the POIS server. The POIS server responds in one of these way: 
+ Replace: It replaces the content of the original SCTE 35 message and sends it to MediaLive. The output will contain only the original SCTE 35 message, but with the new content.
+ Delete: It instructs MediaLive to delete the SCTE 35 message. The output won't contain the original SCTE 35 message.
+ No op: It instructs MediaLive to do nothing. The output will contain the original SCTE 35 message, with the original content.

The SCTE 35 messages that the POIS server returns are completely compliant with the SCTE 35 standard.

## Number of channels and number of POIS servers

+ Each MediaLive channel can communicate with only one POIS server.
+ One POIS server can communicate with multiple MediaLive channels. In this case, the POIS server identifies each channel using a unique combination of a POIS acquisition point identity and a zone identity.

## POIS signal conditioning and standard channels
Standard channels

If the channel is a standard channel (with two pipelines), then each pipeline sends the SCTE 35 message to the POIS server. The POIS server responds to each request. Each pipeline handles its own response. Typically, the POIS server sends the identical instruction to both pipelines.

# Setting up for POIS signal conditioning


With POIS signal conditioning, the MediaLive channel and the POIS server must be set up with identical information.

## Required information


Obtain the following information from the POIS operator:
+ The *POIS server endpoint*. This is the URL of the POIS server that MediaLive will send events to. The URL must be reachable by MediaLive.
+ The *Acquisition point identity* and the *Zone identity* (optional). These two fields ensure that MediaLive and the POIS server have a common identifier for the channel.
+ POIS endpoint credentials, if the POIS server requires credentials.

## Set up the channel


You must configure the channel with information about the POIS server.

1. Open the MediaLive console at [https://console.aws.amazon.com/medialive/](https://console.aws.amazon.com/medialive/).

1. Display the details for the channel. In the **General settings** section, expand **Avail Configuration**.

1. Complete the fields as follows:
   + **Avail Settings**: **ESAM**
   + **POIS Endpoint**: The URL that you obtained from the POIS operator.
   + **Acquisition Point Identity**: The value that you obtained from the POIS operator.
   + **Zone Identity**: The value that you obtained from the POIS operator.
   + **Ad Avail Offset**: Enter 0 unless the POIS operator tells you to enter a different value. 
   + **POIS Endpoint Credentials** (optional): Complete these fields if your POIS server requires a username and password.