> **Experimental**
>
> `@aws-cdk/aws-medialive-alpha` is an [**experimental**](https://docs.aws.amazon.com/cdk/api/stability.html) (alpha) package: its API may change in any release, without a major version bump.
# SrtListenerDestinationProps

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.

Used as argument in: [SrtDestination.listener](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.SrtDestination.html#listener)

- Stability: [Experimental](https://docs.aws.amazon.com/cdk/api/stability.html)
- Source: [`lib/destinations.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-medialive-alpha/lib/destinations.ts#L220)

## Example

TypeScript:

```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:

```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:

```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());
```

C# / .NET:

```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
        }) }
    } }
});
```

Golang:

```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

- `encryptionPassphraseSecret`: [ISecret](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.ISecret.html) (required) — The Secrets Manager secret containing the encryption passphrase.

  [disable-awslint:prefer-ref-interface]

- `listenerPort`: number (required) — The port that MediaLive will listen on.

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

- `streamId`: string — The stream ID for the SRT connection.

  **Default:** no stream ID
