> For the complete documentation index, see [llms.txt](https://docs.datarhei.com/core/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datarhei.com/core/guides/rtmp.md).

# RTMP

The datarhei Core includes a simple RTMP server for publishing and playing streams. It is not enabled by default. You have to enable it in the config in the [rtmp section](/core/configuration/rtmp.md) or via the corresponding environemnt variables.

Example:

```
rtmp://127.0.0.1:1935/live/12345.stream
```

In the above example `/live` is the RTMP app and `12345.stream` is the name of the resource.

## Token

In order to protect access to the RTMP server you should define a token in the configuration. Only with a valid token it is possible to publish or play resources. The token has to be appended to the RTMP URL as a query string, e.g. `rtmp://127.0.0.1:1935/live/12345.stream?token=abc`.

As of version 16.12.0 you can write the token as last part of the path in URL instead of as a query string. The above example will looke like `rtmp://127.0.0.1:1935/live/12345.stream/abc`. This allows you to enter the token into the "stream key" field in some clients.

## API

Via the [RTMP endpoint](/core/api-rtmp/rtmp.md) in the API you can gather a list of the currently publishing RTMP resources.
