Skip to content
v2.278.0

Experimental

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

SrtListenerDestinationProps Struct ​

SRT listener destination properties.

In listener mode, MediaLive opens a socket on listenerPort and waits for the downstream system to connect. The downstream system needs the channel's outbound IP and this port — AWS does not require (or use) a destination URL in listener mode.

Example ​

ts
declare const video: medialive.EncodeConfiguration;
declare const audio: medialive.EncodeConfiguration;
declare const passphrase: secretsmanager.ISecret;

// SRT caller to a remote listener
medialive.OutputGroupConfiguration.srt({
  name: 'srt_out',
  outputs: [{
    encodes: [video, audio],
    outputName: 'srt_caller',
    destinations: [medialive.SrtDestination.caller({
      address: '203.0.113.20',
      port: 5000,
      encryptionPassphraseSecret: passphrase,
    })],
  }],
});

// SRT listener — MediaLive waits for the downstream system to connect
medialive.OutputGroupConfiguration.srt({
  name: 'srt_listen',
  outputs: [{
    encodes: [video, audio],
    outputName: 'srt_listener',
    destinations: [medialive.SrtDestination.listener({
      listenerPort: 5000,
      encryptionPassphraseSecret: passphrase,
    })],
  }],
});
python
# video: medialive.EncodeConfiguration
# audio: medialive.EncodeConfiguration
# passphrase: secretsmanager.ISecret


# SRT caller to a remote listener
medialive.OutputGroupConfiguration.srt(
    name="srt_out",
    outputs=[medialive.SrtOutputDefinition(
        encodes=[video, audio],
        output_name="srt_caller",
        destinations=[medialive.SrtDestination.caller(
            address="203.0.113.20",
            port=5000,
            encryption_passphrase_secret=passphrase
        )]
    )]
)

# SRT listener — MediaLive waits for the downstream system to connect
medialive.OutputGroupConfiguration.srt(
    name="srt_listen",
    outputs=[medialive.SrtOutputDefinition(
        encodes=[video, audio],
        output_name="srt_listener",
        destinations=[medialive.SrtDestination.listener(
            listener_port=5000,
            encryption_passphrase_secret=passphrase
        )]
    )]
)
java
EncodeConfiguration video;
EncodeConfiguration audio;
ISecret passphrase;


// SRT caller to a remote listener
OutputGroupConfiguration.srt(SrtOutputGroupProps.builder()
        .name("srt_out")
        .outputs(List.of(SrtOutputDefinition.builder()
                .encodes(List.of(video, audio))
                .outputName("srt_caller")
                .destinations(List.of(SrtDestination.caller(SrtCallerDestinationProps.builder()
                        .address("203.0.113.20")
                        .port(5000)
                        .encryptionPassphraseSecret(passphrase)
                        .build())))
                .build()))
        .build());

// SRT listener — MediaLive waits for the downstream system to connect
OutputGroupConfiguration.srt(SrtOutputGroupProps.builder()
        .name("srt_listen")
        .outputs(List.of(SrtOutputDefinition.builder()
                .encodes(List.of(video, audio))
                .outputName("srt_listener")
                .destinations(List.of(SrtDestination.listener(SrtListenerDestinationProps.builder()
                        .listenerPort(5000)
                        .encryptionPassphraseSecret(passphrase)
                        .build())))
                .build()))
        .build());
csharp
// Install: dotnet add package Amazon.CDK.AWS.MediaLive.Alpha
EncodeConfiguration video;
EncodeConfiguration audio;
ISecret passphrase;


// SRT caller to a remote listener
OutputGroupConfiguration.Srt(new SrtOutputGroupProps {
    Name = "srt_out",
    Outputs = new [] { new SrtOutputDefinition {
        Encodes = new [] { video, audio },
        OutputName = "srt_caller",
        Destinations = new [] { SrtDestination.Caller(new SrtCallerDestinationProps {
            Address = "203.0.113.20",
            Port = 5000,
            EncryptionPassphraseSecret = passphrase
        }) }
    } }
});

// SRT listener — MediaLive waits for the downstream system to connect
OutputGroupConfiguration.Srt(new SrtOutputGroupProps {
    Name = "srt_listen",
    Outputs = new [] { new SrtOutputDefinition {
        Encodes = new [] { video, audio },
        OutputName = "srt_listener",
        Destinations = new [] { SrtDestination.Listener(new SrtListenerDestinationProps {
            ListenerPort = 5000,
            EncryptionPassphraseSecret = passphrase
        }) }
    } }
});
go
// Install: go get github.com/aws/aws-cdk-go/awsmedialivealpha/v2
var video EncodeConfiguration
var audio EncodeConfiguration
var passphrase ISecret


// SRT caller to a remote listener
medialive.OutputGroupConfiguration_Srt(&SrtOutputGroupProps{
	Name: jsii.String("srt_out"),
	Outputs: []SrtOutputDefinition{
		&SrtOutputDefinition{
			Encodes: []EncodeConfiguration{
				video,
				audio,
			},
			OutputName: jsii.String("srt_caller"),
			Destinations: []SrtDestination{
				medialive.SrtDestination_Caller(&SrtCallerDestinationProps{
					Address: jsii.String("203.0.113.20"),
					Port: jsii.Number(5000),
					EncryptionPassphraseSecret: passphrase,
				}),
			},
		},
	},
})

// SRT listener — MediaLive waits for the downstream system to connect
medialive.OutputGroupConfiguration_Srt(&SrtOutputGroupProps{
	Name: jsii.String("srt_listen"),
	Outputs: []SrtOutputDefinition{
		&SrtOutputDefinition{
			Encodes: []EncodeConfiguration{
				video,
				audio,
			},
			OutputName: jsii.String("srt_listener"),
			Destinations: []SrtDestination{
				medialive.SrtDestination_Listener(&SrtListenerDestinationProps{
					ListenerPort: jsii.Number(5000),
					EncryptionPassphraseSecret: passphrase,
				}),
			},
		},
	},
})

Properties ​

encryptionPassphraseSecretISecretencryption_passphrase_secretISecretencryptionPassphraseSecretISecretEncryptionPassphraseSecretISecretEncryptionPassphraseSecretISecret required #
The Secrets Manager secret containing the encryption passphrase.

[disable-awslint:prefer-ref-interface]

listenerPortnumberlistener_portint | floatlistenerPortNumberListenerPortdoubleListenerPort*float64 required #
The port that MediaLive will listen on.

AWS reserves the range 5000–5200 for SRT listener output.

streamIdoptionalstringstream_idoptionalstrstreamIdoptionalStringStreamIdoptionalstringStreamIdoptional*string #
The stream ID for the SRT connection.

Default: no stream ID