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.
Name | Type | Required | Description |
---|---|---|---|
flowArn | String | True | The Amazon Resource Name (ARN) of the flow. |
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 |
---|---|---|---|
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.
Property | Type | Required | Description |
---|---|---|---|
attributes | 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: | True | The type of media stream. |
videoFormat | string | False | The resolution of the video. |
Fmtp
A set of parameters that define the media stream.
Property | Type | Required | Description |
---|---|---|---|
channelOrder | string | False | The format of the audio channel. |
colorimetry | string Values: | 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: | False | The encoding range of the video. |
scanMode | string Values: | False | The type of compression that was used to smooth the video’s appearance. |
tcs | string Values: | 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.
Property | Type | Required | Description |
---|---|---|---|
channelOrder | string | False | The format of the audio channel. |
colorimetry | string Values: | 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: | False | The encoding range of the video. |
scanMode | string Values: | False | The type of compression that was used to smooth the video’s appearance |
tcs | string Values: | 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.
Property | Type | Required | Description |
---|---|---|---|
attributes | 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: | True | The type of media stream. |
videoFormat | string | False | The resolution of the video. |
MediaStreamAttributes
Attributes that are related to the media stream.
Property | Type | Required | Description |
---|---|---|---|
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 | 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: