

# Design the selectors for each input
<a name="ips-step-plan-attachments"></a>

After you follow step 3 to organize sources into different inputs and input types (static and dynamic), you must identify the content to extract from each MediaLive input. 

**Result of This Step**

After this step you have:
+ Names for all the inputs
+ A list of video, audio, and captions selectors for each input

**Topics**
+ [

# Plan the input and input attachment names
](ips-plan-input-names.md)
+ [

# Plan the video selectors
](ips-plan-video-sels.md)
+ [

# Plan the audio selectors
](ips-plan-audio-sels.md)
+ [

# Planning the captions selectors
](ips-plan-captions-sels.md)

# Plan the input and input attachment names
<a name="ips-plan-input-names"></a>

You should plan the names for the input and the input attachment. Here are some tips:
+ Use the same name for the input and input attachments.
+ Include an indicator of whether the entity is static or dynamic.
+ For a static input, include either the name of the video source or a description of the video source. 
+ For a dynamic input, include an indicator of its characteristics, which you determined in step 2. Doing so ensures that you do not attach an unsuitable video source when you specify the URI in the input switch action.

For example, for a static input:
+ `static-filler`
+ `static-live-studio-feed`

For example, for a dynamic input:
+ `dynamic-s3-preroll-bucket-embedded-EN-FR-ES-DE`
+ `dynamic-s3-preroll-bucket-embedded-FR-ES-DE-EN`

# Plan the video selectors
<a name="ips-plan-video-sels"></a>

You can extract only one video from each MediaLive input. If a given input contains more than one video, then create a video selector to extract that specific video. If a given input contains only one video, there is no need to create a video selector. AWS Elemental MediaLive automatically finds and extracts that video. On the output side, MediaLive automatically uses that one video asset. 

# Plan the audio selectors
<a name="ips-plan-audio-sels"></a>

There are several rules you must follow when planning the audio selectors for MediaLive inputs. When you set up the audio selectors for an input, you specify the language to extract but you don't specify the format of the audio in that input. AWS Elemental MediaLive extracts that input so it can be included in the output. The output expects to be able to find the specific extracted language. 

## Rule 1: Plan the same number of selectors in every input
<a name="ips-audio-sels-rule-a"></a>

The selectors in each MediaLive input must extract sufficient assets to produce every output audio encode. In addition, every input must have the same number of selectors.

For example, assume you have an output that requires AAC 2.0 audio in English and French. You have a second output that requires Dolby 5.1 audio in English and French. You have a third output that requires Dolby 5.1 audio in French, Spanish, and Portuguese:
+ If the first input contains Dolby Digital 5.1 in the four languages, you must create four selectors—one for each language. The audio extracted by these four selectors can produce all the languages. It can produce Dolby Digital 5.1 for the first output, and it can produce AAC 2.0 for the second because you can set up that output for remixing.

  Although the channel has seven output audio encodes, you don't need seven selectors.
+ If the second input contains Dolby Digital 5.1 in French (but no other language), and also contains AAC 2.0 in English, Spanish, and Portuguese (but not in French), you create four selectors. The selector for French will find that audio only in the Dolby Digital 5.1. The selectors for the other languages will find those audio assets only in the AAC 2.0.
+ If the third input contains Dolby Digital 5.1 in the four languages, and also contains AAC 2.0 in the four languages, you still create only four selectors.

  Although you might think to create selectors to extract the AAC 2.0 audio for French and English just for this input, you mustn't do this because the first input doesn't have these selectors. Remember that every input must have the same number of selectors.

## Rule 2: Plan a separate selector for Dolby Digital Plus 7.1
<a name="ips-audio-sels-rule-b"></a>

If the MediaLive channel includes at least one output with Dolby Digital Plus 7.1, create one selector in every input for that audio asset. On the output side, in every audio encode for Dolby Digital Plus 7.1, you will map the audio encode to that selector.

After you have identified all the selectors for all the inputs, you might end up with a list like this: 
+ Selector for English
+ Selector for French
+ Selector for Spanish
+ Selector for Portuguese
+ Selector for EAC3 passthrough (EAC3 is another name for Dolby Digital Plus)

Each of these selectors applies to all inputs, regardless of the audio format in that input. 

## Rule 3: Plan the same selector names in every input
<a name="ips-audio-sels-rule-c"></a>

Every MediaLive selector for a specific language must have the same name across all the inputs. This rule exists because each output references the selectors only once. The output doesn't reference the selector once for each different input.

We recommend that you give the selectors names that include the language. Don't include the format unless you create a selector for Dolby Digital Plus 7.1. 

# Planning the captions selectors
<a name="ips-plan-captions-sels"></a>

When you set up the captions selectors for a MediaLive input, you specify both the format and the language to extract from the input. Each input has the number of selectors that is appropriate to the captions formats in that input. Therefore, each input might contain a different number of selectors. The method for extracting captions is different from the method for extracting audio. 

## Rule 1: Plan the number of selectors for an input that is appropriate to the input and output
<a name="ips-captions-sels-rule-a"></a>

In each input, you must create the number of selectors that is appropriate to the input format and output format:
+ For example, if you want to extract embedded in order to pass through the captions, you create one selector.
+ If you want to extract embedded in order to convert them to TTML, you create one selector for each language.

After you have identified all the selectors for all the inputs, you might end up with a list like this: 
+ Selector for embedded passthrough – applies to input 1, input 3, and input 4
+ Selector for embedded, English – applies to input 1, input 3, and input 4
+ Selector for embedded, French – applies to input 1, input 3, and input 4
+ Selector for DVB Sub, English – applies to input 2
+ Selector for DVB Sub, French – applies to input 2
+ Selector for Teletext passthrough – applies to all inputs

Note that inputs 1, 3, and 4 each contain four selectors. Input 2 contains three selectors. 

## Rule 2: Plan the same selector names in every input
<a name="ips-captions-sels-rule-b"></a>

Every unique selector must have the same selector name across all the inputs. This rule exists because each output references the selectors only once. The output doesn't reference the selector once for each different input where the selector exists.

We recommend that you give each selector a name that includes the language and the source format. Descriptive names help you to choose the correct selector on the output side. 