> **Experimental**
>
> `@aws-cdk/aws-mediaconnect-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# MediaStreamAudio

A media stream represents one component of your content, such as video, audio, or ancillary data.

After you add a media stream to your flow, you can associate it with sources and outputs that use
the ST 2110 JPEG XS or CDI protocol.

Extends: MediaStreamAudio
Extends: MediaStreamBase

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/flow.ts`](https://github.com/aws/aws-cdk/blob/v2.273.0-alpha.0/packages/@aws-cdk/aws-mediaconnect-alpha/lib/flow.ts#L749)

## Example

```ts
declare const stack: Stack;

// Create media streams
const videoStream = MediaStream.video({
  mediaStreamId: 1,
  mediaStreamName: 'video-stream',
  videoFormat: MediaVideoFormat.HD_1080P,
  fmtp: {
    colorimetry: Colorimetry.BT709,
    exactFramerate: Framerate.FPS_29_97,
    par: PixelAspectRatio.SQUARE,
    videoRange: VideoRange.NARROW,
    scanMode: ScanMode.PROGRESSIVE,
    tcs: Tcs.SDR,
  },
});

const audioStream = MediaStream.audio({
  mediaStreamId: 2,
  mediaStreamName: 'audio-stream',
  channelOrder: AudioStreamOrderOptions.STANDARD_STEREO,
});

// Add to flow
const flow = new Flow(stack, 'MyFlow', {
  source: SourceConfiguration.router(),
  mediaStreams: [videoStream, audioStream],  // Declare at flow level
});
```

## Properties

- `channelOrder`: [AudioStreamOrderOptions](/cdk/api/v2/docs/@aws-cdk_aws-mediaconnect-alpha.AudioStreamOrderOptions.html) = the MediaConnect service default — The format of the audio channel.

- `clockRate`: number = default clock rate for the media stream type — The sample rate for the stream.

  This value is measured in Hz.

  **Default:** default clock rate for the media stream type

- `description`: string = no description — A description that can help you quickly identify what your media stream is used for.

- `fmt`: number = assigned by MediaConnect — 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.

- `lang`: string = no language specified — The audio language, in a format that is recognized by the receiver.

- `mediaStreamId`: number (required) — A unique identifier for the media stream.

- `mediaStreamName`: string (required) — A name that helps you distinguish one media stream from another.
