Skip to content
v2.276.0

Experimental

@aws-cdk/aws-mediaconnect-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

NdiConfig Struct ​

Configuration for NDI Config.

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,
    }],
  }),
});
python
from aws_cdk.aws_mediaconnect_alpha import NdiConfig, NdiDiscoveryServerConfig, EncodingConfig, MediaStreamSourceConfigurationCdi
# stack: Stack
# ndi_vpc_interface: VpcInterfaceConfig
# efa_interface: VpcInterfaceConfig
# video_stream: MediaStream


# NDI requires LARGE, an encoding profile, and at least one discovery server
Flow(stack, "NdiFlow",
    flow_size=FlowSize.LARGE,
    ndi_config=NdiConfig(
        ndi_state=State.ENABLED,
        ndi_discovery_servers=[NdiDiscoveryServerConfig(
            discovery_server_address="10.0.0.10",
            vpc_interface=ndi_vpc_interface
        )]
    ),
    encoding_config=EncodingConfig(
        encoding_profile=EncodingProfile.CONTRIBUTION_H264_DEFAULT
    ),
    source=SourceConfiguration.ndi(
        flow_source_name="ndi-source"
    )
)

# CDI and JPEG XS require LARGE_4X
Flow(stack, "CdiFlow",
    flow_size=FlowSize.LARGE_4X,
    vpc_interfaces=[efa_interface],
    media_streams=[video_stream],
    source=SourceConfiguration.cdi(
        flow_source_name="cdi-source",
        vpc_interface=efa_interface,
        port=5000,
        max_sync_buffer=100,
        media_stream_source_configurations=[MediaStreamSourceConfigurationCdi(
            encoding=Encoding.RAW,
            media_stream=video_stream
        )]
    )
)
java
Stack stack;
VpcInterfaceConfig ndiVpcInterface;
VpcInterfaceConfig efaInterface;
MediaStream videoStream;


// NDI requires LARGE, an encoding profile, and at least one discovery server
// NDI requires LARGE, an encoding profile, and at least one discovery server
Flow.Builder.create(stack, "NdiFlow")
        .flowSize(FlowSize.LARGE)
        .ndiConfig(NdiConfig.builder()
                .ndiState(State.ENABLED)
                .ndiDiscoveryServers(List.of(NdiDiscoveryServerConfig.builder()
                        .discoveryServerAddress("10.0.0.10")
                        .vpcInterface(ndiVpcInterface)
                        .build()))
                .build())
        .encodingConfig(EncodingConfig.builder()
                .encodingProfile(EncodingProfile.CONTRIBUTION_H264_DEFAULT)
                .build())
        .source(SourceConfiguration.ndi(SourceNdi.builder()
                .flowSourceName("ndi-source")
                .build()))
        .build();

// CDI and JPEG XS require LARGE_4X
// CDI and JPEG XS require LARGE_4X
Flow.Builder.create(stack, "CdiFlow")
        .flowSize(FlowSize.LARGE_4X)
        .vpcInterfaces(List.of(efaInterface))
        .mediaStreams(List.of(videoStream))
        .source(SourceConfiguration.cdi(SourceCdi.builder()
                .flowSourceName("cdi-source")
                .vpcInterface(efaInterface)
                .port(5000)
                .maxSyncBuffer(100)
                .mediaStreamSourceConfigurations(List.of(MediaStreamSourceConfigurationCdi.builder()
                        .encoding(Encoding.RAW)
                        .mediaStream(videoStream)
                        .build()))
                .build()))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.MediaConnect.Alpha
Stack stack;
VpcInterfaceConfig ndiVpcInterface;
VpcInterfaceConfig efaInterface;
MediaStream videoStream;


// NDI requires LARGE, an encoding profile, and at least one discovery server
// NDI requires LARGE, an encoding profile, and at least one discovery server
new Flow(stack, "NdiFlow", new FlowProps {
    FlowSize = FlowSize.LARGE,
    NdiConfig = new NdiConfig {
        NdiState = State.ENABLED,
        NdiDiscoveryServers = new [] { new NdiDiscoveryServerConfig {
            DiscoveryServerAddress = "10.0.0.10",
            VpcInterface = ndiVpcInterface
        } }
    },
    EncodingConfig = new EncodingConfig {
        EncodingProfile = EncodingProfile.CONTRIBUTION_H264_DEFAULT
    },
    Source = SourceConfiguration.Ndi(new SourceNdi {
        FlowSourceName = "ndi-source"
    })
});

