When you are using the web frontend, maybe you wonder how you get a preview in the player. The default installation creates a HLS playlist and the player using this one, but most of the time the HLS mode is not used, instead the stream output mode is activated.
So if you stream to a external server, you have different options to get a preview stream for you player. The simplest one would be, if you get a m3u8 playlist address from your external target, like: https://example.org/live/stream.m3u8 this you can use in the configuration section from the frontend.
Another option would be (which is not testet), to add a HLS output option to your streaming parameters.
The next option can be, that you install a rtmp server locally and create here your preview stream. In the following lines this is described in more detail.
In this documentation we suspect, that you are using [ffplayout-frontend](https://github.com/ffplayout/ffplayout-frontend) and that you using [SRS](https://github.com/ossrs/srs) at least for the preview stream. In the past we used HLS for the preview, but now it is possible to also use [HTTP-FLV](https://github.com/ossrs/srs/wiki/v4_EN_DeliveryHttpStream) for less latency.
To get this working we have to follow some steps. ffplayout engine needs a direction where it can stream on and SRS need a virtual host for the rtmp input. Because both runs on the same machine, we use for that a redirection in the **/etc/hosts** file:
**If you want to use HLS as preview, replace `rtmp://preview.local/live/stream` with `rtmp://127.0.0.1/live/stream` and you can skip the redirection in the hosts file.**
Now you can enable and start SRS with: `systemctl enable --now srs` and check if it is running: `systemctl status srs`
#### Configure Nginx
We assume that you have already installed nginx and you are using it already for the frontend. So open the frontend config **/etc/nginx/sites-enabled/ffplayout.conf** and add a new location to it:
You can go now in your frontend configuration and change the `player_url` to: `http://[domain or IP]/preview/stream.flv` or `http://[domain or IP]/live/stream.m3u8`, save and reload the page. When you go now to the player tap you should see the preview video.