Media streams: add - AWS Elemental MediaConnect

Media streams: add

Each media stream represents one component of your content, such as video, audio, or ancillary data. You can add multiple media streams of each type to your flow and then associate those media streams with sources and outputs that use the ST 2110 JPEG XS or CDI protocol.

URI

/v1/flows/flowArn/mediaStreams

HTTP methods

POST

Operation ID: AddFlowMediaStreams

Adds media streams to an existing flow. After you add a media stream to a flow, you can associate it with a source and/or an output that uses the ST 2110 JPEG XS or CDI protocol.

Path parameters
Name Type Required Description
flowArn String True

The Amazon Resource Name (ARN) of the flow.

Responses
Status code Response model Description
201 AddFlowMediaStreamsResponse

MediaConnect created the new resource successfully.

400 ResponseError

The request that you submitted is not valid.

403 ResponseError

You don't have the required permissions to perform this operation.

404 ResponseError

MediaConnect did not find the resource that you specified in the request.

429 ResponseError

You have exceeded the service request rate limit for your MediaConnect account.

500 ResponseError

MediaConnect can't fulfill your request because it encountered an unexpected condition.

503 ResponseError

MediaConnect is currently unavailable. Try again later.

Schemas

Request bodies

{ "mediaStreams": [ { "mediaStreamId": integer, "mediaStreamType": enum, "videoFormat": "string", "mediaStreamName": "string", "description": "string", "attributes": { "fmtp": { "colorimetry": enum, "par": "string", "tcs": enum, "scanMode": enum, "range": enum, "channelOrder": "string", "exactFramerate": "string" }, "lang": "string" }, "clockRate": integer } ] }

Response bodies

{ "mediaStreams": [ { "mediaStreamId": integer, "mediaStreamType": enum, "videoFormat": "string", "mediaStreamName": "string", "description": "string", "attributes": { "fmtp": { "colorimetry": enum, "par": "string", "tcs": enum, "scanMode": enum, "range": enum, "channelOrder": "string", "exactFramerate": "string" }, "lang": "string" }, "fmt": integer, "clockRate": integer } ], "flowArn": "string" }
{ "message": "string" }

Properties

AddFlowMediaStreamsRequest

Adds media streams to an existing flow.

Property Type Required Description
mediaStreams

Array of type AddMediaStreamRequest

True

The media streams that you want to add to the flow.

AddFlowMediaStreamsResponse

The result of a successful AddFlowMediaStreams request. The response includes the details of the newly added media streams.

Property Type Required Description
mediaStreams

Array of type MediaStream

True

The media streams that you added to the flow.

flowArn

string

True

The ARN of the flow that you added media streams to.

AddMediaStreamRequest

The media stream that you want to add to the flow.

Property Type Required Description
mediaStreamId

integer

Format: int32

True

A unique identifier for the media stream.

mediaStreamType

string

Values: video | audio | ancillary-data

True

The type of media stream.

videoFormat

string

False

The resolution of the video.

mediaStreamName

string

True

A name that helps you distinguish one media stream from another.

description

string

False

A description that can help you quickly identify what your media stream is used for.

attributes

MediaStreamAttributesRequest

False

The attributes that you want to assign to the new media stream.

clockRate

integer

Format: int32

False

The sample rate (in kHz) for the stream. If the media stream type is video or ancillary data, set this value to 90000. If the media stream type is audio, set this value to either 48000 or 96000.

Fmtp

A set of parameters that define the media stream.

Property Type Required Description
colorimetry

string

Values: BT601 | BT709 | BT2020 | BT2100 | ST2065-1 | ST2065-3 | XYZ

False

The format used for the representation of color.

par

string

False

The pixel aspect ratio (PAR) of the video.

tcs

string

Values: SDR | PQ | HLG | LINEAR | BT2100LINPQ | BT2100LINHLG | ST2065-1 | ST428-1 | DENSITY

False

The transfer characteristic system (TCS) that is used in the video.

scanMode

string

Values: progressive | interlace | progressive-segmented-frame

False

The type of compression that was used to smooth the video’s appearance.

range

string

Values: NARROW | FULL | FULLPROTECT

False

The encoding range of the video.

channelOrder

string

False

The format of the audio channel.

exactFramerate

string

False

The frame rate for the video stream, in frames/second. For example: 60000/1001.

FmtpRequest

The settings that you want to use to define the media stream.

Property Type Required Description
colorimetry

string

Values: BT601 | BT709 | BT2020 | BT2100 | ST2065-1 | ST2065-3 | XYZ

False

The format that is used for the representation of color.

par

string

False

The pixel aspect ratio (PAR) of the video.

tcs

string

Values: SDR | PQ | HLG | LINEAR | BT2100LINPQ | BT2100LINHLG | ST2065-1 | ST428-1 | DENSITY

False

The transfer characteristic system (TCS) that is used in the video.

scanMode

string

Values: progressive | interlace | progressive-segmented-frame

False

The type of compression that was used to smooth the video’s appearance

range

string

Values: NARROW | FULL | FULLPROTECT

False

The encoding range of the video.

channelOrder

string

False

The format of the audio channel.

exactFramerate

string

False

The frame rate for the video stream, in frames/second. For example: 60000/1001.

MediaStream

A single track or stream of media that contains video, audio, or ancillary data. After you add a media stream to a flow, you can associate it with sources and outputs on that flow, as long as they use the CDI protocol or the ST 2110 JPEG XS protocol. Each source or output can consist of one or many media streams.

Property Type Required Description
mediaStreamId

integer

Format: int32

True

A unique identifier for the media stream.

mediaStreamType

string

Values: video | audio | ancillary-data

True

The type of media stream.

videoFormat

string

False

The resolution of the video.

mediaStreamName

string

True

A name that helps you distinguish one media stream from another.

description

string

False

A description that can help you quickly identify what your media stream is used for.

attributes

MediaStreamAttributes

False

Attributes that are related to the media stream.

fmt

integer

Format: int32

True

The format type number (sometimes referred to as RTP payload type) of the media stream. MediaConnect assigns this value to the media stream. For ST 2110 JPEG XS outputs, you need to provide this value to the receiver.

clockRate

integer

Format: int32

False

The sample rate for the stream. This value in measured in kHz.

MediaStreamAttributes

Attributes that are related to the media stream.

Property Type Required Description
fmtp

Fmtp

True

A set of parameters that define the media stream.

lang

string

False

The audio language, in a format that is recognized by the receiver.

MediaStreamAttributesRequest

Attributes that are related to the media stream.

Property Type Required Description
fmtp

FmtpRequest

False

The settings that you want to use to define the media stream.

lang

string

False

The audio language, in a format that is recognized by the receiver.

ResponseError

An exception raised by MediaConnect when you submit a request that cannot be completed. For more information, see the error message and documentation for the operation.

Property Type Required Description
message

string

True

The specific error message that MediaConnect returns to help you understand the reason that the request did not succeed.

See also

For more information about using this API in one of the language-specific AWS SDKs and references, see the following:

AddFlowMediaStreams