Experimental
@aws-cdk/aws-medialive-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
SrtDestination Class
A destination for an SRT output group.
Use the static factory methods to create.
| Stability | Experimental |
|---|---|
| Source | lib/destinations.ts |
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,
}),
},
},
},
})
Initializer
ts
new SrtDestination()
python
SrtDestination()
java
new SrtDestination()
csharp
new SrtDestination()
go
NewSrtDestination()
Methods
caller(props: SrtCallerDestinationProps): SrtDestination // chainable@staticmethod def caller(props: SrtCallerDestinationProps) -> SrtDestinationpublic static SrtDestination caller(SrtCallerDestinationProps props)public static SrtDestination Caller(SrtCallerDestinationProps props)func Caller(Props SrtCallerDestinationProps) SrtDestination static #Create a caller-mode SRT destination.
MediaLive connects to the remote listener.
callerUrl(url: string, options: SrtCallerUrlOptions): SrtDestination // chainable@staticmethod def caller_url(url: str, options: SrtCallerUrlOptions) -> SrtDestinationpublic static SrtDestination callerUrl(String url, SrtCallerUrlOptions options)public static SrtDestination CallerUrl(string url, SrtCallerUrlOptions options)func CallerUrl(Url *string, Options SrtCallerUrlOptions) SrtDestination static #Create a caller-mode SRT destination from a full SRT URL.
Use this when you already have a URL rather than a separate host and port — for example a MediaConnect Router Input's ingest endpoint (routerInput.endpoints[0].url).
listener(props: SrtListenerDestinationProps): SrtDestination // chainable@staticmethod def listener(props: SrtListenerDestinationProps) -> SrtDestinationpublic static SrtDestination listener(SrtListenerDestinationProps props)public static SrtDestination Listener(SrtListenerDestinationProps props)func Listener(Props SrtListenerDestinationProps) SrtDestination static #Create a listener-mode SRT destination.
MediaLive listens for incoming connections.