Experimental
@aws-cdk/aws-mediaconnect-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
SourceNdi Struct
Configuration for NDI (SpeedHQ) source.
NDI sources are ingested from NDI senders inside your VPC. The flow must be configured with flowSize: FlowSize.LARGE and ndiConfig.ndiState = ENABLED with at least one NDI discovery server. The VPC connectivity for NDI is configured on the discovery server entries in NdiConfig, not on the source itself.
| Stability | Experimental |
|---|---|
| Source | lib/flow-source-configuration.ts |
Example
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,
}],
}),
});
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
)]
)
)
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();
// 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
} }
})
});
// 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
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #Default: no description
This description appears only on the MediaConnect console and will not be seen by the end user.
flowSourceNameoptionalstringflow_source_nameoptionalstrflowSourceNameoptionalStringFlowSourceNameoptionalstringFlowSourceNameoptional*string #Default: a name is generated automatically
sourceNameoptionalstringsource_nameoptionalstrsourceNameoptionalStringSourceNameoptionalstringSourceNameoptional*string #Default: select the NDI sender after starting the flow
If included, the format of this name must be MACHINENAME (ProgramName).
If not specified, you can select the upstream NDI sender from the console after starting the flow.