Merge pull request #187 from jb-alvarado/master

update readme
This commit is contained in:
jb-alvarado 2022-09-01 17:46:47 +02:00 committed by GitHub
commit 33eb59a71f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 6 deletions

View File

@ -1,6 +1,6 @@
## Custom filter
ffplayout allows it to define a custom filter string. For that is the parameter **custom_filter** in the **ffplayout.yml** config file. The playlist can also contain a **custom_filter** parameter for every clip, with the same usage.
ffplayout allows it to define a custom filter string. For that is the parameter **custom_filter** in the **ffplayout.yml** config file under **processing**. The playlist can also contain a **custom_filter** parameter for every clip, with the same usage.
The filter outputs should end with `[c_v_out]` for video filter, and `[c_a_out]` for audio filter. The filters will be apply on every clip and after the filters which unify the clips.

View File

@ -1,5 +1,13 @@
### Preview Stream
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.
The ffplayout engine has no special preview config parameters, but you can add your settings to the **output_param**, like:
```YAML
@ -18,7 +26,6 @@ The ffplayout engine has no special preview config parameters, but you can add y
-b:a 128k
-flags +global_header
-f flv rtmp://preview.local/live/stream
...
```
@ -26,6 +33,8 @@ In this documentation we suspect, that you are using [ffplayout-frontend](https:
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.**
```
...
127.0.0.1 preview.local
@ -111,6 +120,27 @@ vhost preview.local {
mount [vhost]/[app]/[stream].flv;
}
}
# for normal HLS streaming
vhost __defaultVhost__ {
enabled on;
play {
mix_correct on;
}
hls {
enabled on;
hls_path /var/www/srs;
hls_fragment 6;
hls_window 3600;
hls_cleanup on;
hls_dispose 0;
hls_m3u8_file live/stream.m3u8;
hls_ts_file live/stream-[seq].ts;
}
}
```
Now you can enable and start SRS with: `systemctl enable --now srs` and check if it is running: `systemctl status srs`
@ -176,6 +206,6 @@ Of course in production you should have a HTTPS directive to, but this step is u
Restart Nginx.
You you can start ffplayout engine with preview enabled and when you setup everything correct it should run without errors.
You can (re)start ffplayout 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.
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.