

# Assess the sources
Step 2: Assess sources

When planning a multiple-input MediaLive channel, you must identify all the sources that you need. You must then assess the audio and captions in each source to ensure that the source is suitable for an input-switching scenario.

**Result of this Step**

After this step, you have a set of sources that you can successfully set up as inputs and attach to the channel in order to implement input switching in the channel. You have categorized these sources by their type: live sources or file sources.

**Topics**
+ [

# Identify the sources
](ips-collect-sources.md)
+ [

# Assess the video in the sources
](ips-assess-video.md)
+ [

# Assess the audio in the sources
](ips-assess-audio.md)
+ [

# Assess the captions in the sources
](ips-assess-captions.md)

# Identify the sources
Identify sources

1. Identify all the sources that you will need through the lifetime of the MediaLive channel or at least until the next planned maintenance period.

1. Note which sources are push inputs and which are pull inputs. Make sure that you don't exceed the [limits](eml-limitations-and-rules.md#limits-inputs). 

1. Note which sources are live sources and which are file sources. For information on whether a source is a live or file (VOD) source, see [Input types supported in MediaLive](inputs-supported-containers.md).

# Assess the video in the sources
Assess video

There are no special requirements for the video when planning a multiple-input MediaLivechannel. Assuming that AWS Elemental MediaLive supports the video codec that is in a source, you can use that source as an input for the channel. 

There is no requirement for the sources to have matching video codecs.

# Assess the audio in the sources
Assess audio

MediaLive provides flexibility in extracting audio from sources in a multiple-input MediaLive channel. It also has some special requirements for the audio in these sources. 

**To assess the audio in the sources**

1. Read the information lower down about flexibility to get a sense of how MediaLive supports a wide variety of audio sources.

1. Then read each of the requirements for information on specific constraints in the audio sources. Make sure that the audio in each source meets these requirements.

1. If you reject a source, you might want to contact the upstream system to determine if it could provide a more suitable version of the source content. 

## Flexibility in using audio


When assessing the audio, note the following rules. These rules provide flexibility in extracting audio, and therefore allow you to use a variety of sources:
+ Different languages in a source can use different codecs. For example, in your sources English might be in AAC while Spanish is in MPEG-2.
+ The method of identifying an audio language in the source doesn't have to be the same in all the sources in the multiple-input channel. 

  For example, in source 1 you can identify the languages by PID. In source 2, you can identify by language code.

## First requirement: each language must have the same coding mode in all sources


Each output language must be present in every source, and the coding mode must be the same in all sources. 

For example, assume that the channel contains an Archive output group that contains one audio encode for English 2.0 and one audio encode for French 2.0: 
+ Assume that you have a source that contains AAC 2.0 audio in English and Dolby Digital 5.1 in French. 
+ Assume that you have a second source that contains AAC 2.0 audio in English and AAC 5.1 audio in French.

  For English, this source contains audio with the same codec and coding mode as the first source. For French, it contains the same coding mode as the first source but a different codec.

  This source is acceptable. The fact that in a comparison of source 1 and source 2, the codecs are different for French isn't relevant. The requirement is that the *coding modes* are the same. 
+ Assume that you have a third source that contains AAC 2.0 audio in English and AAC 2.0 audio in French. 

  This source is *not* acceptable because for French, the audio has a different coding mode from the first source.

## Second requirement: each language must provide the highest coding mode required


For each language, every source must include audio that can produce all the highest coding mode among all the outputs in the channel. 

For example, assume that the channel contains an Archive output group that contains one audio encode for Spanish AAC 2.0. The channel also contains one HLS output group that contains one audio encode for Spanish Dolby Digital 5.1:
+ Assume that you have an source that contains Dolby Digital 5.1 audio in Spanish. 

  This source contains audio that can produce all the desired output audio encodes for Spanish. You must set up the Archive output to remix the audio down to 2.0. You don't need to set up the HLS output to remix the audio.
+ Assume that you have a second source that contains AAC 2.0 in Spanish. 

  This source is *not* acceptable. This source can't produce Spanish Dolby Digital 5.1 for the HLS output. 

## Third requirement: mp4 sources should not contain variations of the same language


