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:
Then create the config for SRS under **/etc/srs/srs.conf** with this content:
```NGINX
listen 1935;
max_connections 20;
daemon on;
pid /usr/local/srs/objs/srs.pid;
srs_log_tank console; # file;
srs_log_file /var/log/srs.log;
ff_log_dir /tmp;
srs_log_level error;
http_server {
enabled on;
listen 127.0.0.1:8080;
dir ./objs/nginx/html;
}
stats {
network 0;
disk sda vda xvda xvdb;
}
vhost preview.local {
http_remux {
enabled on;
mount [vhost]/[app]/[stream].flv;
}
}
```
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:
Of course in production you should have a HTTPS directive to, but this step is up to you.
Restart Nginx.
You you can start ffplayout engine with preview enabled and when you setup everything correct it should run without errors.
You can go now in your frontend configuration and change the `player_url` to: `http://[domain or IP]/preview/stream.flv`, save and reload the page. When you go now to the player tap you should see the preview video.