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
NameTypeRequiredDescription
flowArnStringTrue

The Amazon Resource Name (ARN) of the flow.

Responses
Status codeResponse modelDescription
201AddFlowMediaStreamsResponse

MediaConnect created the new resource successfully.

400ResponseError

The request that you submitted is not valid.

403ResponseError

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

404ResponseError

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

429ResponseError

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

500ResponseError

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

503ResponseError

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.

PropertyTypeRequiredDescription
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.

PropertyTypeRequiredDescription
flowArn

string

True

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

mediaStreams

Array of type MediaStream

True

The media streams that you added to the flow.

AddMediaStreamRequest

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

PropertyTypeRequiredDescription
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.

description

string

False

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

mediaStreamId

integer

Format: int32

True

A unique identifier for the media stream.

mediaStreamName

string

True

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

mediaStreamType

string

Values: video | audio | ancillary-data

True

The type of media stream.

videoFormat

string

False

The resolution of the video.

Fmtp

A set of parameters that define the media stream.

PropertyTypeRequiredDescription
channelOrder

string

False

The format of the audio channel.

colorimetry

string

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

False

The format used for the representation of color.

exactFramerate

string

False

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

par

string

False

The pixel aspect ratio (PAR) of the video.

range

string

Values: NARROW | FULL | FULLPROTECT

False

The encoding range of the video.

scanMode

string

Values: progressive | interlace | progressive-segmented-frame

False

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

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.

FmtpRequest

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

PropertyTypeRequiredDescription
channelOrder

string

False

The format of the audio channel.

colorimetry

string

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

False

The format that is used for the representation of color.

exactFramerate

string

False

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

par

string

False

The pixel aspect ratio (PAR) of the video.

range

string

Values: NARROW | FULL | FULLPROTECT

False

The encoding range of the video.

scanMode

string

Values: progressive | interlace | progressive-segmented-frame

False

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

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.

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.

PropertyTypeRequiredDescription
attributes

MediaStreamAttributes

False

Attributes that are related to the media stream.

clockRate

integer

Format: int32

False

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

description

string

False

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

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.

mediaStreamId

integer

Format: int32

True

A unique identifier for the media stream.

mediaStreamName

string

True

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

mediaStreamType

string

Values: video | audio | ancillary-data

True

The type of media stream.

videoFormat

string

False

The resolution of the video.

MediaStreamAttributes

Attributes that are related to the media stream.

PropertyTypeRequiredDescription
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.

PropertyTypeRequiredDescription
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.

PropertyTypeRequiredDescription
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