Creating a CDI flow
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.
Important
Before you begin this procedure, make sure that the following steps have been completed:
-
Review the suggested workflow shown in Contribution for CDI flows.
-
In Amazon VPC, set up your VPC and associated security groups. For more information about VPCs, see the Amazon VPC User Guide. For information about configuring security groups to work with your VPC interface, see Security group considerations.
Create an AWS CDI flow (console)
Open the MediaConnect console at https://console.aws.amazon.com/mediaconnect/
. -
On the Flows page, choose Create flow.
-
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.
-
For Availability Zone, choose the Availability Zone where your VPC subnet resides.
-
In the Source section, for Source type, choose VPC source.
-
For Name, specify a name for your source. This value is an identifier that is visible only on the MediaConnect console.
-
Skip to the VPC interface section.
-
For each VPC that you want to connect to the flow, do the following:
-
Choose Add VPC interface.
-
For Name, specify a name for your VPC interface. The name of the VPC interface must be unique within the flow.
-
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.
-
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.
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.
-
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.
-
-
For each media stream that you want to add to the flow, do the following:
-
In the Media streams section, choose Add media stream.
-
In the Name field, specify a descriptive name that will help you distinguish this media stream from others in the flow.
-
For Description, specify a description that will help you remember the use of this media stream.
-
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.
-
Choose Advanced options to display the additional options based on your stream type.
-
For specific instructions on the advanced options based on your stream type, choose one of the following tabs:
-
-
Scroll back up to the Sources section.
-
Determine which protocol your source uses.
-
For specific instructions based on your protocol, choose one of the following tabs:
-
At the bottom of the page, choose Create flow.
Note
The flow doesn't start automatically. You must start the flow manually.
-
Add outputs to specify where you want MediaConnect to send the content.
Create an AWS CDI flow (AWS CLI)
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
-
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
" } ] } -
-
In the AWS CLI, use the
create-flow
command.aws mediaconnect create-flow --cli-input-json file://
filename
.json --profileYourProfile
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" } ] } }