// CDI and JPEG XS require LARGE_4X
// CDI and JPEG XS require LARGE_4X
new Flow(stack, "CdiFlow", new FlowProps {
    FlowSize = FlowSize.LARGE_4X,
    VpcInterfaces = new [] { efaInterface },
    MediaStreams = new [] { videoStream },
    Source = SourceConfiguration.Cdi(new SourceCdi {
        FlowSourceName = "cdi-source",
        VpcInterface = efaInterface,
        Port = 5000,
        MaxSyncBuffer = 100,
        MediaStreamSourceConfigurations = new [] { new MediaStreamSourceConfigurationCdi {
            Encoding = Encoding.RAW,
            MediaStream = videoStream
        } }
    })
});
go
// Install: go get github.com/aws/aws-cdk-go/awsmediaconnectalpha/v2
var stack Stack
var ndiVpcInterface VpcInterfaceConfig
var efaInterface VpcInterfaceConfig
var videoStream MediaStream


// NDI requires LARGE, an encoding profile, and at least one discovery server
// NDI requires LARGE, an encoding profile, and at least one discovery server
awsmediaconnectalpha.NewFlow(stack, jsii.String("NdiFlow"), &FlowProps{
	FlowSize: awsmediaconnectalpha.FlowSize_LARGE(),
	NdiConfig: &NdiConfig{
		NdiState: awsmediaconnectalpha.State_ENABLED,
		NdiDiscoveryServers: []NdiDiscoveryServerConfig{
			&NdiDiscoveryServerConfig{
				DiscoveryServerAddress: jsii.String("10.0.0.10"),
				VpcInterface: ndiVpcInterface,
			},
		},
	},
	EncodingConfig: &EncodingConfig{
		EncodingProfile: awsmediaconnectalpha.EncodingProfile_CONTRIBUTION_H264_DEFAULT,
	},
	Source: awsmediaconnectalpha.SourceConfiguration_Ndi(&SourceNdi{
		FlowSourceName: jsii.String("ndi-source"),
	}),
})

// CDI and JPEG XS require LARGE_4X
// CDI and JPEG XS require LARGE_4X
awsmediaconnectalpha.NewFlow(stack, jsii.String("CdiFlow"), &FlowProps{
	FlowSize: awsmediaconnectalpha.FlowSize_LARGE_4X(),
	VpcInterfaces: []VpcInterfaceConfig{
		efaInterface,
	},
	MediaStreams: []MediaStream{
		videoStream,
	},
	Source: awsmediaconnectalpha.SourceConfiguration_Cdi(&SourceCdi{
		FlowSourceName: jsii.String("cdi-source"),
		VpcInterface: efaInterface,
		Port: jsii.Number(5000),
		MaxSyncBuffer: jsii.Number(100),
		MediaStreamSourceConfigurations: []MediaStreamSourceConfigurationCdi{
			&MediaStreamSourceConfigurationCdi{
				Encoding: awsmediaconnectalpha.Encoding_RAW(),
				MediaStream: videoStream,
			},
		},
	}),
})

Properties ​

machineNameoptionalstringmachine_nameoptionalstrmachineNameoptionalStringMachineNameoptionalstringMachineNameoptional*string#
A prefix for the names of the NDI sources that the flow creates.

Default: MediaConnect generates a unique 12-character ID

If a custom name isn't specified, MediaConnect generates a unique 12-character ID as the prefix.

ndiDiscoveryServersoptionalNdiDiscoveryServerConfig[]ndi_discovery_serversoptionaltyping.List[NdiDiscoveryServerConfig]ndiDiscoveryServersoptionalList<NdiDiscoveryServerConfig>NdiDiscoveryServersoptionalNdiDiscoveryServerConfig[]NdiDiscoveryServersoptional*[]NdiDiscoveryServerConfig#
Specifies the configuration settings for individual NDI discovery servers.

Default: no NDI discovery servers

A maximum of 3 servers is allowed.

ndiStateoptionalStatendi_stateoptionalStatendiStateoptionalStateNdiStateoptionalStateNdiStateoptionalState= State.DISABLED#
A setting that controls whether NDI sources or outputs can be used in the flow.

Must be ENABLED for the flow to support NDI sources or outputs.