

# Managing flows in MediaConnect
<a name="flows"></a>

A flow is a transport between a source and one or more destinations. When you create a flow, you specify the source, a name, and an Availability Zone. After you create a flow, you can add outputs to indicate where you want your content to be sent and how you want it transported.

MediaConnect supports three types of flows:
+ **Transport stream flows** transport compressed content that is muxed (audio, video, and ancillary data are combined) into a single stream. The quality is high enough to use as a source for creating final encodes that are delivered to consumer devices. 

  Transport stream flows also support converting NDI® to or from transport streams, enabling you to connect your NDI-enabled production systems with traditional contribution and distribution workflows. 

  You can grant an entitlement to share the content with another AWS account. A user of the subscriber account can then create a new MediaConnect flow using your flow as the source. When this happens, the service generates an output on your flow to represent the stream that feeds the subscriber's flow. 

  It is important to manage the number of outputs and entitlements on the flow. Each transport stream flow can only have 50 outputs. Although you can grant up to 50 entitlements on a flow, each of those entitlements will generate an output. For example, you create a flow named **BasketballGame** and you add 40 outputs that send content to on-premises encoders. You also grant 30 entitlements to share your content with other AWS accounts. When your subscribers create flows using **BasketballGame** as their source, the service generates new outputs for each of those subscribers. After the first 10 subscribers create flows, your **BasketballGame** flow reaches its maximum number of outputs (40 for the original outputs that you created and another 10 that the service created for the subscribing flows). When the 11th subscriber tries to create a flow using **BasketballGame** as a source, the service returns an error. 
+ **NDI flows** take transport stream compressed content into your Virtual Private Cloud (VPC) and convert it to NDI®, or convert your NDI content to a compresesed transport stream for distribution outside of your VPC. 
+ **CDI flows** transport high-quality uncompressed or lightly compressed content into and out of the AWS Cloud. You can configure a CDI flow to use JPEG XS to transport lightly compressed content. The content is demuxed into separate media streams for audio, video, or ancillary data. Each CDI flow can use multiple media streams for the source and multiple media streams for each output. MediaConnect uses AWS Cloud Digital Interface (AWS CDI) network technology to transport content that adheres to the SMPTE 2110, part 22 transport standard. 

**Topics**
+ [

# Creating a flow
](flows-create.md)
+ [

# Viewing a list of MediaConnect flows
](flows-view-list.md)
+ [

# Viewing the details of a flow
](flows-view-details.md)
+ [

# Starting a flow
](flows-start.md)
+ [

# Stopping a flow
](flows-stop.md)
+ [

# Updating a flow
](flows-update.md)
+ [

# Managing tags on a flow
](flows-manage-tags.md)
+ [

# Deleting a flow
](flows-delete.md)
+ [

# Flow sizes and capabilities
](flow-sizes-capabilities.md)

# Creating a flow
<a name="flows-create"></a>

A flow is a connection between one or more sources and one or more outputs or entitlements.

The method that you use to create a flow is dependent on the type of flow that you want to create and the type of content in the source:
+ [Transport stream flow with a standard source](flows-create-standard-source.md) – Uses content from any source that is not a VPC source or an entitled source.
+ [Transport stream flow with an entitled source](flows-create-entitled-source.md) – Uses content that is owned by another AWS account that has granted an entitlement to your account. 
+ [Transport stream flow with a VPC source](flows-create-vpc-source.md) – Uses compressed content that comes from a VPC that you configure.
+ [NDI flow ](flows-create-ndi.md) – Uses content that comes from an NDI® sender in a VPC that you configure.
+ [CDI flow ](flows-create-cdi.md) – Uses uncompressed content that comes from a VPC that you configure.

**Note**  
If you want to create a transport stream flow that uses redundant sources for failover, create the flow with one of the sources. After the flow is created, [add the other source](source-adding.md). Because MediaConnect treats both sources as the primary source, it doesn't matter which one you specify when you first create the flow. If your flow uses an entitled source, you can't add a second source. For redundancy with CDI workflows, create two separate flows. 

# Creating a transport stream flow that uses a standard source
<a name="flows-create-standard-source"></a>

Transport stream flows transport compressed content that is muxed into a single stream. 

