Skip to content
v2.273.0

EncodingConfig Struct ​

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

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 ​

encodingProfileEncodingProfileencoding_profileEncodingProfileencodingProfileEncodingProfileEncodingProfileEncodingProfileEncodingProfileEncodingProfile= 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.

videoMaxBitrateBitratevideo_max_bitrateBitratevideoMaxBitrateBitrateVideoMaxBitrateBitrateVideoMaxBitrateBitrate= undefined; when omitted, MediaCo…#
The maximum video bitrate to use when transcoding the NDI source to a transport stream.

The supported range is 10 Mbps – 50 Mbps.

default

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