AWS Elemental MediaLive
User Guide

Planning the Schedule of Input Switches

This section provides some guidelines for successfully setting up input switches in the channel.

Planning the Names

When you set up MediaLive for a channel with multiple inputs, you create inputs, you associate the inputs with a channel by setting them up as input attachments, and in the schedule you create actions that reference the input attachments.

In effect, the same video asset is referenced three times:

  • As an input

  • As an input attachment in a channel

  • As an action of type input switch in a schedule

Each of these representations has a name that you assign. The default (recommended) input attachment name on the console is equal to the input name.

Given both these points, you might want to consider using the same name for all these representations, and to establish a naming schema. For example, you could include the type (VOD or live) plus a description, such as vod_ward_cars_ad and live_studio_feed.

Handling the Transition by Controlling the Gap

When planning the schedule, you should ensure that there are no gaps in the transition from one input to another.

A gap could occur when the current input is a file input (input A) and the next scheduled input (input B) starts at a fixed time. The next input can be a file or a live input. If the current input ends before the switch start time, there is potential for a gap.

The Source end behavior field in each input attachment controls both these behaviors. (This field appears in the General input settings in each input specification.) There are two options to ensure a smooth transition in this situation:

  • If you set the Source end behavior field for input A to LOOP, then when input A finishes, MediaLive will go back and ingest it again until the start time of input B occurs.

  • If you set the Source end behavior field for input A to CONTINUE, then input A will be ingested only once; when the input finishes, the channel will follow the behavior specified in the Input Loss Behavior set of fields (although without the "repeat frames" logic). When the start time of input B occurs, the input loss behavior will end and the channel will switch to input B.

    (To display this field, in General input settings for Global configuration, for Input loss behavior, choose Input loss behavior. More fields appear.)

Handling the Transition to Ensure That a Follow Input Can Succeed

In addition to ensuring that there are no gaps in the transition from one input to another, you must also ensure that a follow input can actually succeed.

A follow input (input B) will not succeed if the current input (input A) is set up to loop. When MediaLive reaches the file end, it will start to ingest again from the beginning of the file.

The Source end behavior field in each input attachment controls both these behaviors. (This field appears in General input settings in each input specification.)

  • Set the Source end behavior for input A to CONTINUE. When input A finishes, the channel will immediately switch to input B.

When you create the channel, it is important to set the Source end behavior to CONTINUE in every input attachment where the next planned input in the schedule will be a follow input. If you don't set up the input with CONTINUE, you won't be able to set up the schedule with the next input as a follow input. You will have to cancel the schedule action, modify the input attachment, and try the schedule action again.