An MP4 file that contains multiple variations of a language might produce undesirable output audio. For best results, the file should contain only one version of a language: 
+ For example, assume that one MP4 source contains AAC 5.1 audio in English. The channel output requires one audio encode for English 2.0. Therefore, in the output you set up the audio encode to down mix from 5.1 to 2.0.
+ Assume that you have a second source that contains AAC 2.0 in English in track 2, and Dolby Digital 5.1 audio in English in track 3. 

  MediaLive extracts audio from MP4 files by language code and it extracts from the first track that contains that language. In this example, it extracts track 2, which contains AAC 2.0. It ignores track 3. On the output side, MediaLive will try to remix this source, resulting in audio that has poor quality. 

## Fourth requirement: all sources must contain dolby if producing passthrough encode


If one of the outputs includes an encode that is set up with the Passthrough codec, then all the sources must include Dolby Digital, Dolby Digital Plus, or Dolby Atmos in all the required language or languages. 

If any single source doesn't include one of these codecs, you can't use it in the multiple-input channel.

The Passthrough option for a codec allows for the ability to ingest audio that is in Dolby Digital, Dolby Digital Plus, or Dolby Atmos and in any coding mode, and pass it through without transcoding it.

# Assess the captions in the sources
Assess captions

 There are special requirements for the captions in sources for a MediaLive multiple-input channel. 

**To assess the captions in the sources**

1. Read each of the requirements that follow for information on specific constraints in the captions sources. Make sure that the captions in each source meets these requirements.

1. If you reject a source, you might want to contact the upstream system to determine if it could provide a more suitable version of the source content. 

## First requirement: a source must contain all required captions languages and formats


With a multiple-input channel, for every output there must be a captions asset in the source that can produce the captions in that output. If a source doesn't have all the source captions to produce all the output captions, it can't be used as a source in a multiple-input channel.

For example, assume that the channel contains an Archive output group that contains one output with one captions encode for embedded captions in English, French, Spanish, and German. The channel also contains one HLS output group that contains four captions outputs, one each for English, French, Spanish, and German Web VTT captions.

Every source must include a captions source that can produce both embedded and Web VTT captions. The source can contain one captions source that can produce both output types, or the source can contain two captions sources:
+ Assume that you have a source that contains embedded captions in the four languages.

  This source is acceptable because embedded captions can produce embedded captions in the output and Web VTT captions in the output.
+ Assume that you have a source that contains DVB Sub in the four languages.

  This source is *not* acceptable because DVB Sub captions can't produce embedded captions in the output.
+ Assume that you have a source that contains embedded captions in English, French, German, and Bulgarian.

  This source is *not* acceptable because one of the languages is Bulgarian instead of Spanish.
+ Assume that you have a source that contains embedded captions in English and French.

  This source is *not* acceptable because it is missing two of the output languages.

## Second requirement: for embedded passthrough all sources must contain languages in the same order


When there is at least one output that has embedded captions and there are at least two sources that have embedded captions, the languages must be in the same order in those sources. 

*Passthrough *means that an output requires embedded captions encodes in one or more languages, and a source contains embedded captions (typically in four languages). For example, the output requires English and Spanish embedded captions. A source contains embedded captions in English and Spanish, and possibly in two other languages. 

If two sources have the embedded captions languages in a different order, you can't use both the sources in the multiple-input channel. You must use only one of the sources. 

Look again at the example from the preceding requirement:
+ Assume that you have a source that contains embedded captions with the languages in the four channels in this order: English, French, Spanish, and German. 

  Assume that you have a second source that contains embedded captions with the languages in a different order: French, Spanish, German, and English. 

  Only one of these sources is acceptable. 

When this scenario applies to your channel, you should decide which sources to keep and which ones to reject. One rule you could follow is the following: 
+ Compare the order of the captions languages in those sources.
+ Identify the order of the most important source, or identify the order that most sources follow.
+ Accept only the sources that follow this order. Reject the other sources.

**Note**  
This requirement applies only to embedded passthrough.  
If the channel doesn't contain any outputs that contain embedded captions, then you can use any source that contains embedded captions because the order of the languages in the sources isn't relevant. The embedded captions aren't passed through. They are converted to another format, such as DVB-Sub. 