A flow uses a *standard* source when the content comes from anywhere other than a VPC ([VPC source](flows-create-vpc-source.md)) or another AWS account ([entitled source](#flows-create-standard-source)).

## Prerequisites
<a name="flows-create-standard-source-prerequisites"></a>

Before you begin, make sure you've completed the following steps:

**Encryption setup (if required)**  
If the source of your flow requires encryption, you'll need to [set up encryption](encryption-static-key-set-up.md).

**NDI® configuration (for NDI use cases only)**  
We recommend reviewing the [NDI outputs](outputs-using-ndi.md) documentation to familiarize yourself with this feature before getting started.  
If you want to add an NDI output to your flow, you need a VPC with NDI discovery servers provisioned in your network. MediaConnect connects to these servers, but it doesn't create them for you.   
+ For a quick start with VPCs, you can use our [AWS CloudFormation VPC template](https://docs.aws.amazon.com/vpc/latest/userguide/create-vpc.html) to automatically create a VPC with public and private subnets. For more information about VPCs, see the [Amazon VPC User Guide](https://docs.aws.amazon.com/vpc/latest/userguide/). 
+ For NDI discovery server deployment, AWS provides guidance on automated setup across multiple Availability Zones using AWS CloudFormation, including best practices for installation and configuration. For instructions, see [Setting Up NDI Discovery Servers for Broadcast Workflows](https://aws.amazon.com/solutions/guidance/programmatic-deployment-of-ndi-discovery-servers-for-broadcast-workflows-on-aws/). 
+ We recommend that you configure your security groups with a self-referencing ingress rule and egress rule. You can then attach this security group to the EC2 instances where your NDI servers are running within the VPC. This approach automatically allows all necessary NDI communication between components in your VPC, and all required network traffic is permitted. For guidance on setting up self-referencing security group rules, see [Security Group Referencing](https://docs.aws.amazon.com/vpc/latest/userguide/security-group-rules.html#security-group-referencing) in the Amazon VPC User Guide.

## Procedure
<a name="flows-create-standard-source-procedure"></a>

### Create a transport stream flow that uses a standard source (console)
<a name="flows-create-standard-source-console"></a>

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

1. On the **Flows** page, choose **Create flow**.

1. In the **Details** section, for **Name**, specify a name for your flow. This name will become part of the ARN for this flow.
**Note**  
MediaConnect allows you to create multiple flows with the same name. However, we encourage you to use unique flow names within an AWS Region to help with organization. After you create a flow, you can't change the name.

1. For **Availability Zone**, choose an Availability Zone for your flow. Use this option when you are setting up redundant flows. Otherwise, you can leave this as **Any**. If you leave the default, the service will randomly assign an Availability Zone within the current AWS Region, or if your source comes from a VPC, the service will assign the Availability Zone of the VPC subnet to the flow.

1. Under **Flow size**, select the size that matches your use case. For more information about flow sizes, see [Flow sizes and capabilities](flow-sizes-capabilities.md).

   **For medium flows:**
   + Proceed directly to step 6.

   **For large flows:**
   + If you don't need NDI outputs for your flow, proceed directly to step 6.
   + If you want to add NDI outputs to your flow, configure the NDI settings as follows:

     1. Set **Flow NDI support** to **Enabled**.

     1. (Optional) Enter an **NDI machine name**.
        + This name is used as a prefix to help you identify the NDI sources that your flow creates. For example, if you enter **MACHINENAME**, your NDI sources will appear as **MACHINENAME** `(ProgramName)`.
        + If you don’t enter a name, MediaConnect generates a unique 12-character ID as the prefix. This ID is derived from the flow's Amazon Resource Name (ARN), so the machine name references the flow resource.
**Tip**  
Thoughtful naming is especially important when you have multiple flows creating NDI sources. For example, a production environment with 100 NDI sources would benefit from clear, descriptive machine name prefixes like `STUDIO-A`, `STUDIO-B`, `NEWSROOM`, and so on. 

     1. Add up to three **NDI discovery servers**. For each server, provide the following information:
        + Enter the server IP address from your existing NDI infrastructure.
        + Select the VPC interface adapter to control network access.
        + (Optional) Specify a port number. If you leave this blank, MediaConnect uses the NDI Discovery server default of TCP-5959.
**Tip**  
You can add up to three discovery servers. Having multiple discovery servers improves reliability and helps ensure your NDI sources are discoverable across your network.

1. Determine which protocol your source uses.
**Note**  
If you want to specify redundant sources for failover, create the flow with one of the sources. After the flow is created, update it to activate failover on the source, and add the second source to the flow. Because MediaConnect treats both sources as the primary source, it doesn't matter which one you specify when you first create the flow. 

1. For specific instructions based on your source type and protocol, choose one of the following tabs:

------
#### [ RIST ]

   1. In the **Source** section, for **Source type**, choose **Standard source**.

   1. For **Name**, specify a name for your source. This value is an identifier that is visible only on the MediaConnect console. 

   1. For **Protocol**, choose **RIST**. 

   1. For **Ingest port**, specify the port that the flow will listen on for incoming content. 
**Note**  
The RIST protocol requires one additional port for error correction. To accommodate this requirement, MediaConnect reserves the port that is \$11 from the port that you specify. For example, if you specify port 4000 for the output, the service assigns ports 4000 and 4001.

   1. For **Allowlist CIDR**, specify a range of IP addresses that are allowed to contribute content to your source. Format the IP addresses as a Classless Inter-Domain Routing (CIDR) block, for example, 10.24.34.0/23. For more information about CIDR notation, see [RFC 4632](https://tools.ietf.org/html/rfc4632).
**Important**  
Specify a CIDR block that is as precise as possible. Include only the IP addresses that you want to contribute content to your flow. If you specify a CIDR block that is too wide, it allows for the possibility of outside parties sending content to your flow.

   1. For **Maximum bitrate**, specify the maximum expected bitrate (in bits per second) for the flow. We recommend that you specify a value that is twice the actual bitrate.

   1. For **Maximum latency**, specify the size of the buffer (delay) that you want the service to maintain. A higher latency value means a longer delay in transmitting the stream, but more room for error correction. A lower latency value means a shorter delay, but less room for error correction. You can choose a value from 1-15,000 ms. If you keep this field blank, the service uses the default value of 2,000 ms. 

------
#### [ RTP or RTP-FEC ]

   1. In the **Source** section, for **Source type**, choose **Standard source**.

   1. For **Name**, specify a name for your source. This value is an identifier that is visible only on the MediaConnect console. It is not visible to anyone outside of the current AWS account.

   1. For **Protocol**, choose **RTP** or **RTP-FEC**. 

   1. For **Ingest port**, specify the port that the flow will listen on for incoming content.
**Note**  
The RTP-FEC protocol requires two additional ports for error correction. To accommodate this requirement, MediaConnect reserves the ports that are \$12 and \$14 from the port that you specify. For example, if you specify port 4000 for the output, the service assigns ports 4000, 4002, and 4004. 

   1. For **Allowlist CIDR**, specify a range of IP addresses that are allowed to contribute content to your source. Format the IP addresses as a Classless Inter-Domain Routing (CIDR) block, for example, 10.24.34.0/23. For more information about CIDR notation, see [RFC 4632](https://tools.ietf.org/html/rfc4632).
**Important**  
Specify a CIDR block that is as precise as possible. Include only the IP addresses that you want to contribute content to your flow. If you specify a CIDR block that is too wide, it allows for the possibility of outside parties sending content to your flow.

   1. For **Maximum bitrate**, specify the maximum expected bitrate (in bits per second) for the flow. We recommend that you specify a value that is twice the actual bitrate.

------
#### [ SRT listener ]

   1. In the **Source** section, for **Source type**, choose **Standard source**.

   1. For **Name**, specify a name for your source. This value is an identifier that is visible only on the MediaConnect console. It is not visible to anyone outside of the current AWS account.

   1. For **Protocol**, choose **SRT listener**.

   1. For **Source description**, enter a description that will remind you later where this source is from. This might be the company name or notes about the setup.

   1. For **Allowlist CIDR block**, specify a range of IP addresses that are allowed to contribute content to your source. Format the IP addresses as a Classless Inter-Domain Routing (CIDR) block, for example, 10.24.34.0/23. For more information about CIDR notation, see [RFC 4632](https://tools.ietf.org/html/rfc4632).
**Important**  
Specify a CIDR block that is as precise as possible. Include only the IP addresses that you want to contribute content to your flow. If you specify a CIDR block that is too wide, it allows for the possibility of outside parties sending content to your flow.

   1. For **Inbound port**, specify the port that the flow listens on for incoming content. 

   1. For **Source listener address**, enter the address MediaConnect will use for the SRT connection. The address can be an IP address or a domain name.

   1. For **Source description**, enter a description that will remind you later where this source is from. This might be the company name or notes about the setup.

   1. For **Maximum bitrate**, specify the maximum expected bitrate (in bits per second) for the flow. We recommend that you specify a value that is twice the actual bitrate.

   1. For **Minimum latency**, specify the minimum size of the buffer (delay) that you want the service to maintain. A higher latency value means a longer delay in transmitting the stream, but more room for error correction. A lower latency value means a shorter delay, but less room for error correction. You can choose a value from 10–15,000 ms. If you keep this field blank, MediaConnect uses the default value of 2,000 ms. 

      The SRT protocol uses a **minimum latency** configuration on each side of the connection. The larger of these two values is used as the *recovery latency*. If the transmitted bitrate, multiplied by the recovery latency, is higher than the *receiver buffer*, the buffer will overflow and the stream can fail with a `Buffer Overflow Error`. On the SRT receiver side, the receiver buffer is configured by the SRTO\$1RCVBUF value. The size of the receiver buffer is limited by the *flow control window size* (SRTO\$1FC) value. On the MediaConnect side, the receiver buffer is calculated as the **maximum bitrate** value multiplied by the **minimum latency** value. For more information about the SRT buffer, see [the SRT Configuration Guidelines.](https://github.com/Haivision/srt/blob/master/docs/API/configuration-guidelines.md)

   1. If the source is encrypted, choose **Activate** in the **Decryption** section and do the following:

      1. For **Role ARN**, specify the ARN of the role that you created when you [set up encryption](encryption-static-key-set-up.md#encryption-static-key-set-up-create-iam-role).

      1. For **Secret ARN**, specify the ARN that AWS Secrets Manager assigned when you [created the secret to store the encryption key](encryption-static-key-set-up.md#encryption-static-key-set-up-store-key).

------
#### [ SRT caller ]

   1. In the **Source** section, for **Source type**, choose **Standard source**.

   1. For **Name**, specify a name for your source. This value is an identifier that is visible only on the MediaConnect console. It is not visible to anyone outside of the current AWS account.

   1. For **Protocol**, choose **SRT caller**.

   1. For **Source description**, enter a description that will remind you later where this source is from. This might be the company name or notes about the setup.

   1. For **Source listener address**, enter the address MediaConnect will use for the SRT connection. The address can be an IP address or a domain name.

   1. For **Source listener port**, enter the port MediaConnect will use for the SRT connection.

   1. For **Maximum bitrate** (optional), specify the maximum expected bitrate (in bits per second) for the flow. We recommend that you specify a value that is twice the actual bitrate.

   1. For **Minimum latency**, specify the minimum size of the buffer (delay) that you want the service to maintain. A higher latency value means a longer delay in transmitting the stream, but more room for error correction. A lower latency value means a shorter delay, but less room for error correction. You can choose a value from 10–15,000 ms. If you keep this field blank, MediaConnect uses the default value of 2,000 ms. 

      The SRT protocol uses a **minimum latency** configuration on each side of the connection. The larger of these two values is used as the *recovery latency*. If the transmitted bitrate, multiplied by the recovery latency, is higher than the *receiver buffer*, the buffer will overflow and the stream can fail with a `Buffer Overflow Error`. On the SRT receiver side, the receiver buffer is configured by the SRTO\$1RCVBUF value. The size of the receiver buffer is limited by the *flow control window size* (SRTO\$1FC) value. On the MediaConnect side, the receiver buffer is calculated as the **maximum bitrate** value multiplied by the **minimum latency** value. For more information about the SRT buffer, see [the SRT Configuration Guidelines.](https://github.com/Haivision/srt/blob/master/docs/API/configuration-guidelines.md)

   1. For **Stream ID** (optional), enter an identifier for the stream. This identifier can be used to communicate information about the stream.

   1. If the source is encrypted, choose **Activate** in the **Decryption** section and do the following:

      1. For **Role ARN**, specify the ARN of the role that you created when you [set up encryption](encryption-static-key-set-up.md#encryption-static-key-set-up-create-iam-role).

      1. For **Secret ARN**, specify the ARN that AWS Secrets Manager assigned when you [created the secret to store the encryption key](encryption-static-key-set-up.md#encryption-static-key-set-up-store-key).

------
#### [ Zixi push ]

   1. In the **Source** section, for **Source type**, choose **Standard source**.

   1. For **Name**, specify a name for your source. This value is an identifier that is visible only on the MediaConnect console. It is not visible to anyone outside of the current AWS account.

   1. For **Protocol**, choose **Zixi push**. 
**Note**  
MediaConnect assigns the inbound port for Zixi push sources at the time of creation. A port number of 2088 will be assigned automatically.

   1. For **Allowlist CIDR**, specify a range of IP addresses that are allowed to contribute content to your source. Format the IP addresses as a Classless Inter-Domain Routing (CIDR) block, for example, 10.24.34.0/23. For more information about CIDR notation, see [RFC 4632](https://tools.ietf.org/html/rfc4632).
**Important**  
Specify a CIDR block that is as precise as possible. Include only the IP addresses that you want to contribute content to your flow. If you specify a CIDR block that is too wide, it allows for the possibility of outside parties sending content to your flow.

   1. For **Stream ID**, specify the stream ID set in the Zixi feeder.
**Important**  
If you leave this field blank, the service uses the source name as the stream ID. Because the stream ID must match the value set in the Zixi feeder, you need to specify the stream ID if it is not exactly the same as the source name.

   1. For **Maximum latency**, specify the size of the buffer (delay) that you want the service to maintain. A higher latency value means a longer delay in transmitting the stream, but more room for error correction. A lower latency value means a shorter delay, but less room for error correction. You can choose a value between 0 and 60,000 ms. If you keep this field blank, the service uses the default value of 6,000 ms. 

   1. If the source is encrypted, choose **Activate** in the **Decryption** section and do the following:

      1. For **Decryption type**, choose **Static key**.

      1. For **Role ARN**, specify the ARN of the role that you created when you [set up encryption](encryption-static-key-set-up.md#encryption-static-key-set-up-create-iam-role).

      1. For **Secret ARN**, specify the ARN that AWS Secrets Manager assigned when you [created the secret to store the encryption key](encryption-static-key-set-up.md#encryption-static-key-set-up-store-key).

      1. For **Decryption algorithm**, choose the type of encryption that was used to encrypt the source.

------
#### [ Zixi push for AWS Elemental Link UHD device ]

   To use an AWS Elemental Link device as a source for MediaConnect, you must create a Zixi push flow using the following procedure. After creating the Zixi push flow, you must configure the AWS Elemental Link device using MediaLive. See the following MediaLive setup instructions to complete the process after you have created the flow: [Using a device in a flow](https://docs.aws.amazon.com/medialive/latest/ug/device-use-flow.html) in the *MediaLive User Guide*. Ensure you have access to both MediaConnect and MediaLive to complete these steps. 

   1. In the **Source** section, for **Source type**, choose **Standard source**.

   1. For **Name**, specify a name for your source. This value is an identifier that is visible only on the MediaConnect console. It is not visible to anyone outside of the current AWS account.

   1. For **Protocol**, choose **Zixi push**. 
**Note**  
MediaConnect assigns the inbound port for Zixi push sources at the time of creation. A port number of 2088 will be assigned automatically.

   1. For **Allowlist CIDR block**, specify a range of IP addresses that are allowed to contribute content to your source. Format the IP addresses as a Classless Inter-Domain Routing (CIDR) block, for example, 10.24.34.0/23. For more information about CIDR notation, see [RFC 4632](https://tools.ietf.org/html/rfc4632).
**Important**  
 If you know the range of public IP addresses that your Link device uses to connect to the internet, enter that CIDR block. Note that this is not the same as the IP address of the AWS Elemental Link device. If you cannot obtain this information, it is possible to configure the CIDR block to be open to all possible IP addresses by using 0.0.0.0/0. Typically, it is not best practice to assign a CIDR block that is open to the entire internet (0.0.0.0/0). However, if this method must be used, the data being transferred is encrypted using AES-128 encryption.

   1. For **Maximum latency**, specify the size of the buffer (delay) that you want the service to maintain. A higher latency value means a longer delay in transmitting the stream, but more room for error correction. A lower latency value means a shorter delay, but less room for error correction. You can choose a value between 0 and 60,000 ms. If you keep this field blank, the service uses the default value of 6,000 ms. The **Maximum latency** value should match the **Latency** value configured on the AWS Elemental Link device. For information on configuring the Link device's latency, see: [Configuring the device](https://docs.aws.amazon.com/medialive/latest/ug/device-edit.html) in the *AWS Elemental MediaLive User Guide* 

   1. For **Decryption**, choose **Activate** and do the following:

      1. For **Decryption type**, choose **Static key**.

      1. For **Decryption algorithm**, choose **AES-128**. AWS Elemental Link requires AES-128, do not select another algorithm.

      1. For **Role ARN**, specify the ARN of the role that you created when you [set up encryption](encryption-static-key-set-up.md#encryption-static-key-set-up-create-iam-role).

      1. For **Secret ARN**, specify the ARN that AWS Secrets Manager assigned when you [created the secret to store the encryption key](encryption-static-key-set-up.md#encryption-static-key-set-up-store-key).

------

1. Under **Source monitoring configuration**, choose which monitoring features you want to enable.

   1. Turn on **Thumbnails state** to generate source thumbnails that you can preview in the console.

   1. Turn on **Content quality analysis state** to monitor for the following audio and video quality issues.

      1. (Optional) Turn on **Black frames** to detect periods of black video frames in the stream.

      1. (Optional) Turn on **Frozen frames** to detect periods of unchanging video frames in the stream.

      1. (Optional) Turn on **Silent audio** to detect periods of audio silence in the stream.

      1. (Optional) Set a duration threshold between 10 and 60 seconds for each metric that you enable. The default is 30 seconds.

1. At the bottom of the page, choose **Create flow**.

### Create a transport stream flow that uses a standard source (AWS CLI)
<a name="flows-create-standard-source-cli"></a>

1. Create a JSON file that contains the details of the flow that you want to create.

   The following example shows the structure for the contents of the file:

   ```
   {
     "Name": "AwardsShow",
     "Outputs": [
       {
         "Destination": "198.51.100.5",
         "Description": "RTP output",
         "Name": "RTPOutput",
         "Protocol": "rtp",
         "Port": 5020
       }
     ],
     "Source": {
       "Name": "AwardsShowSource",
       "Protocol": "rtp-fec",
       "WhitelistCidr": "10.24.34.0/23"
     }
   }
   ```

1. In the AWS CLI, use the `create-flow` command:

   ```
   aws mediaconnect create-flow --cli-input-json file://rtp.json --profile PMprofile
   ```

   The following example shows the return value:

   ```
   {
     "Flow": {
       "EgressIp": "203.0.113.0",
       "AvailabilityZone": "us-east-1d",
       "Name": "AwardsShow",
       "Status": "STANDBY",
       "FlowArn": "arn:aws:mediaconnect:us-east-1:111122223333:flow:1-23aBC45dEF67hiJ8-12AbC34DE5fG:AwardsShow",
       "Source": {
               "SourceArn": "arn:aws:mediaconnect:us-east-1:111122223333:source:3-4aBC56dEF78hiJ90-4de5fG6Hi78Jk:AwardsShowSource",
               "Name": "AwardsShowSource",
               "IngestPort": 5000,
               "WhitelistCidr": "10.24.34.0/23",
               "IngestIp": "198.51.100.15",
               "Transport": {
                   "Protocol": "rtp-fec",
                   "MaxBitrate": 80000000
               }
           },
           "Entitlements": [],
           "Outputs": [
               {
                   "Port": 5020,
                   "Name": "AwardsShowOutput",
                   "OutputArn": "arn:aws:mediaconnect:us-east-1:111122223333:output:2-3aBC45dEF67hiJ89-c34de5fG678h:AwardsShowOutput",
                   "Description": "RTP-FEC Output",
                   "Destination": "198.51.100.5",
                   "Transport": {
                       "Protocol": "rtp",
                       "SmoothingLatency": 0
                   }
               }
           ]
       }
   }
   ```

## Next steps
<a name="flows-create-standard-source-next-steps"></a>

Now that you've created a flow, complete these steps to start delivering your content:
+ [Add outputs](outputs-add.md) to specify where you want your MediaConnect flow to send your content 
+ [Grant entitlements](entitlements-grant.md) to allow users of other AWS accounts to subscribe to your content
+ [Start your flow](flows-start.md) to begin content delivery

## Additional resources
<a name="flows-create-standard-source-additional-resources"></a>

For more information about source monitoring options for your flow, see the following pages in this guide:
+ [Viewing thumbnails of the source video](monitor-with-thumbnails.md)
+ [Monitoring with content quality analysis in AWS Elemental MediaConnect](https://docs.aws.amazon.com/mediaconnect/latest/ug/monitor-content-quality-analysis.html)

# Creating a transport stream flow that uses an entitled source
<a name="flows-create-entitled-source"></a>

Transport stream flows transport compressed content that is muxed into a single stream. An entitled source is content that comes from another AWS account. 

## Prerequisites
<a name="flows-create-entitled-source-prerequisites"></a>
+ **NDI® configuration (for NDI use cases only)**

  We recommend reviewing the [NDI outputs](outputs-using-ndi.md) documentation to familiarize yourself with this feature before getting started.

  If you want to add an NDI output to your flow, you need a VPC with NDI discovery servers provisioned in your network. MediaConnect connects to these servers, but it doesn't create them for you. 
  + For a quick start with VPCs, you can use our [AWS CloudFormation VPC template](https://docs.aws.amazon.com/vpc/latest/userguide/create-vpc.html) to automatically create a VPC with public and private subnets. For more information about VPCs, see the [Amazon VPC User Guide](https://docs.aws.amazon.com/vpc/latest/userguide/). 
  + For NDI discovery server deployment, AWS provides guidance on automated setup across multiple Availability Zones using AWS CloudFormation, including best practices for installation and configuration. For instructions, see [Setting Up NDI Discovery Servers for Broadcast Workflows](https://aws.amazon.com/solutions/guidance/programmatic-deployment-of-ndi-discovery-servers-for-broadcast-workflows-on-aws/). 
  + We recommend that you configure your security groups with a self-referencing ingress rule and egress rule. You can then attach this security group to the EC2 instances where your NDI servers are running within the VPC. This approach automatically allows all necessary NDI communication between components in your VPC, and all required network traffic is permitted. For guidance on setting up self-referencing security group rules, see [Security Group Referencing](https://docs.aws.amazon.com/vpc/latest/userguide/security-group-rules.html#security-group-referencing) in the Amazon VPC User Guide.

## Procedure
<a name="flows-create-entitled-source-console"></a>

**To create a transport stream flow that uses an entitled source (console)**

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

1. On the **Flows** page, choose **Create flow**.

1. In the **Details** section, for **Name**, specify a name for your flow. This name will become part of the ARN for this flow.
**Note**  
MediaConnect allows you to create multiple flows with the same name. However, we encourage you to use unique flow names within an AWS Region to help with organization. After you create a flow, you can't change the name.

1. For **Availability Zone**, choose one of the following options:
   + Select **Any** (recommended)
   + Select a specific Availability Zone (useful if you're setting up redundant flows)

   If you use the default setting (**Any**), MediaConnect will randomly assign an Availability Zone within the current AWS Region. If your source comes from a VPC, the service will assign the Availability Zone of the VPC subnet to the flow.
**Note**  
If your source comes from your VPC, the Availability Zone of your flow must match that of your VPC subnet. We recommend that you leave this as **Any** and let the service ensure that the Availability Zone is set correctly.

1. Under **Flow size**, select the size that matches your use case. For more information about flow sizes, see [Flow sizes and capabilities](flow-sizes-capabilities.md).

   **For medium flows:**
   + Proceed directly to step 6.

   **For large flows:**
   + If you don't need NDI outputs for your flow, proceed directly to step 6.
   + If you want to add NDI outputs to your flow, configure the NDI settings as follows:

     1. Set **Flow NDI support** to **Enabled**.

     1. (Optional) Enter an **NDI machine name**.
        + This name is used as a prefix to help you identify the NDI sources that your flow creates. For example, if you enter **MACHINENAME**, your NDI sources will appear as **MACHINENAME** `(ProgramName)`.
        + If you don’t enter a name, MediaConnect generates a unique 12-character ID as the prefix. This ID is derived from the flow's Amazon Resource Name (ARN), so the machine name references the flow resource.
**Tip**  
Thoughtful naming is especially important when you have multiple flows creating NDI sources. For example, a production environment with 100 NDI sources would benefit from clear, descriptive machine name prefixes like `STUDIO-A`, `STUDIO-B`, `NEWSROOM`, and so on. 

     1. Add up to three **NDI discovery servers**. For each server, provide the following information:
        + Enter the server IP address from your existing NDI infrastructure.
        + Select the VPC interface adapter to control network access.
        + (Optional) Specify a port number. If you leave this blank, MediaConnect uses the NDI Discovery server default of TCP-5959.
**Tip**  
You can add up to three discovery servers. Having multiple discovery servers improves reliability and helps ensure your NDI sources are discoverable across your network.

1. In the **Source** section:
   + For **Source type**, choose **Entitled source**.
   + For **Entitlement ARN**, choose the appropriate entitlement. This list includes all entitlements that have been granted to you.
**Tip**  
You can click in this field and start entering the entitlement name. MediaConnect will filter the list to include only entitlements with a name that matches what you enter.

1. Under **Source monitoring configuration**, choose which monitoring features you want to enable.

   1. Turn on **Thumbnails state** to generate source thumbnails that you can preview in the console.

   1. Turn on **Content quality analysis state** to monitor for the following audio and video quality issues.

      1. (Optional) Turn on **Black frames** to detect periods of black video frames in the stream.

      1. (Optional) Turn on **Frozen frames** to detect periods of unchanging video frames in the stream.

      1. (Optional) Turn on **Silent audio** to detect periods of audio silence in the stream.

      1. (Optional) Set a duration threshold between 10 and 60 seconds for each metric that you enable. The default is 30 seconds.

1. Choose **Create flow**.

## Next steps
<a name="flows-create-entitled-source-next-steps"></a>

Now that you've created a flow, complete these steps to start delivering your content:
+ [Add outputs](outputs-add.md) to specify where you want your MediaConnect flow to send your content
+ [Grant entitlements](entitlements-grant.md) to allow users of other AWS accounts to subscribe to your content
+ [Start your flow](flows-start.md) to begin content delivery

## Additional resources
<a name="flows-create-entitled-source-additional-resources"></a>

For more information about source monitoring options for your flow, see the following pages in this guide:
+ [Viewing thumbnails of the source video](monitor-with-thumbnails.md)
+ [Monitoring with content quality analysis in AWS Elemental MediaConnect](https://docs.aws.amazon.com/mediaconnect/latest/ug/monitor-content-quality-analysis.html)

# Creating a transport stream flow that uses a VPC source
<a name="flows-create-vpc-source"></a>

Transport stream flows transport compressed content that is muxed into a single stream.

When you create a flow that uses a source from your virtual private cloud (VPC), your content does not go over the public internet. This is useful for security reasons as well as reliability. You set up your VPC and then create a flow that has an interface to that VPC. Alternatively, you can create a flow based on an entitlement that another AWS account granted to allow you to use their content ([entitled source](flows-create-entitled-source.md)) or a [standard source](flows-create-standard-source.md).

## Prerequisites
<a name="flows-create-vpc-source-prerequisites"></a>

Before you begin, make sure you've completed the following steps:

**VPC configuration**  
In Amazon VPC, set up your VPC and associated security groups. For more information about VPCs, see the [Amazon VPC User Guide](https://docs.aws.amazon.com/vpc/latest/userguide/). For information about configuring security groups to work with your VPC interface, see [Security group considerations](vpc-interface-security-groups.md).

**IAM setup**  
In IAM, [set up MediaConnect as a trusted service](security-iam-trusted-entity.md).

**Encryption setup (if required)**  
If the source of your flow requires encryption, [set up encryption](encryption-static-key-set-up.md).

**NDI® configuration (for NDI use cases only)**  
We recommend reviewing the [NDI outputs](outputs-using-ndi.md) documentation to familiarize yourself with this feature before getting started.  
If you want to add an NDI output to your flow, you need a VPC with NDI discovery servers provisioned in your network. MediaConnect connects to these servers, but it doesn't create them for you.   
+ AWS provides guidance on automated setup across multiple Availability Zones using AWS CloudFormation, including best practices for installation and configuration. For instructions, see [Setting Up NDI Discovery Servers for Broadcast Workflows](https://aws.amazon.com/solutions/guidance/programmatic-deployment-of-ndi-discovery-servers-for-broadcast-workflows-on-aws/). 
+ We recommend that you configure your security groups with a self-referencing ingress rule and egress rule. You can then attach this security group to the EC2 instances where your NDI servers are running within the VPC. This approach automatically allows all necessary NDI communication between components in your VPC, and all required network traffic is permitted. For guidance on setting up self-referencing security group rules, see [Security Group Referencing](https://docs.aws.amazon.com/vpc/latest/userguide/security-group-rules.html#security-group-referencing) in the Amazon VPC User Guide.

## Procedure
<a name="flows-create-vpc-source-console"></a>

**To create a transport stream flow that uses a VPC source (console)**

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

1. On the **Flows** page, choose **Create flow**.

1. In the **Details** section, for **Name**, specify a name for your flow. This name will become part of the ARN for this flow.
**Note**  
MediaConnect allows you to create multiple flows with the same name. However, we encourage you to use unique flow names within an AWS Region to help with organization. After you create a flow, you can't change the name.

1. For **Availability Zone**, choose **Any** or choose the Availability Zone where your VPC subnet resides. We recommend that you leave this as **Any** and let the service ensure that the Availability Zone is set correctly. 

1. Under **Flow size**, select the size that matches your use case. For more information about flow sizes, see [Flow sizes and capabilities](flow-sizes-capabilities.md).

   **For medium flows:**
   + Proceed directly to step 6.

   **For large flows:**
   + If you don't need NDI outputs for your flow, proceed directly to step 6.
   + If you want to add NDI outputs to your flow, configure the NDI settings as follows:

     1. Set **Flow NDI support** to **Enabled**.

     1. (Optional) Enter an **NDI machine name**.
        + This name is used as a prefix to help you identify the NDI sources that your flow creates. For example, if you enter **MACHINENAME**, your NDI sources will appear as **MACHINENAME** `(ProgramName)`.
        + If you don’t enter a name, MediaConnect generates a unique 12-character ID as the prefix. This ID is derived from the flow's Amazon Resource Name (ARN), so the machine name references the flow resource.
**Tip**  
Thoughtful naming is especially important when you have multiple flows creating NDI sources. For example, a production environment with 100 NDI sources would benefit from clear, descriptive machine name prefixes like `STUDIO-A`, `STUDIO-B`, `NEWSROOM`, and so on. 

     1. Add up to three **NDI discovery servers**. For each server, provide the following information:
        + Enter the server IP address from your existing NDI infrastructure.
        + Select the VPC interface adapter to control network access.
        + (Optional) Specify a port number. If you leave this blank, MediaConnect uses the NDI Discovery server default of TCP-5959.
**Tip**  
You can add up to three discovery servers. Having multiple discovery servers improves reliability and helps ensure your NDI sources are discoverable across your network.

1. In the **Source** section, for **Source type**, choose **VPC source**.

1. For **Name**, specify a name for your source. This value is an identifier that is visible only on the MediaConnect console. 

1. Determine which protocol your source uses.
**Note**  
If you want to specify redundant sources for failover, create the flow with one of the sources. After the flow is created, update it to activate failover on the source, and add the second source to the flow. Because MediaConnect treats both sources as the primary source, it doesn't matter which one you specify when you first create the flow. 

1. For specific instructions based on your protocol, choose one of the following tabs:

------
#### [ RIST ]

   1. For **Protocol**, choose **RIST**. 

   1. For **Ingest port**, specify the port that the flow will listen on for incoming content. 
**Note**  
The RIST protocol requires one additional port for error correction. To accommodate this requirement, MediaConnect reserves the port that is \$11 from the port that you specify. For example, if you specify port 4000 for the output, the service assigns ports 4000 and 4001.

   1. For **VPC interface name**, choose the name of the VPC interface that you want to use as the source.

   1. For **Maximum bitrate**, specify the maximum expected bitrate (in bits per second) for the flow. We recommend that you specify a value that is twice the actual bitrate.

   1. For **Maximum latency**, specify the size of the buffer (delay) that you want the service to maintain. A higher latency value means a longer delay in transmitting the stream, but more room for error correction. A lower latency value means a shorter delay, but less room for error correction. You can choose a value from 1-15,000 ms. If you keep this field blank, the service uses the default value of 2,000 ms. 

------
#### [ RTP or RTP-FEC ]

   1. For **Protocol**, choose **RTP** or **RTP-FEC**. 

   1. For **Ingest port**, specify the port that the flow will listen on for incoming content.
**Note**  
The RTP-FEC protocol requires two additional ports for error correction. To accommodate this requirement, MediaConnect reserves the ports that are \$12 and \$14 from the port that you specify. For example, if you specify port 4000 for the output, the service assigns ports 4000, 4002, and 4004. 

   1. For **VPC interface name**, choose the name of the VPC interface that you want to use as the source.

   1. For **Maximum bitrate**, specify the maximum expected bitrate (in bits per second) for the flow. We recommend that you specify a value that is twice the actual bitrate.

------
#### [ SRT listener ]

   1. In the **Source** section, for **Source type**, choose **VPC source**.

   1. For **Name**, specify a name for your source. This value is an identifier that is visible only on the MediaConnect console. It is not visible to anyone outside of the current AWS account.

   1. For **Protocol**, choose **SRT listener**.

   1. For **Source description**, enter a description that will remind you later where this source is from. This might be the company name or notes about the setup. 

   1. For **VPC interface name**, choose the name of the VPC interface that you want to use as the source.

   1. For **Inbound port**, specify the port that the flow listens on for incoming content.

   1. For **Maximum bitrate**, specify the maximum expected bitrate (in bits per second) for the flow. We recommend that you specify a value that is twice the actual bitrate.

   1. For **Minimum latency**, specify the size of the buffer (delay) that you want the service to maintain. A higher latency value means a longer delay in transmitting the stream, but more room for error correction. A lower latency value means a shorter delay, but less room for error correction. You can choose a value from 10 -15,000 ms. If you keep this field blank, the service uses the default value of 2,000 ms. 

      The SRT protocol uses a **minimum latency** configuration on each side of the connection. The larger of these two values is used as the *recovery latency*. If the transmitted bitrate, multiplied by the recovery latency, is higher than the *receiver buffer*, the buffer will overflow and the stream can fail with a `Buffer Overflow Error`. On the SRT receiver side, the receiver buffer is configured by the SRTO\$1RCVBUF value. The size of the receiver buffer is limited by the *flow control window size* (SRTO\$1FC) value. On the MediaConnect side, the receiver buffer is calculated as the **maximum bitrate** value multiplied by the **minimum latency** value. For more information about the SRT buffer, see [the SRT Configuration Guidelines.](https://github.com/Haivision/srt/blob/master/docs/API/configuration-guidelines.md)

   1. If the source is encrypted, choose **Activate** in the **Decryption** section and do the following:

      1. For **Role ARN**, specify the ARN of the role that you created when you [set up encryption](encryption-static-key-set-up.md#encryption-static-key-set-up-create-iam-role).

      1. For **Secret ARN**, specify the ARN that AWS Secrets Manager assigned when you [created the secret to store the encryption key](encryption-static-key-set-up.md#encryption-static-key-set-up-store-key).

------
#### [ SRT caller ]

   1. In the **Source** section, for **Source type**, choose **VPC source**.

   1. For **Name**, specify a name for your source. This value is an identifier that is visible only on the MediaConnect console. It is not visible to anyone outside of the current AWS account.

   1. For **Protocol**, choose **SRT caller**.

   1. For **Source description**, enter a description that will remind you later where this source is from. This might be the company name or notes about the setup.

   1. For **VPC interface name**, choose the name of the VPC interface that you want to use as the source.

   1. For **Source listener port**, enter the port the flow will use to pull the source from.

   1. For **Maximum bitrate** (optional), specify the maximum expected bitrate (in bits per second) for the flow. We recommend that you specify a value that is twice the actual bitrate.

   1. For **Minimum latency**, specify the minimum size of the buffer (delay) that you want the service to maintain. A higher latency value means a longer delay in transmitting the stream, but more room for error correction. A lower latency value means a shorter delay, but less room for error correction. You can choose a value from 10–15,000 ms. If you keep this field blank, MediaConnect uses the default value of 2,000 ms. 

      The SRT protocol uses a **minimum latency** configuration on each side of the connection. The larger of these two values is used as the *recovery latency*. If the transmitted bitrate, multiplied by the recovery latency, is higher than the *receiver buffer*, the buffer will overflow and the stream can fail with a `Buffer Overflow Error`. On the SRT receiver side, the receiver buffer is configured by the SRTO\$1RCVBUF value. The size of the receiver buffer is limited by the *flow control window size* (SRTO\$1FC) value. On the MediaConnect side, the receiver buffer is calculated as the **maximum bitrate** value multiplied by the **minimum latency** value. For more information about the SRT buffer, see [the SRT Configuration Guidelines.](https://github.com/Haivision/srt/blob/master/docs/API/configuration-guidelines.md)

   1. For **Stream ID** (optional), enter an identifier for the stream. This identifier can be used to communicate information about the stream.

   1. If the source is encrypted, choose **Activate** in the **Decryption** section and do the following:

      1. For **Role ARN**, specify the ARN of the role that you created when you [set up encryption](encryption-static-key-set-up.md#encryption-static-key-set-up-create-iam-role).

      1. For **Secret ARN**, specify the ARN that AWS Secrets Manager assigned when you [created the secret to store the encryption key](encryption-static-key-set-up.md#encryption-static-key-set-up-store-key).

------
#### [ Zixi push ]

   1. For **Name**, specify a name for your source. This value is an identifier that is visible only on the MediaConnect console. It is not visible to anyone outside of the current AWS account.

   1. For **Protocol**, choose **Zixi push**. 
**Note**  
MediaConnect assigns the inbound port for Zixi push VPC sources at the time of creation. A port number 2090–2099 will be assigned automatically.

   1. For **VPC interface name**, choose the name of the VPC interface that you want to use as the source.

   1. For **Stream ID**, specify the stream ID set in the Zixi feeder.
**Important**  
If you leave this field blank, the service uses the source name as the stream ID. Because the stream ID must match the value set in the Zixi feeder, you need to specify the stream ID if it is not exactly the same as the source name.

   1. For **Maximum latency**, specify the size of the buffer (delay) that you want the service to maintain. A higher latency value means a longer delay in transmitting the stream, but more room for error correction. A lower latency value means a shorter delay, but less room for error correction. You can choose a value between 0 and 60,000 ms. If you keep this field blank, the service uses the default value of 6,000 ms. 

   1. If the source is encrypted, choose **Activate** in the **Decryption** section and do the following:

      1. For **Decryption type**, choose **Static key**.

      1. For **Role ARN**, specify the ARN of the role that you created when you [set up encryption](encryption-static-key-set-up.md#encryption-static-key-set-up-create-iam-role).

      1. For **Secret ARN**, specify the ARN that AWS Secrets Manager assigned when you [created the secret to store the encryption key](encryption-static-key-set-up.md#encryption-static-key-set-up-store-key).

      1. For **Decryption algorithm**, choose the type of encryption that was used to encrypt the source.

------

1. For each VPC that you want to connect to the flow, do the following: 

   1. In the **VPC interface** section, choose **Add VPC interface**.

   1. For **Name**, specify a name for your VPC interface. The name of the VPC interface must be unique within the flow.

   1. For **Role ARN**, specify the Amazon Resource Name (ARN) of the role that you created when you set up MediaConnect as a trusted service.

   1. For **VPC**, choose the ID of the VPC that you want to use.
**Note**  
If you don't see the VPC that you want in the list, verify that the VPC has been set up in Amazon Virtual Private Cloud and that you have IAM permissions to view the VPC.

   1. For **Subnet**, choose the VPC subnet that you want MediaConnect to use to set up your VPC configuration. You must choose at least one and can choose as many as you want.

   1. For **Security groups**, specify the VPC security groups that you want MediaConnect to use to set up your VPC configuration. You must choose at least one security group.

1. Under **Source monitoring configuration**, choose which monitoring features you want to enable.

   1. Turn on **Thumbnails state** to generate source thumbnails that you can preview in the console.

   1. Turn on **Content quality analysis state** to monitor for the following audio and video quality issues.

      1. (Optional) Turn on **Black frames** to detect periods of black video frames in the stream.

      1. (Optional) Turn on **Frozen frames** to detect periods of unchanging video frames in the stream.

      1. (Optional) Turn on **Silent audio** to detect periods of audio silence in the stream.

      1. (Optional) Set a duration threshold between 10 and 60 seconds for each metric that you enable. The default is 30 seconds.

1. At the bottom of the page, choose **Create flow**.

## Next steps
<a name="flows-create-vpc-source-next-steps"></a>

Now that you've created a flow, complete these steps to start delivering your content:
+ [Add outputs](outputs-add.md) to specify where you want your MediaConnect flow to send your content
+ [Grant entitlements](entitlements-grant.md) to allow users of other AWS accounts to subscribe to your content
+ [Start your flow](flows-start.md) to begin content delivery

## Additional resources
<a name="flows-create-vpc-source-additional-resources"></a>

For more information about source monitoring options for your flow, see the following pages in this guide:
+ [Viewing thumbnails of the source video](monitor-with-thumbnails.md)
+ [Monitoring with content quality analysis in AWS Elemental MediaConnect](https://docs.aws.amazon.com/mediaconnect/latest/ug/monitor-content-quality-analysis.html)

# Creating a flow that uses a CDI source
<a name="flows-create-cdi"></a>

A CDI flow transports high-quality uncompressed or lightly compressed content into and out of the AWS Cloud. You can configure a CDI flow to use JPEG XS to transport lightly compressed content. The content is demuxed into separate media streams for audio, video, or ancillary data. Each CDI flow can use multiple media streams for the source and multiple media streams for each output. MediaConnect uses AWS Cloud Digital Interface (AWS CDI) network technology to transport content that adheres to the SMPTE 2110, part 22 transport standard. 

CDI flows only support sources from a virtual private cloud (VPC) that you set up using Amazon VPC. You set up your VPC and then create a flow that has an interface to that VPC. 

MediaConnect doesn't support two sources on CDI flows. For redundancy with ST 2110 JPEG XS sources, you can specify two inbound VPC interfaces on an individual media stream. For redundancy with CDI sources, create a second flow. 

## Prerequisites
<a name="flows-create-cdi-source-prerequisites"></a>

Before you begin this procedure, make sure that the following steps have been completed:
+ Review the suggested workflow shown in [Contribution for CDI flows](use-cases-cdi.md).
+ In Amazon VPC, set up your VPC and associated security groups. For more information about VPCs, see the [Amazon VPC User Guide](https://docs.aws.amazon.com/vpc/latest/userguide/). For information about configuring security groups to work with your VPC interface, see [Security group considerations](vpc-interface-security-groups.md).
+ In IAM, [set up MediaConnect as a trusted service](security-iam-trusted-entity.md).

## Procedure
<a name="flows-create-cdi-source-procedure"></a>

### Create an AWS CDI flow (console)
<a name="flows-create-cdi-console"></a>

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

1. On the **Flows** page, choose **Create flow**.

1. In the **Details** section, for **Name**, specify a name for your flow. This name will become part of the ARN for this flow.
**Note**  
MediaConnect allows you to create multiple flows with the same name. However, we encourage you to use unique flow names within an AWS Region to help with organization. After you create a flow, you can't change the name.

1. For **Availability Zone**, choose the Availability Zone where your VPC subnet resides. 

1. For **Flow size**, select **Large 4x**.

1. In the **Source** section, for **Source type**, choose **VPC source**.

1. For **Name**, specify a name for your source. This value is an identifier that is visible only on the MediaConnect console. 

1. Skip to the **VPC interface** section.

1. For each VPC that you want to connect to the flow, do the following:

   1. Choose **Add VPC interface**.

   1. For **Name**, specify a name for your VPC interface. The name of the VPC interface must be unique within the flow.

   1. For **Type**, choose the type of network adapter that you want MediaConnect to use on this interface. If you want to use this interface for a CDI source or output, you must choose **EFA** as the type.

   1. For **Role ARN**, specify the Amazon Resource Name (ARN) of the role that you created when you set up MediaConnect as a trusted service.

   1. For **VPC**, choose the ID of the VPC that you want to use.
**Note**  
If you don't see the VPC that you want in the list, verify that the VPC has been set up in Amazon Virtual Private Cloud and that you have IAM permissions to view the VPC.

   1. For **Subnet**, choose the VPC subnet that you want MediaConnect to use to set up your VPC configuration. You must choose at least one and can choose as many as you want.

   1. For **Security groups**, specify the VPC security groups that you want MediaConnect to use to set up your VPC configuration. You must choose at least one security group.

1. For each media stream that you want to add to the flow, do the following:

   1. In the **Media streams** section, choose **Add media stream**.

   1. In the **Name** field, specify a descriptive name that will help you distinguish this media stream from others in the flow.

   1. For **Description**, specify a description that will help you remember the use of this media stream. 

   1. For **Stream ID**, specify a unique identifier for the media stream. 

      If the source or any of the outputs uses the CDI protocol, specify the value that is expected by the production and playout systems.

      If the source and all outputs use the ST 2110 JPEG XS protocol, specify a value that is unique to that of other media streams within the flow.

   1. Choose **Advanced options** to display the additional options based on your stream type.

   1. For specific instructions on the advanced options based on your stream type, choose one of the following tabs:

------
#### [ Audio ]

      1. For **Stream type**, choose **Audio**. 

      1. For **Media clock rate**, specify the sample rate for the stream. This value is measured in Hz.

      1. For **Language**, specify the language of the audio. This value should be in a format that the receiver recognizes. 

      1. For **Channel order**, specify the format of the audio channel. 

      1. Choose **Add media stream**. 

------
#### [ Video ]

      1. For **Stream type**, choose **Video**. 

         For many fields, MediaConnect provides a default value that represents the recommended setting. Change the default value if needed. 

      1. **Media clock rate** is the sample rate for the stream, and is set to 90000. This value is measured in Hz.

      1. For **Video format**, specify the resolution of the video. 

      1. For **Exact framerate**, specify the frame rate of the video. This value should be represented in frames per second.

      1. For **Colorimetry**, specify the format that was used for the representation of color in the video. 

      1. For **Scan mode**, specify the method that was used to scan the incoming video. 
         + Choose **Interlace** if the incoming video is interlaced (for example, 480i or 1080i).
         + Choose **Progressive** if the incoming video is progressive (for example, 720p or 1080p).
         + Choose **Progressive segmented frame** if the incoming video is PSF (for example, 1080psf).

      1. For **TCS**, specify the transfer characteristic system (TCS) that was used in the video. 

      1. For **Range**, specify the encoding range of the video. 

      1. For **PAR**, specify the pixel access ratio (PAR) of the video. 

      1. Choose **Add media stream**. 

------
#### [ Ancillary data ]

      1. For **Stream type**, choose **Ancillary data**. 

      1. **Media clock rate** is the sample rate for the stream, and is set to 90000. This value is measured in Hz.

      1. Choose **Add media stream**. 

------

1. Scroll back up to the **Sources** section.

1. Determine which protocol your source uses.

1. For specific instructions based on your protocol, choose one of the following tabs:

------
#### [ CDI ]

   1. For **Protocol**, choose **CDI**. 

   1. For **Description**, enter a description that will remind you later where this source is from. This might be the company name or notes about the setup.

   1. For **Inbound port**, specify the port that the flow will listen on for incoming content. This value can be anything from 1024 to 65535, with the exception of 2077 and 2088 (those ports are reserved for other protocols).

   1. For **VPC interface**, choose the name of the VPC interface that you want to use as the source.

   1. For each media stream that you want to use as part of the source, do the following.

      1. For **Media stream name**, choose the name of the media stream.

      1. For **Encoding name**, accept the default value.
         + For ancillary data streams, the encoding name is **smpte291**.
         + For audio streams, the encoding name is **pcm**.
         + For video, the encoding name is **raw**.

------
#### [ ST 2110 JPEG XS ]

   1. For **Protocol**, choose **ST 2110 JPEG XS**. 

   1. For **Description**, enter a description that will remind you later where this source is from. This might be the company name or notes about the setup.

   1. For **Max sync buffer**, specify the size of the buffer that you want MediaConnect to use to sync incoming source data. This value is measured in milliseconds (ms).

   1. For **VPC interface name 1**, choose one of the VPC interfaces that you want to use as a source.

   1. For **VPC interface name 2**, choose a second VPC interface that you want to use as a source. There is no priority between VPC interfaces 1 and 2.

   1. For each media stream that you want to use as part of the source, do the following.

      1. For **Media stream name**, choose the name of the media stream.

      1. For **Encoding name**, accept the default value.
         + For ancillary data streams, the encoding name is **smpte291**.
         + For audio streams, the encoding name is **pcm**.
         + For video, the encoding name is **jxsv**.

      1. For **Inbound port**, specify the port that the flow will listen on for incoming content. This value can be anything from 1024 to 65535, with the exception of 2077 and 2088 (those ports are reserved for other protocols).

------

1. At the bottom of the page, choose **Create flow**.
**Note**  
The flow doesn't start automatically. You must [start the flow](flows-start.md) manually.

1. [Add outputs](outputs-add-vpc.md) to specify where you want your MediaConnect to send the content.

### Create an AWS CDI flow (AWS CLI)
<a name="flows-create-cdi-cli"></a>

To use the AWS CLI to create a flow, you must use the `create-flow` command. To simplify the flow creation, we suggest you use the `create-flow` command with the `--cli-input-json` option. The `--cli-input-json` option requires you to create a JSON file with the necessary settings for your new flow. Step 1 of this procedure provides an example of one possible way configure this JSON file. For more information about the `create-flow` command and the `--cli-input-json` option, see: [AWS CLI Command Reference create-flow](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/mediaconnect/create-flow.html) 

1. Create a JSON file that contains the details of the flow that you want to create.

   The following example shows the structure for the contents of the file. This example uses a JPEG XS source to create a AWS CDI output with the following attributes: 
   + 2 Amazon VPC interfaces, 1 EFA (Elastic Fabric Adapter) and 1 ENA (Elastic Network Adapter)
   + 1 video stream, 1 audio stream, and 1 ancillary data stream

   ```
   {
       "Name": "AwardsShow",
   
       "MediaStreams": [
           {
               "Attributes": {
                   "Fmtp": {
                       "Colorimetry": "BT709",
                       "ExactFramerate": "60000/1001",
                       "Par": "1:1",
                       "Range": "NARROW",
                       "ScanMode": "progressive",
                       "Tcs": "SDR"
                   }
               },
               "ClockRate": 90000,
               "MediaStreamId": 0,
               "MediaStreamName": "video-stream",
               "MediaStreamType": "video",
               "VideoFormat": "1080p"
           },
           {
               "Attributes": {
                   "Fmtp": {
                       "ChannelOrder": "SMPTE2110.(ST)"
                   }
               },
               "ClockRate": 48000,
               "MediaStreamId": 1,
               "MediaStreamName": "audio-stream",
               "MediaStreamType": "audio"
           },
           {
               "ClockRate": 90000,
               "MediaStreamId": 2,
               "MediaStreamName": "anc-stream",
               "MediaStreamType": "ancillary-data"
           }
       ],
   
       "Outputs": [
           {
               "Name": "cdi-output",
               "Protocol": "cdi",
               "Description": "cdi-output to medialive",
               "Destination": "198.51.100.5",
               "MediaStreamOutputConfigurations": [
                   {
                       "EncodingName": "raw",
                       "MediaStreamName": "video-stream"
                   },
                   {
                       "EncodingName": "pcm",
                       "MediaStreamName": "audio-stream"
                   }
               ],
               "Port": 5000,
               "VpcInterfaceAttachment": {
                   "VpcInterfaceName": "efa-name"
               }
           }
       ],
   
       "Source": {
           "Name": "jxs-input",
           "Protocol": "st2110-jpegxs",
           "Description": "jxs-input to cdi-output",
           "MaxSyncBuffer": 100,
           "MediaStreamSourceConfigurations": [
               {
                   "EncodingName": "jxsv",
                   "InputConfigurations": [
                       {
                           "InputPort": 5011,
                           "Interface": {
                               "Name": "efa-name"
                           }
                       },
                       {
                           "InputPort": 5011,
                           "Interface": {
                               "Name": "ena-name"
                           }
                       }
                   ],
                   "MediaStreamName": "video-stream"
               },
               {
                   "EncodingName": "pcm",
                   "InputConfigurations": [
                       {
                           "InputPort": 5001,
                           "Interface": {
                               "Name": "efa-name"
                           }
                       },
                       {
                           "InputPort": 5001,
                           "Interface": {
                               "Name": "ena-name"
                           }
                       }
                   ],
                   "MediaStreamName": "audio-stream"
               }
           ]
       },
   
       "VpcInterfaces": [
           {
               "Name": "efa-name",
               "NetworkInterfaceType": "efa",
               "RoleArn": "arn:aws:iam::111122223333:role/MediaConnectAccessRole",
               "SecurityGroupIds": [
                   "sg-1234567890abcdef0"
               ],
               "SubnetId": "subnet-abcdef01234567890"
           },
           {
               "Name": "ena-name",
               "NetworkInterfaceType": "ena",
               "RoleArn": "arn:aws:iam::111122223333:role/MediaConnectAccessRole",
               "SecurityGroupIds": [
                   "sg-1234567890abcdef0"
               ],
               "SubnetId": "subnet-abcdef01234567890"
           }
       ]
   }
   ```

1. In the AWS CLI, use the `create-flow` command. 

   ```
   aws mediaconnect create-flow --cli-input-json file://filename.json --profile YourProfile
   ```

   The following example shows the return value:

   ```
   {
       "Flow": {
           "AvailabilityZone": "us-west-2a",
           "Description": "jxs-input to cdi-output",
           "EgressIp": "203.0.113.0",
           "Entitlements": [],
           "FlowArn": "arn:aws:mediaconnect:us-west-2:111122223333:flow:1-DwtfUlYOUVABAQNR-c94d84ce4215:AwardsShow",
           "MediaStreams": [
               {
                   "Attributes": {
                       "Fmtp": {
                           "Colorimetry": "BT709",
                           "ExactFramerate": "60000/1001",
                           "Par": "1:1",
                           "Range": "NARROW",
                           "ScanMode": "progressive",
                           "Tcs": "SDR"
                       }
                   },
                   "ClockRate": 90000,
                   "Fmt": 96,
                   "MediaStreamId": 0,
                   "MediaStreamName": "video-stream",
                   "MediaStreamType": "video",
                   "VideoFormat": "1080p"
               },
               {
                   "Attributes": {
                       "Fmtp": {
                           "ChannelOrder": "SMPTE2110.(ST)"
                       }
                   },
                   "ClockRate": 48000,
                   "Fmt": 97,
                   "MediaStreamId": 1,
                   "MediaStreamName": "audio-stream",
                   "MediaStreamType": "audio"
               },
               {
                   "ClockRate": 90000,
                   "Fmt": 98,
                   "MediaStreamId": 2,
                   "MediaStreamName": "anc-stream",
                   "MediaStreamType": "ancillary-data"
               }
           ],
           "Name": "AwardsShow",
           "Outputs": [
               {
                   "Description": "cdi-output to medialive",
                   "Destination": "198.51.100.5",
                   "MediaStreamOutputConfigurations": [
                       {
                           "EncodingName": "raw",
                           "MediaStreamName": "video-stream"
                       },
                       {
                           "EncodingName": "pcm",
                           "MediaStreamName": "audio-stream"
                       }
                   ],
                   "Name": "cdi-output",
                   "OutputArn": "arn:aws:mediaconnect:us-west-2:111122223333:output:1-DwtfUlYOUVABAQNR-c94d84ce4215:cdi-output",
                   "Port": 5000,
                   "Transport": {
                       "Protocol": "cdi"
                   },
                   "VpcInterfaceAttachment": {
                       "VpcInterfaceName": "efa-name"
                   }
               }
           ],
           "Source": {
               "Description": "jxs-input to cdi-output",
               "MediaStreamSourceConfigurations": [
                   {
                       "EncodingName": "jxs-input",
                       "InputConfigurations": [
                           {
                               "InputIp": "203.0.113.1",
                               "InputPort": 5011,
                               "Interface": {
                                   "Name": "efa-name"
                               }
                           },
                           {
                               "InputIp": "203.0.113.2",
                               "InputPort": 5011,
                               "Interface": {
                                   "Name": "ena-name"
                               }
                           }
                       ],
                       "MediaStreamName": "video-stream"
                   },
                   {
                       "EncodingName": "pcm",
                       "InputConfigurations": [
                           {
                               "InputIp": "203.0.113.3",
                               "InputPort": 5001,
                               "Interface": {
                                   "Name": "efa-name"
                               }
                           },
                           {
                               "InputIp": "203.0.113.4",
                               "InputPort": 5001,
                               "Interface": {
                                   "Name": "ena-name"
                               }
                           }
                       ],
                       "MediaStreamName": "audio-stream"
                   }
               ],
               "Name": "jxs-input",
               "SourceArn": "arn:aws:mediaconnect:us-west-2:111122223333:source:1-DwtfUlYOUVABAQNR-c94d84ce4215:jxs-input",
               "Transport": {
                   "MaxSyncBuffer": 100,
                   "Protocol": "st2110-jpegxs"
               }
           },
           "Sources": [
               {
                   "Description": "jxs-input to cdi-output",
                   "MediaStreamSourceConfigurations": [
                       {
                           "EncodingName": "jxsv",
                           "InputConfigurations": [
                               {
                                   "InputIp": "203.0.113.173",
                                   "InputPort": 5011,
                                   "Interface": {
                                       "Name": "efa-name"
                                   }
                               },
                               {
                                   "InputIp": "203.0.113.114",
                                   "InputPort": 5011,
                                   "Interface": {
                                       "Name": "ena-name"
                                   }
                               }
                           ],
                           "MediaStreamName": "video-stream"
                       },
                       {
                           "EncodingName": "pcm",
                           "InputConfigurations": [
                               {
                                   "InputIp": "203.0.113.173",
                                   "InputPort": 5001,
                                   "Interface": {
                                       "Name": "efa-name"
                                   }
                               },
                               {
                                   "InputIp": "203.0.113.114",
                                   "InputPort": 5001,
                                   "Interface": {
                                       "Name": "ena-name"
                                   }
                               }
                           ],
                           "MediaStreamName": "audio-stream"
                       }
                   ],
                   "Name": "jxs-input",
                   "SourceArn": "arn:aws:mediaconnect:us-west-2:111122223333:source:1-DwtfUlYOUVABAQNR-c94d84ce4215:jxs-input",
                   "Transport": {
                       "MaxSyncBuffer": 100,
                       "Protocol": "st2110-jpegxs"
                   }
               }
           ],
           "Status": "STANDBY",
           "VpcInterfaces": [
               {
                   "Name": "efa-name",
                   "NetworkInterfaceIds": [
                       "eni-0ae6ca9ea6673a2a7"
                   ],
                   "NetworkInterfaceType": "efa",
                   "RoleArn": "arn:aws:iam::111122223333:role/MediaConnectAccessRole",
                   "SecurityGroupIds": [
                       "sg-1234567890abcdef0"
                   ],
                   "SubnetId": "subnet-abcdef01234567890"
               },
               {
                   "Name": "ena-name",
                   "NetworkInterfaceIds": [
                       "eni-0cbabcf978eeb00a2"
                   ],
                   "NetworkInterfaceType": "ena",
                   "RoleArn": "arn:aws:iam::111122223333:role/MediaConnectAccessRole",
                   "SecurityGroupIds": [
                       "sg-1234567890abcdef0"
                   ],
                   "SubnetId": "subnet-abcdef01234567890"
               }
           ]
       }
   }
   ```

## Next steps
<a name="flows-create-cdi-source-next-steps"></a>

Now that you've created a flow, complete these steps to start delivering your content:
+ [Add outputs](outputs-add.md) to specify where you want your MediaConnect flow to send your content
+ [Grant entitlements](entitlements-grant.md) to allow users of other AWS accounts to subscribe to your content
+ [Start your flow](flows-start.md) to begin content delivery

# Creating a flow that uses an NDI® source
<a name="flows-create-ndi"></a>

You can use MediaConnect to create flows that ingest content from NDI® senders within your VPC. This guide explains how to create and configure a flow with an NDI source in MediaConnect. 

## Prerequisites
<a name="flows-create-ndi-source-prerequisites"></a>

Before you begin, make sure you've completed the following steps:
+ **Documentation review**

  Review the [NDI sources](sources-using-ndi.md) documentation to understand the capabilities of this feature.
+ **Infrastructure setup**

  Set up your VPC infrastructure with at least one NDI discovery server running, and with NDI senders actively broadcasting content within the VPC.
  + For VPC setup: You can use the [AWS CloudFormation VPC template](https://docs.aws.amazon.com/vpc/latest/userguide/create-vpc.html) to automatically create a VPC with public and private subnets. For more information about VPCs, see the [Amazon VPC User Guide](https://docs.aws.amazon.com/vpc/latest/userguide/).
  + For NDI discovery server deployment: AWS provides guidance on automated setup across multiple Availability Zones using AWS CloudFormation, including best practices for installation and configuration. For instructions, see [Setting Up NDI Discovery Servers for Broadcast Workflows](https://aws.amazon.com/solutions/guidance/programmatic-deployment-of-ndi-discovery-servers-for-broadcast-workflows-on-aws/).
  + For security group configuration: We recommend that you configure your security groups with a self-referencing ingress rule and egress rule. You can then attach this security group to the EC2 instances where your NDI servers are running within the VPC. This approach automatically allows all necessary NDI communication between components in your VPC, and all required network traffic is permitted. For guidance, see [Security Group Referencing](https://docs.aws.amazon.com/vpc/latest/userguide/security-group-rules.html#security-group-referencing) in the Amazon VPC User Guide. 

## Procedure
<a name="flows-create-ndi-source-procedure"></a>

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

1. On the **Flows** page, choose **Create flow**.

1. Configure the basic flow details:
   + For **Name**, enter a name for your flow.
     + You can create multiple flows with the same name. However, we encourage you to use unique flow names within an AWS Region to help with organization. 
     + Keep in mind that you can’t change this name after you create the flow. 
   + For **Availability Zone**, choose an Availability Zone for your flow.
     + If you leave this as **Any**, MediaConnect will assign one based on your VPC subnet.
   + For **Flow size**, select **Large**.
     + You can only use NDI sources with large sized flows.
     + For more information about flow sizes, see [Flow sizes and capabilities](flow-sizes-capabilities.md). 

1. Configure your flow source:
   + For **Source type**, select **NDI Source**.
   + For **Flow source name**, enter a unique name for the NDI flow source.
     + Keep in mind that you can't change this name after you create the flow.
   + For **Flow source description**, enter a description to help you identify this source and its purpose.
   + (Optional) For **NDI source name**, specify the name of the upstream NDI sender that will send to your flow.

     You can either:
     + Leave this field empty for now, and select from a list of discovered sources after starting the flow.
     + Enter the exact name of an existing NDI sender that's registered with your discovery server (for example, **MACHINE (program)**).

1. Configure the VPC interfaces for your flow:
   + In the **VPC interface** section, choose Add VPC interface.
   + For **Name**, enter a unique name for your VPC interface.
   + For **Role ARN**, specify the Amazon Resource Name (ARN) of the role that you created when you set up MediaConnect as a trusted service.
   + For VPC, choose the ID of the VPC that you want to use. 
     + If your VPC isn't listed, verify that it's set up in Amazon Virtual Private Cloud and that you have IAM permissions to view it.
   + For **Subnet**, choose the VPC subnet that you want MediaConnect to use to set up your VPC configuration. You must choose at least one and can choose as many as you want. 
   + For **Security groups**, specify the VPC security groups that you want MediaConnect to use to set up your VPC configuration. You must choose at least one security group. 

1. Configure the NDI settings:
   + Set **Flow NDI support** to **Enabled** if it's not already.
   + Enter an optional NDI machine name.
     + This name is used as a prefix to help you identify this flow source as an NDI receiver in your network. For example, if you enter **MACHINENAME**, your flow source will appear to your NDI senders as **MACHINENAME (ProgramName)**.
     + If you don’t enter a name, MediaConnect generates a unique 12-character ID from the flow's ARN.
   + Add up to three NDI discovery servers. For each discovery server, provide the following information:
     + Enter the discovery server IP address (IPv4 format). 
     + Specify a port number if you’re not using the default (5959).
     + Select the appropriate VPC interface adapter.

1. Configure the encoder settings:
   + For **Encoder profile name**, choose the encoder profile that you want to apply to your flow outputs.
   + (Optional) For **Maximum bitrate**, specify the maximum expected bitrate in bits per second (bps).
     + This setting lets you override the default video bitrate within the profile's supported range (10-50 Mbps).
     + If left blank, MediaConnect uses the default value of 20,000,000 bps.

1. Configure the monitoring options that you want to enable:

   1. Turn on **Thumbnails state** to generate source thumbnails that you can preview in the console.

   1. Turn on **Content quality analysis state** to monitor for the following audio and video quality issues.

      1. (Optional) Turn on **Black frames** to detect periods of black video frames in the stream.

      1. (Optional) Turn on **Frozen frames** to detect periods of unchanging video frames in the stream.

      1. (Optional) Turn on **Silent audio** to detect periods of audio silence in the stream.

      1. (Optional) Set a duration threshold between 10 and 60 seconds for each metric that you enable. The default is 30 seconds.

1. At the bottom of the page, choose **Create flow**.

## Next steps
<a name="flows-create-ndi-source-next-steps"></a>

Now that you've created a flow, complete these steps to start delivering your content:
+ [Add outputs](outputs-add.md) to specify where you want your MediaConnect flow to send your content
+ [Start your flow](flows-start.md) to begin content delivery

### Selecting NDI senders after you start your flow
<a name="specify-ndi-sources-after-starting-flow"></a>

When configuring your flow source, you can specify which upstream NDI sender (like a camera or encoder) will provide content to your MediaConnect flow. If you didn't specify this sender during flow creation or want to change it, you can select one after starting your flow. 

You must start your flow before you can perform this procedure. MediaConnect can only discover and list available NDI senders when the flow is active. 

**To select or update upstream NDI sources**

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

1. On the **Flows** page, choose the name of the flow that you want to update.

1. Start the flow if it’s not already active.

1. Choose the **Source** tab.

1.  Choose the source that you want to update.

1. Choose **Update**.

1. Under **NDI source name**, specify the upstream source that the NDI sender will send to your flow.
   + Start typing a name in the field. As you type, matching NDI sources from your network will appear in a dropdown list. 
   + Select the NDI source that you want to use from the list.
   + Choose the refresh button (⟳) to update the list of available NDI sources as needed.

1. Choose **Update** to save your changes.

## Additional resources
<a name="flows-create-ndi-source-additional-resources"></a>

For more information about source monitoring options for your flow, see the following pages in this guide:
+ [Viewing thumbnails of the source video](monitor-with-thumbnails.md)
+ [Monitoring with content quality analysis in AWS Elemental MediaConnect](https://docs.aws.amazon.com/mediaconnect/latest/ug/monitor-content-quality-analysis.html)

# Viewing a list of MediaConnect flows
<a name="flows-view-list"></a>

You can view a list of your AWS Elemental MediaConnect flows in a specific AWS Region.

**To view a list of flows (console)**
+ Open the MediaConnect console at [https://console.aws.amazon.com/mediaconnect/](https://console.aws.amazon.com/mediaconnect/).

  The **Flows** page appears, listing all the flows that are associated with your account.

**To view a list of flows (AWS CLI)**
+ In the AWS CLI, use the `list-flows` command:

  ```
  aws mediaconnect list-flows --profile PMprofile
  ```

  The following example shows the return value:

  ```
  {
    "Flows": [
      {
        "AvailabilityZone": "us-west-2a",
        "Description": "Temporary listed flow description",
        "FlowArn": "arn:aws:mediaconnect:us-east-1:111122223333:flow:1-23aBC45dEF67hiJ8-12AbC34DE5fG:BasketballGame",
        "Name": "BasketballGame",
        "SourceType": "OWNED",
        "Status": "STOPPING"
      },
      {
        "AvailabilityZone": "us-west-2d",
        "Description": "Temporary listed flow description",
        "FlowArn": "arn:aws:mediaconnect:us-east-1:111122223333:flow:2-3aBC45dEF67hiJ8k-2AbC34DE5fGa6:AwardsShow",
        "Name": "AwardsShow",
        "SourceType": "OWNED",
        "Status": "STANDBY"
      }
    ]
  }
  ```

# Viewing the details of a flow
<a name="flows-view-details"></a>

You can view a flow's details, such as ARN, Availability Zone, status, source, entitlements, and outputs.

**To view the details of a flow (console)**

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

1. On the **Flows** page, choose the name of the flow that you want to view.

   The details page for that flow appears. This page is divided into the following tabs:
   + The **Source** tab shows details about the source for this flow, including an indication of whether the flow is connected to the source. 
   + The **Outputs** tab shows details for each output that you created for this flow.
   + The **Entitlements** tab shows any entitlements that you have granted on this flow.
   + The **VPC interfaces** tab shows a list of connections that this flow has with virtual private clouds (VPCs) based on the Amazon Virtual Private Cloud (Amazon VPC) service.
   + The **Media streams** tab shows a list of media streams that have been created on this flow. Each media stream represents a different component of a video such as video, audio, ancillary data.
   + The **Alerts** tab shows a log of active alerts on this flow. 

**To view the details of a flow (AWS CLI)**
+ In the AWS CLI, use the `describe-flow` command:

  ```
  aws mediaconnect describe-flow --flow-arn arn:aws:mediaconnect:us-east-1:111122223333:flow:1-23aBC45dEF67hiJ8-12AbC34DE5fG:AwardsShow
  ```

  The following example shows the return value:

  ```
  {
      "Flow": {
          "EgressIp": "54.201.4.39",
          "AvailabilityZone": "us-east-1b",
          "Status": "ACTIVE",
          "FlowArn": "arn:aws:mediaconnect:us-east-1:111122223333:flow:1-23aBC45dEF67hiJ8-12AbC34DE5fG:AwardsShow",
          "Entitlements": [
              {
                  "EntitlementArn": "arn:aws:mediaconnect:us-east-1:111122223333:entitlement:1-AaBb11CcDd22EeFf-34DE5fG12AbC:MyEntitlement",
                  "Description": "Assign to this account",
                  "Name": "MyEntitlement",
                  "Subscribers": [
                      "444455556666"
                  ]
              }
          ],
          "Description": "NYC awards show",
          "Name": "AwardsShow",
          "Outputs": [
              {
                  "Port": 2355,
                  "Name": "NYC",
                  "Transport": {
                      "SmoothingLatency": 0,
                      "Protocol": "rtp-fec"
                  },
                  "OutputArn": "arn:aws:mediaconnect:us-east-1:111122223333:output:2-3aBC45dEF67hiJ89-c34de5fG678h:NYC",
                  "Destination": "192.0.2.0"
              },
              {
                  "Port": 3025,
                  "Name": "LA",
                  "Transport": {
                      "SmoothingLatency": 0,
                      "Protocol": "rtp-fec"
                  },
                  "OutputArn": "arn:aws:mediaconnect:us-east-1:111122223333:output:2-987655dEF67hiJ89-c34de5fG678h:LA",
                  "Destination": "192.0.2.0"
              }
          ],
          "Source": {
              "IngestIp": "54.201.4.39",
              "SourceArn": "arn:aws:mediaconnect:us-east-1:111122223333:source:3-4aBC56dEF78hiJ90-4de5fG6Hi78Jk:ShowSource",
              "Transport": {
                  "MaxBitrate": 80000000,
                  "Protocol": "rtp"
              },
              "IngestPort": 1069,
              "Description": "Saturday night show",
              "Name": "ShowSource",
              "WhitelistCidr": "10.24.34.0/23"
          }
      }
  }
  ```

# Starting a flow
<a name="flows-start"></a>

After you create a flow, you must start the flow. You can also stop and restart a flow at any time.

**To start a flow (console)**

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

1. On the **Flows** page, choose the name of the flow that you want to start.

   The details page for that flow appears.

1. Choose **Start**.

**To start a flow (AWS CLI)**
+ In the AWS CLI, use the `start-flow` command:

  ```
  aws mediaconnect start-flow --flow-arn arn:aws:mediaconnect:us-east-1:111122223333:flow:1-23aBC45dEF67hiJ8-12AbC34DE5fG:BasketballGame --profile PMprofile
  ```

  The following example shows the return value:

  ```
  {
    "FlowArn": "arn:aws:mediaconnect:us-east-1:111122223333:flow:1-23aBC45dEF67hiJ8-12AbC34DE5fG:BasketballGame",
    "Status": "STARTING"
  }
  ```

# Stopping a flow
<a name="flows-stop"></a>

When you stop an active flow, it immediately becomes unavailable to customers who are accessing the output directly from your AWS Elemental MediaConnect flow or through an entitlement. If you want to delete an active flow, you must stop the flow first before you can delete it.

**To stop a flow (console)**

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

1. On the **Flows** page, choose the name of the flow that you want to stop.

   The details page for that flow appears.

1. Choose **Stop**.

   The status of the flow changes to **Standby**. The flow stops immediately and is no longer viewable to customers who are accessing the output directly from your MediaConnect flow or through an entitlement.

**To stop a flow (AWS CLI)**
+ In the AWS CLI, use the `stop-flow` command:

  ```
  aws mediaconnect stop-flow --flow-arn arn:aws:mediaconnect:us-east-1:111122223333:flow:1-23aBC45dEF67hiJ8-12AbC34DE5fG:BasketballGame --profile PMprofile
  ```

  The following example shows the return value:

  ```
  {
    "FlowArn": "arn:aws:mediaconnect:us-east-1:111122223333:flow:1-23aBC45dEF67hiJ8-12AbC34DE5fG:BasketballGame",
    "Status": "STOPPING"
  }
  ```

# Updating a flow
<a name="flows-update"></a>

You can change a flow's size, source, entitlements, outputs and several other settings. You can't change the flow's name, ARN, or Availability Zone. For more information, see the following topics: 
+ [Updating the flow size](flows-update-size.md)
+ [Updating the flow NDI® configuration](flows-update-ndi-configuration.md)
+ [Managing tags on a flow](flows-manage-tags.md)
+ [Updating the source](source-update.md)
+ [Updating outputs](outputs-update.md)
+ [Updating media streams](media-stream-update.md)
+ [Updating entitlements](entitlements-update.md)
+ [Adding a VPC interface to a flow](vpc-interface-add.md)

# Updating the flow size
<a name="flows-update-size"></a>

Updating the flow size allows you to modify the processing capacity and feature set that's available for your MediaConnect flow. 

**Important**  
You can only update **Medium** flows to **Large** or **Large** flows to **Medium**. 

## Prerequisites
<a name="flows-update-size-prerequsites"></a>
+  The following procedure assumes that you’ve already created a flow. 
+  The flow must be inactive. If the flow is active, you must [stop the flow first](https://docs.aws.amazon.com/mediaconnect/latest/ug/flows-stop.html). 
+  If you are updating the flow size from **Large** to **Medium** and the flow has an NDI® source or output, you must [update the source](source-update.md) to a standard source, [remove the NDI output](outputs-remove.md) (if exists), and [disable the NDI configuration](flows-update-ndi-configuration.md) before updating the flow size. 

## Procedure
<a name="flows-update-size-procedure"></a>

**To update the flow size of an existing flow (console)**

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

1. On the **Flows** page, choose the name of the flow that you want to update.

   The details page for that flow appears.

1. In the **Details** section, choose **Flow actions** and then choose **Update flow size**. 

1. Select the flow size. 

1. Choose **Update**.

# Updating NDI configuration
<a name="flows-update-ndi-configuration"></a>

Updating the flow NDI® configuration allows you to determine how this flow communicates with the rest of your NDI environment. 

**Important**  
The NDI configuration is available only for **Large** flows. 

## Prerequisites
<a name="flows-update-ndi-configuration-prerequsites"></a>
+  The following procedure assumes that you’ve already created a **Large**flow. 

## Procedure
<a name="flows-update-ndi-configuration-procedure"></a>

**To update the NDI configuration of an existing flow (console)**

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

1. On the **Flows** page, choose the name of the flow that you want to update.

   The details page for that flow appears.

1. In the **NDI configuration** section, choose **Edit**. 

1. Set **Flow NDI support** to **Enabled** to enable NDI, or **Disabled** to disable NDI. 

1. Enter or update the NDI machine name.
   + This name is used as a prefix to help you identify this flow source as an NDI receiver in your network. For example, if you enter **MACHINENAME**, your flow source will appear to your NDI senders as **MACHINENAME (ProgramName)**. 
   + If you don’t enter a name, MediaConnect generates a unique 12-character ID from the flow's ARN. 

1. Update the NDI discovery servers. You can add up to three discovery servers. For each discovery server, provide the following information: 
   + Enter the discovery server IP address (IPv4 format). 
   + Specify a port number if you’re not using the default (5959). 
   + Select the appropriate VPC interface adapter. 

1. Choose **Update**.

# Managing tags on a flow
<a name="flows-manage-tags"></a>

You can use tags to help you track the billing and organization for your AWS Elemental MediaConnect flows, sources, outputs, and entitlements. These are the same tags that AWS Billing and Cost Management provides for organizing your AWS bill. For more information about using tags for cost allocation, see [Use Cost Allocation Tags for Custom Billing Reports](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation.html) in the *AWS Billing User Guide*. 

**Topics**
+ [

# Adding tags on a MediaConnect flow
](flows-manage-tags-add.md)
+ [

# Editing tags on a MediaConnect flow
](flows-manage-tags-edit.md)
+ [

# Removing tags from a MediaConnect flow
](flows-manage-tags-remove.md)

# Adding tags on a MediaConnect flow
<a name="flows-manage-tags-add"></a>

Use tags to help you track the billing and organization for your AWS Elemental MediaConnect sources. For more information about using tags for cost allocation, see [Use Cost Allocation Tags for Custom Billing Reports](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation.html) in the *AWS Billing User Guide*.

**To add tags to a flow (console)**

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

1. On the **Flows** page, choose the name of the flow that you want to add tags to.

   The details page for that flow appears.

1. In the **Details** section, choose **Flow actions** and then choose **Manage tags**. 

1. Choose **Edit tags**. 

1. For each tag that you want to add, do the following:

   1. Choose **Add new tag**.

   1. Enter a key and a value. For example, your key can be **sports** and your value can be **golf**. 

1. Choose **Save changes**.

# Editing tags on a MediaConnect flow
<a name="flows-manage-tags-edit"></a>

Use tags to help you track the billing and organization for your AWS Elemental MediaConnect flows. For more information about using tags for cost allocation, see [Use Cost Allocation Tags for Custom Billing Reports](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation.html) in the *AWS Billing User Guide*.

**To edit tags on a flow (console)**

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

1. On the **Flows** page, choose the name of the flow that has the tags you want to edit.

   The details page for that flow appears.

1. In the **Details** section, choose **Flow actions** and then choose **Manage tags**. 

1. Choose **Edit tags**.

1. Update the tags, as needed.

1. Choose **Save changes**.

# Removing tags from a MediaConnect flow
<a name="flows-manage-tags-remove"></a>

You can remove a tag from a flow if you no longer want to use it to track the billing and organization for it.

**To remove tags from a flow (console)**

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

1. On the **Flows** page, choose the name of the flow that you want to add tags to.

   The details page for that flow appears.

1. In the **Details** section, choose **Flow actions** and then choose **Manage tags**. 

1. Choose **Edit tags**.

1. Choose **Remove** next to each tag that you want to delete. 

1. Choose **Save changes**.

# Deleting a flow
<a name="flows-delete"></a>

When you delete an active flow, it immediately becomes unavailable to customers who are accessing the output directly from your AWS Elemental MediaConnect flow or through an entitlement. After you delete a flow, you can't recover it.

**Important**  
Some flows have outputs that are [created and managed by a MediaLive channel](https://docs.aws.amazon.com/medialive/latest/ug/input-create-push-mediaconnect.html). When managing this type of flow, keep in mind the following:  
If you **stop** the flow, MediaLive treats this as an input loss and the channel continues to run. 
If you **delete** the flow, MediaLive loses the input configuration, causing the channel to fail—even if the channel isn't currently ingesting the flow outputs.
Recommended action: Before deleting a flow with managed outputs, update the MediaLive channel to remove any references to the flow. This prevents instability or disruption to the channel. For instructions, see [Detaching an input](https://docs.aws.amazon.com/medialive/latest/ug/detach-input.html) in the MediaLive User Guide.

## Prerequisites
<a name="flows-delete-prerequisites"></a>
+ If the flow is active, you must stop the flow before you can delete it. For instructions, see [Stopping a flow](https://docs.aws.amazon.com/mediaconnect/latest/ug/flows-stop.html).

## Procedure
<a name="flows-delete-procedure"></a>

Follow these steps to delete a flow in MediaConnect.

**To delete a flow (console)**

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

1. On the **Flows** page, choose the name of the flow that you want to delete.

   The details page for that flow appears.

1. Review the **Status** field to verify that the flow is in **Standby** mode. 

1. If the flow status is **Active**, choose **Stop**. 

1. Choose **Delete**. 

   A confirmation message appears.

1. Choose **Delete flow**. 

   The flow is no longer viewable to customers who are accessing the output directly from your MediaConnect flow or through an entitlement. It might take up to five minutes for the flow to be deleted entirely.

**To delete a flow (AWS CLI)**
+ In the AWS CLI, use the `delete-flow` command:

  ```
  aws mediaconnect delete-flow --flow-arn arn:aws:mediaconnect:us-east-1:111122223333:flow:1-23aBC45dEF67hiJ8-12AbC34DE5fG:BasketballGame --profile PMprofile
  ```

  The following example shows the return value:

  ```
  {
    "FlowArn": "arn:aws:mediaconnect:us-east-1:111122223333:flow:1-23aBC45dEF67hiJ8-12AbC34DE5fG:BasketballGame",
    "Status": "DELETING"
  }
  ```

# Flow sizes and capabilities
<a name="flow-sizes-capabilities"></a>

A flow size determines how much video throughput your flow can handle and which source and output types it supports. Choosing the right size ensures your flow can accommodate your required number of outputs, handle your desired video quality, and support specific features like NDI® or AWS Cloud Digital Interface (CDI).

## Flow size options
<a name="flow-size-options"></a>

MediaConnect currently offers three flow sizes: Medium, Large and Large 4x. Medium is the default option and suitable for most standard streaming requirements. Large flows provide enhanced capabilities for higher throughput and specialized features such as NDI sources and outputs. Large 4x flows support high-quality uncompressed content with AWS Cloud Digital Interface (CDI) or lightly compressed content with JPEG XS via the SMPTE 2110, part 22 transport standard. 

## Managing flow sizes
<a name="managing-flow-sizes"></a>
+ When creating a new flow, you'll select either Medium, Large or Large 4x as the size, with Medium being the default choice. 
+ After the flow is created, you can update Medium flows to Large or Large flows to Medium. 
+ You can't update the size of a Large 4x flow after the flow is created. 
+ Some older flows may display no size designation (`-`) in the flow details. These flows function at a medium capacity.

## Compare flow sizes
<a name="flow-sizes-reference-table"></a>

Use this table to compare flow sizes and select the one that meets your needs.


****  

|  |  | Transport Streams | NDI | CDI | Flow Size | Use Case | Output limits | Throughput | Output limits | Throughput | Output limits | Throughput | 
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | 
| Medium | Standard transport stream distribution |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediaconnect/latest/ug/flow-sizes-capabilities.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediaconnect/latest/ug/flow-sizes-capabilities.html)  | N/A | N/A | N/A | N/A | 
| Large | Transport stream distribution and NDI |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediaconnect/latest/ug/flow-sizes-capabilities.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediaconnect/latest/ug/flow-sizes-capabilities.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediaconnect/latest/ug/flow-sizes-capabilities.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediaconnect/latest/ug/flow-sizes-capabilities.html)  | N/A | N/A | 
| Large 4x | Production environments requiring CDI or SMPTE 2110 with JPEG XS | N/A | N/A | N/A | N/A |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediaconnect/latest/ug/flow-sizes-capabilities.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/mediaconnect/latest/ug/flow-sizes-capabilities.html)  | 

For information about flow pricing, see [AWS Elemental MediaConnect Pricing](https://aws.amazon.com/mediaconnect/pricing/).

## Flow bandwidth alerts
<a name="flow-bandwidth-alerts"></a>

When the network bandwidth usage for a flow is approaching the maximum supported capacity, MediaConnect publishes an alert on the flow details page. The video output bitrate is typically the primary contributor to the total bandwidth usage, but the bandwidth required for general flow operations also counts towards the threshold. 

When you see this alert, you should consider taking action to reduce the load and stay within supported limits. For example, you can do the following:
+ Decrease the number of outputs in the flow 
+ Lower the source bitrate or the quality of the video input 

For instructions on how to review the alerts for a flow, see [Viewing the details of a flow](flows-view-details.md). 