> **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.
# RtmpDestination

A destination for an RTMP output group.

Use the static factory methods to create.

Obtainable from: RtmpDestination.url

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

## Example

TypeScript:

```ts
declare const video: medialive.EncodeConfiguration;
declare const audio: medialive.EncodeConfiguration;

medialive.OutputGroupConfiguration.rtmp({
  name: 'social',
  outputs: [{
    encodes: [video, audio],
    outputName: 'live',
    destinations: [
      medialive.RtmpDestination.url('rtmp://rtmp.example.com/live', 'your-stream-key'),
    ],
  }],
});
```

Python:

```python
# video: medialive.EncodeConfiguration
# audio: medialive.EncodeConfiguration

medialive.OutputGroupConfiguration.rtmp(
    name="social",
    outputs=[medialive.RtmpOutputDefinition(
        encodes=[video, audio],
        output_name="live",
        destinations=[
            medialive.RtmpDestination.url("rtmp://rtmp.example.com/live", "your-stream-key")
        ]
    )]
)
```

Java:

```java
EncodeConfiguration video;
EncodeConfiguration audio;

OutputGroupConfiguration.rtmp(RtmpOutputGroupProps.builder()
        .name("social")
        .outputs(List.of(RtmpOutputDefinition.builder()
                .encodes(List.of(video, audio))
                .outputName("live")
                .destinations(List.of(RtmpDestination.url("rtmp://rtmp.example.com/live", "your-stream-key")))
                .build()))
        .build());
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.MediaLive.Alpha
EncodeConfiguration video;
EncodeConfiguration audio;

OutputGroupConfiguration.Rtmp(new RtmpOutputGroupProps {
    Name = "social",
    Outputs = new [] { new RtmpOutputDefinition {
        Encodes = new [] { video, audio },
        OutputName = "live",
        Destinations = new [] { RtmpDestination.Url("rtmp://rtmp.example.com/live", "your-stream-key") }
    } }
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awsmedialivealpha/v2
var video EncodeConfiguration
var audio EncodeConfiguration

medialive.OutputGroupConfiguration_Rtmp(&RtmpOutputGroupProps{
	Name: jsii.String("social"),
	Outputs: []RtmpOutputDefinition{
		&RtmpOutputDefinition{
			Encodes: []EncodeConfiguration{
				video,
				audio,
			},
			OutputName: jsii.String("live"),
			Destinations: []RtmpDestination{
				medialive.RtmpDestination_Url(jsii.String("rtmp://rtmp.example.com/live"), jsii.String("your-stream-key")),
			},
		},
	},
})
```

## Initializer

TypeScript:

```ts
new RtmpDestination()
```

Python:

```python
RtmpDestination()
```

Java:

```java
new RtmpDestination()
```

C# / .NET:

```csharp
new RtmpDestination()
```

Golang:

```go
NewRtmpDestination()
```

## Methods

- `url(url: string, streamName: string, options?: OutputDestinationOptions): RtmpDestination // chainable` (static) — Create an RTMP destination.

  **Parameters**

  - `url` — The RTMP endpoint URL (e.g. rtmp://host/appname).
  - `streamName` — The stream name (stream key).
  - `options` — Optional credentials.
