> **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.277.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 format of the audio channel.

  **Default:** the MediaConnect service default

- `clockRate`: number — The sample rate for the stream.

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

  This value is measured in Hz.

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

  **Default:** no description

- `fmt`: number — The format type number (sometimes referred to as RTP payload type) of the media stream.

  **Default:** assigned by MediaConnect

  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 — The audio language, in a format that is recognized by the receiver.

  **Default:** no language specified

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

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