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

Encoding configuration applied to an NDI source when transcoding it to a transport stream for downstream distribution.

- 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#L465)

## Example

```ts
declare const stack: Stack;
declare const ndiVpcInterface: VpcInterfaceConfig;
declare const efaInterface: VpcInterfaceConfig;
declare const videoStream: MediaStream;

// NDI requires LARGE, an encoding profile, and at least one discovery server
new Flow(stack, 'NdiFlow', {
  flowSize: FlowSize.LARGE,
  ndiConfig: {
    ndiState: State.ENABLED,
    ndiDiscoveryServers: [{
      discoveryServerAddress: '10.0.0.10',
      vpcInterface: ndiVpcInterface,
    }],
  },
  encodingConfig: {
    encodingProfile: EncodingProfile.CONTRIBUTION_H264_DEFAULT,
  },
  source: SourceConfiguration.ndi({
    flowSourceName: 'ndi-source',
  }),
});

// CDI and JPEG XS require LARGE_4X
new Flow(stack, 'CdiFlow', {
  flowSize: FlowSize.LARGE_4X,
  vpcInterfaces: [efaInterface],
  mediaStreams: [videoStream],
  source: SourceConfiguration.cdi({
    flowSourceName: 'cdi-source',
    vpcInterface: efaInterface,
    port: 5000,
    maxSyncBuffer: 100,
    mediaStreamSourceConfigurations: [{
      encoding: Encoding.RAW,
      mediaStream: videoStream,
    }],
  }),
});
```

## Properties

- `encodingProfile`: [EncodingProfile](/cdk/api/v2/docs/@aws-cdk_aws-mediaconnect-alpha.EncodingProfile.html) = the MediaConnect service default — The encoding profile to use when transcoding the NDI source content to a transport stream.

  You can change this value while the flow is running.

- `videoMaxBitrate`: [Bitrate](/cdk/api/v2/docs/aws-cdk-lib.Bitrate.html) = undefined; when omitted, MediaConnect applies 20 Mbps at deploy time — The maximum video bitrate to use when transcoding the NDI source to a transport stream.

  The supported range is 10 Mbps – 50 Mbps.

  **Default:** undefined; when omitted, MediaConnect applies 20 Mbps at deploy time
