

# Setting up an RTMP pull input
RTMP pull input

This section describes how to set up the source content on the upstream system, and how to create an RTMP pull input that connects the upstream system to MediaLive. 

With an RTMP Pull input, MediaLive connects to the upstream system when the channel starts and *pulls* the sources. 

To perform this setup, you must work with an operator at the upstream system.

**Topics**
+ [

# Obtain information
](setup-rtmp-pull-obtain-info.md)
+ [

# Create an RTMP pull input
](setup-input-rtmp-pull.md)
+ [

# Ensure correct setup on the RTMP upstream system
](setup-uss-rtmp-pull.md)
+ [

# Result of this procedure
](setup-result-rtmp-pull.md)

# Obtain information
Step 1: Obtain information

Obtain the following information from your contact person at the upstream system:
+ The application name and application instance for the source content. (The application instance is also known as the *stream* or *stream key*.) There are two sources for a standard-class input , or one source for a single-class input. For information about input classes and their uses, see [Choosing the channel class and input class](class-channel-input.md). For information about input classes and their uses, see [Choosing the channel class and input class](class-channel-input.md). 

  The operator of the upstream system might already have rules for assigning these names. If not, you might have names that you would like to use. Make sure that you and the operator of the upstream system are clear about these names.

  In this example, the application name and instance name are identical. But they could be different:

  Application name: `live`, and instance name `curling`

  Application name: `live`, and instance name `curling`
+ The public IP addresses that MediaLive will pull the source content from.

  These addresses must include port 1935. For example:

  `rtmp://203.0.113.13:1935`

  `rtmp://198.51.100.54:1935`
+ The user name and password to access the upstream system, if the upstream system requires authenticated requests. Note that these user credentials relate to user authentication, not to the protocol. User authentication is about whether the upstream system will accept your request. The protocol is about whether the request is sent over a secure connection.

# Create an RTMP pull input
Step 2: Create input

After you have obtained information from the upstream system, you can create an HLS input.

**To create an RTMP pull input**

1. Make sure that you have the information from [step 1](setup-rtmp-pull-obtain-info.md).

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

1. In the navigation pane, choose **Inputs**. On the **Inputs** page, choose **Create input**.

1. Complete the **Input details** section:
   + **Input** name – enter a name.
   + **Input type** – choose **RTMP (pull)**. 

1. In the **Input class** section, choose the class for this input:
   + STANDARD\$1INPUT
   + SINGLE\$1INPUT

1. In the **Input sources** section, enter the URLs you previously obtained: 
   + If the input is a standard-class input, complete both fields, to provide two URLs.
   + If the input is a single-class input, complete the first field with the URL that you obtained and leave the second field empty.

   For example:

   `rtmp://203.0.113.13:1935/live/curling`

   If the upstream system requires that you provide user credentials, you must also enter the user name and password key for accessing the location. These credentials are stored on the Systems Manager Parameter Store. For more information, see [About the feature for creating password parameters](requirements-for-EC2.md#about-EC2Password).

1. In the **Tags **section, create tags if you want to associate tags with this input. For more information, see [Tagging resources](tagging.md).

1. Choose **Create**.

   MediaLive creates the input and adds it to the list of inputs. The input specifies either one or two sources. The sources don't appear in the list, but if you choose the **Name** link, the details page shows them.

   When you start the channel, MediaLive will connect to the upstream system at this source location or locations and pull the content: 
   + If you will set up the channel as a standard channel, MediaLive expects the upstream system to provide two sources and will therefore attempt to pull from both source locations.
   + If you will set up the channel as a single-pipeline channel, MediaLive expects the upstream system to provide one source and will therefore attempt to pull from one source location. 

# Ensure correct setup on the RTMP upstream system
Step 3: Set up upstream

An operator at the upstream server must set up the source content on the upstream system. Make sure that the operator sets up as follows:
+ They set up to deliver the correct number of sources:
  + If the MediaLive channel is a standard channel, set up two sources for the content. Make sure that the two source contents are identical in terms of video resolution and bitrate.
  + If the MediaLive channel is a single-pipeline channel, set up one source for the content. 
+ They set up to make the content available at the agreed URLs, and they use the agreed application names and instance names. These URLs are the URLs that you obtained [earlier in this section](setup-mp4-obtain-info.md), and that you configured into the RTMP input. They correspond to the URLs shown in [the diagram after this procedure](setup-result-rtmp-push.md). 

# Result of this procedure


As a result of this setup, an RTMP pull input exists that specifies one or two *source* URLs. These sources are the URLs for the source content on the upstream system. 

At runtime of the channel, the input will connect to two URLs (for a standard channel) or one URL (for a single-pipeline channel), and pull the source content identified by the application name and instance name into MediaLive.

![\[Diagram showing two GET requests to rtmp URLs for upstream systems input.\]](http://docs.aws.amazon.com/medialive/latest/ug/images\rtmp-pull-uss-input.png)
