add man, update readme and build script

This commit is contained in:
jb-alvarado 2022-07-28 10:46:55 +02:00
parent 32454e41d6
commit 18d130ed01
11 changed files with 107 additions and 27 deletions

2
.gitignore vendored
View File

@ -18,6 +18,8 @@
*tar.gz
*.deb
*.rpm
ffplayout.1.gz
ffpapi.1.gz
/assets/*.db*
/dist/
/public/

View File

@ -1,16 +1,24 @@
---
title: ffplayout
section: 1
header: User Manual
footer: ffplayout 0.13.0
date: July 28, 2022
---
**ffplayout**
================
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
The ffplayout apps are mostly made to run on Linux as system services. But in general they should run on all platforms which are supported by Rust.
Check the [releases](https://github.com/ffplayout/ffplayout/releases/latest) for pre compiled version.
## **ffplayout-engine (ffplayout)**
[ffplayout](/ffplayout-engine/README.md) is 24/7 broadcasting solution. It can playout a folder with containing video clips, or play for every day a *JSON* playlist, while keeping the current playlist editable.
The ffplayout apps are mostly made to run on Linux as system services. But in general they should run on all platforms which are supported by Rust.
Check the [releases](https://github.com/ffplayout/ffplayout/releases/latest) for pre compiled version.
### Features
- have all values in a separate config file
@ -19,7 +27,7 @@ Check the [releases](https://github.com/ffplayout/ffplayout/releases/latest) for
- playing clips in [watched](/docs/folder_mode.md) folder mode
- send emails with error message
- overlay a logo
- overlay text, controllable through [messenger](https://github.com/ffplayout/messenger) or [ffplayout-frontend](https://github.com/ffplayout/ffplayout-frontend) (needs ffmpeg with libzmq and enabled JSON RPC server)
- overlay text, controllable through [ffplayout-frontend](https://github.com/ffplayout/ffplayout-frontend) (needs ffmpeg with libzmq and enabled JSON RPC server)
- EBU R128 loudness normalization (single pass)
- loop playlist infinitely
- [remote source](/docs/remote_source.md)
@ -50,7 +58,7 @@ For preview stream, read: [/docs/preview_stream.md](/docs/preview_stream.md)
## **ffplayout-api (ffpapi)**
ffpapi is an [REST API](/ffplayout-api/README.md) for controlling the engine, manipulate playlists, add settings etc.
ffpapi serves the [frontend](https://github.com/ffplayout/ffplayout-frontend) and it acts as a [REST API](/ffplayout-api/README.md) for controlling the engine, manipulate playlists, add settings etc.
### Requirements
@ -99,7 +107,6 @@ Check [install](docs/install.md) for details about how to install ffplayout.
## **Warning**
(Endless) streaming over multiple days will only work when config have **day_start** value and the **length** value is **24 hours**. If you need only some hours for every day, use a *cron* job, or something similar.
-----
@ -174,4 +181,5 @@ Output from `{"media":"current"}` show:
"id": 1
}
```
When you are in playlist mode and jumping forward or backwards in time, the time shift will be saved so the playlist is still in sync. But have in mind, that then maybe your playlist gets to short. When you are not resetting the state, it will reset on the next day automatically.

4
debian/postinst vendored
View File

@ -2,8 +2,8 @@
sysUser="ffpu"
if ! id $sysUser &>/dev/null; then
adduser --system --no-create-home $sysUser
if [ $(id -u $sysUser 2>/dev/null || echo -1) -ge -1 ]; then
adduser --system $sysUser
fi
if [ ! -d "/usr/share/ffplayout/db" ]; then

2
debian/postrm vendored
View File

@ -10,6 +10,6 @@ if [ -d "/var/log/ffplayout" ]; then
yes | rm -rf "/var/log/ffplayout"
fi
if id $sysUser &>/dev/null; then
if [ $(id -u $sysUser 2>/dev/null || echo -1) -ge 0 ]; then
userdel -rf $sysUser
fi

View File

@ -20,3 +20,16 @@ When you don't need the frontend and API, skip enable the systemd service **ffpa
When playlists are created and the ffplayout output is configured, you can start the process: `systemctl start ffplayout`, or click start in frontend.
If you want to configure ffplayout over terminal, you can edit **/etc/ffplayout/ffplayout.yml**.
### Manual Install
-----
- copy the binary to `/usr/bin/`
- copy **assets/ffplayout.yml** to `/etc/ffplayout`
- create folder `/var/log/ffplayout`
- create system user **ffpu**
- give ownership from `/etc/ffplayout` and `/var/log/ffplayout` to **ffpu**
- copy **assets/ffplayout.service** to `/etc/systemd/system`
- activate service and run it: `systemctl enable --now ffplayout`
You can also install the [released](https://github.com/ffplayout/ffplayout/releases/latest) ***.deb** or ***.rpm** package.

View File

@ -2,7 +2,18 @@ ffplayout supports different types of outputs, let's explain them a bit:
## Stream
The streaming output can be used for ever kind of classical streaming. For example for **rtmp, srt, rtp** etc. Every streaming type, which are supported from ffmpeg should be working
The streaming output can be used for ever kind of classical streaming. For example for **rtmp, srt, rtp** etc. Any streaming type supported by ffmpeg should work.
**Remember that you need a streaming server as a destination if you want to use this mode.**
You can use for example:
- [SRS](https://github.com/ossrs/srs)
- [OvenMediaEngine](https://www.ovenmediaengine.com/ome)
- [Nginx-RTMP](https://www.digitalocean.com/community/tutorials/how-to-set-up-a-video-streaming-server-using-nginx-rtmp-on-ubuntu-20-04)
- [Ant-Media-Server](https://github.com/ant-media/Ant-Media-Server)
Of course, you can also use media platforms that support streaming input.
### Multiple Outputs:
@ -59,6 +70,10 @@ In desktop mode you will get your picture on screen. For this you need a desktop
In this mode you can output directly to a hls playlist. The nice thing here is, that ffplayout need less resources then in streaming mode.
HLS output is currently the default, mostly because it works out of the box and don't need a streaming target. In default settings it saves the segments to **/usr/share/ffplayout/public/live/**.
**It is recommend to serve the HLS stream with nginx or another web server, and not with ffpapi (which is more meant for previewing).**
**HLS multiple outputs example:**
```YAML

View File

@ -1,3 +1,11 @@
---
title: ffpapi
section: 1
header: User Manual
footer: ffpapi 0.5.1
date: July 28, 2022
---
**ffplayout-api**
================
@ -21,7 +29,23 @@ Then run the API thru the systemd service, or like:
ffpapi -l 127.0.0.1:8787
```
If you plan to run ffpapi with systemd set permission from **/usr/share/ffplayout** and content to user **www-data:www-data**.
Possible Arguments
-----
```BASH
OPTIONS:
-a, --ask ask for user credentials
-d, --domain <DOMAIN> domain name for initialization
-h, --help Print help information
-i, --init Initialize Database
-l, --listen <LISTEN> Listen on IP:PORT, like: 127.0.0.1:8787
-m, --mail <MAIL> Admin mail address
-p, --password <PASSWORD> Admin password
-u, --username <USERNAME> Create admin user
-V, --version Print version information
```
If you plan to run ffpapi with systemd set permission from **/usr/share/ffplayout** and content to user **ffpu:ffpu**. User **ffpu** has to be created.
**For possible endpoints read: [api endpoints](/docs/api.md)**

View File

@ -56,6 +56,8 @@ assets = [
["../assets/ffplayout.yml", "/usr/share/ffplayout/ffplayout.yml.orig", "644"],
["../assets/ffplayout.conf", "/usr/share/ffplayout/ffplayout.conf.example", "644"],
["../README.md", "/usr/share/doc/ffplayout/README", "644"],
["../assets/ffpapi.1.gz", "/usr/share/man/man1/", "644"],
["../assets/ffplayout.1.gz", "/usr/share/man/man1/", "644"],
["../public/**/*", "/usr/share/ffplayout/public/", "644"],
]
maintainer-scripts = "../debian/"
@ -78,6 +80,8 @@ assets = [
["../assets/ffplayout.yml", "/usr/share/ffplayout/ffplayout.yml.orig", "644"],
["../assets/ffplayout.conf", "/usr/share/ffplayout/ffplayout.conf.example", "644"],
["../README.md", "/usr/share/doc/ffplayout/README", "644"],
["../assets/ffpapi.1.gz", "/usr/share/man/man1/", "644"],
["../assets/ffplayout.1.gz", "/usr/share/man/man1/", "644"],
["../public/**/*", "/usr/share/ffplayout/public/", "644"],
]
@ -93,7 +97,9 @@ assets = [
{ source = "../assets/ffplayout.service", dest = "/lib/systemd/system/ffplayout.service", mode = "644" },
{ source = "../assets/ffplayout@.service", dest = "/lib/systemd/system/ffplayout@.service", mode = "644" },
{ source = "../assets/11-ffplayout", dest = "/etc/sudoers.d/11-ffplayout", mode = "644" },
{ source = "../README.md", dest = "/usr/share/doc/ffplayout/README", mode = "644", doc = true },
{ source = "../README.md", dest = "/usr/share/doc/ffplayout/README", mode = "644" },
{ source = "../assets/ffpapi.1.gz", dest = "/usr/share/man/man1/ffpapi.1.gz", mode = "644", doc = true },
{ source = "../assets/ffplayout.1.gz", dest = "/usr/share/man/man1/ffplayout.1.gz", mode = "644", doc = true },
{ source = "../LICENSE", dest = "/usr/share/doc/ffplayout/LICENSE", mode = "644" },
{ source = "../assets/logo.png", dest = "/usr/share/ffplayout/logo.png", mode = "644" },
{ source = "../assets/ffplayout.yml", dest = "/usr/share/ffplayout/ffplayout.yml.orig", mode = "644" },

View File

@ -1,19 +1,6 @@
**ffplayout-engine**
================
Installation under Linux
-----
- copy the binary to `/usr/bin/`
- copy **assets/ffplayout.yml** to `/etc/ffplayout`
- create folder `/var/log/ffplayout`
- create system user **ffpu**
- give ownership from `/etc/ffplayout` and `/var/log/ffplayout` to **ffpu**
- copy **assets/ffplayout.service** to `/etc/systemd/system`
- activate service and run it: `systemctl enable --now ffplayout`
You can also install the [released](https://github.com/ffplayout/ffplayout/releases/latest) ***.deb** or ***.rpm** package.
Start with Arguments
-----
@ -37,7 +24,6 @@ OPTIONS:
```
You can run the command like:
```Bash

View File

@ -1,5 +1,7 @@
#!/usr/bin/bash
source $(dirname "$0")/man_create.sh
if [[ ! -d public ]]; then
cd ffplayout-frontend

24
scripts/man_create.sh Executable file
View File

@ -0,0 +1,24 @@
#!/usr/bin/bash
yes | rm -f assets/ffplayout.1.gz
yes | rm -f assets/ffpapi.1.gz
engine_docs=(
"README.md"
"ffplayout-engine/README.md"
"docs/install.md"
"docs/output.md"
"docs/live_ingest.md"
"docs/preview_stream.md"
)
api_docs=(
"ffplayout-api/README.md"
"docs/api.md"
)
pandoc "${engine_docs[@]}" -s --wrap=preserve -t man -o assets/ffplayout.1
pandoc "${api_docs[@]}" -s --wrap=preserve -t man -o assets/ffpapi.1
gzip assets/ffplayout.1
gzip assets/ffpapi.1