add some more docs
This commit is contained in:
parent
11c577aff5
commit
e198b18c64
25
Cargo.lock
generated
25
Cargo.lock
generated
@ -192,9 +192,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ffprobe"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f439d57070a29c93e5bdf9f98b973360aa96b1b8c203793de54482f168fc216a"
|
||||
checksum = "e52fe7c1991d1d0f77383e9f3e584860a2e916fa22b834176b84a411fac7107a"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
@ -224,9 +224,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "flate2"
|
||||
version = "1.0.22"
|
||||
version = "1.0.23"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f"
|
||||
checksum = "b39522e96686d38f4bc984b9198e3a0613264abaebaff2c5c918bfa6b6da09af"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"crc32fast",
|
||||
@ -459,9 +459,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "httparse"
|
||||
version = "1.6.0"
|
||||
version = "1.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9100414882e15fb7feccb4897e5f0ff0ff1ca7d1a86a23208ada4d7a18e6c6c4"
|
||||
checksum = "6330e8a36bd8c859f3fa6d9382911fbb7147ec39807f63b923933a247240b9ba"
|
||||
|
||||
[[package]]
|
||||
name = "httpdate"
|
||||
@ -651,9 +651,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.122"
|
||||
version = "0.2.123"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ec647867e2bf0772e28c8bcde4f0d19a9216916e890543b5a03ed8ef27b8f259"
|
||||
checksum = "cb691a747a7ab48abc15c5b42066eaafde10dc427e3b6ee2a1cf43db04c763bd"
|
||||
|
||||
[[package]]
|
||||
name = "linked-hash-map"
|
||||
@ -712,12 +712,11 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
|
||||
|
||||
[[package]]
|
||||
name = "miniz_oxide"
|
||||
version = "0.4.4"
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b"
|
||||
checksum = "d2b29bd4bc3f33391105ebee3589c19197c4271e3e5a9ec9bfe8127eeff8f082"
|
||||
dependencies = [
|
||||
"adler",
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1375,9 +1374,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tracing-core"
|
||||
version = "0.1.24"
|
||||
version = "0.1.25"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "90442985ee2f57c9e1b548ee72ae842f4a9a20e3f417cc38dbc5dc684d9bb4ee"
|
||||
checksum = "6dfce9f3241b150f36e8e54bb561a742d5daa1a47b5dd9a5ce369fd4a4db2210"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
]
|
||||
|
62
README.md
62
README.md
@ -16,12 +16,13 @@ The main purpose of ffplayout is to provide a 24/7 broadcasting solution that pl
|
||||
- have all values in a separate config file
|
||||
- dynamic playlist
|
||||
- replace missing playlist or clip with a dummy clip
|
||||
- playing clips from [watched folder](https://github.com/ffplayout/ffplayout_engine/wiki/Watch-Folder)
|
||||
- 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)
|
||||
- EBU R128 loudness normalization (single pass)
|
||||
- loop playlist infinitely
|
||||
- [remote source](/docs/remote_source.md)
|
||||
- trim and fade the last clip, to get full 24 hours
|
||||
- when playlist is not 24 hours long, loop filler clip until time is full
|
||||
- set custom day start, so you can have playlist for example: from 6am to 6am, instate of 0am to 12pm
|
||||
@ -37,11 +38,12 @@ The main purpose of ffplayout is to provide a 24/7 broadcasting solution that pl
|
||||
- **aevalsrc** (if video have no audio)
|
||||
- **apad** (add silence if audio duration is to short)
|
||||
- **tpad** (add black frames if video duration is to short)
|
||||
- output:
|
||||
- [output](/docs/output.md):
|
||||
- **stream**
|
||||
- **desktop**
|
||||
- **HLS**
|
||||
- JSON RPC server, for getting infos about current playing and controlling.
|
||||
- JSON RPC server, for getting infos about current playing and controlling
|
||||
- [live ingest](/docs/live_ingest.md)
|
||||
|
||||
Requirements
|
||||
-----
|
||||
@ -79,38 +81,18 @@ JSON Playlist Example
|
||||
"in": 0,
|
||||
"out": 2531.36,
|
||||
"duration": 2531.36,
|
||||
"source": "/Media/clip4.mp4",
|
||||
"source": "https://example.org/big_buck_bunny.webm",
|
||||
"category": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
**If you need a simple playlist generator check:** [playlist-generator](https://github.com/ffplayout/playlist-generator)
|
||||
|
||||
**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.
|
||||
|
||||
Remote source from URL
|
||||
-----
|
||||
|
||||
You can use sources from remote URL in that way:
|
||||
|
||||
```json
|
||||
{
|
||||
"in": 0,
|
||||
"out": 149,
|
||||
"duration": 149,
|
||||
"source": "https://example.org/big_buck_bunny.webm"
|
||||
}
|
||||
```
|
||||
|
||||
But be careful with it, better test it multiple times!
|
||||
|
||||
More informations in [Wiki](https://github.com/ffplayout/ffplayout_engine/wiki/Remote-URL-Source)
|
||||
|
||||
-----
|
||||
|
||||
HLS output
|
||||
@ -195,22 +177,28 @@ Start with Arguments
|
||||
|
||||
ffplayout also allows the passing of parameters:
|
||||
|
||||
- `-c, --config <CONFIG>` file path to ffplayout.conf
|
||||
- `-f, --folder <FOLDER>` play folder content
|
||||
- `-h, --help` Print help information
|
||||
- `-i, --infinit` loop playlist infinitely
|
||||
- `-l, --log <LOG>` file path for logging
|
||||
- `-m, --play-mode <PLAY_MODE>` playing mode: folder, playlist
|
||||
- `-o, --output <OUTPUT>` set output mode: desktop, hls, stream
|
||||
- `-p, --playlist <PLAYLIST>` path from playlist
|
||||
- `-s, --start <START>` start time in 'hh:mm:ss', 'now' for start with first
|
||||
- `-t, --length <LENGTH>` set length in 'hh:mm:ss', 'none' for no length check
|
||||
- `-v, --volume <VOLUME>` set audio volume
|
||||
- `-V, --version` Print version information
|
||||
```
|
||||
OPTIONS:
|
||||
-c, --config <CONFIG> File path to ffplayout.conf
|
||||
-f, --folder <FOLDER> Play folder content
|
||||
-g, --generate <YYYY-MM-DD>... Generate playlist for date. Date-range is possible, like:
|
||||
2022-01-01 - 2022-01-10.
|
||||
-h, --help Print help information
|
||||
-i, --infinit Loop playlist infinitely
|
||||
-l, --log <LOG> File path for logging
|
||||
-m, --play-mode <PLAY_MODE> Playing mode: folder, playlist
|
||||
-o, --output <OUTPUT> Set output mode: desktop, hls, stream
|
||||
-p, --playlist <PLAYLIST> Path from playlist
|
||||
-s, --start <START> Start time in 'hh:mm:ss', 'now' for start with first
|
||||
-t, --length <LENGTH> Set length in 'hh:mm:ss', 'none' for no length check
|
||||
-v, --volume <VOLUME> Set audio volume
|
||||
-V, --version Print version information
|
||||
|
||||
```
|
||||
|
||||
|
||||
You can run the command like:
|
||||
|
||||
```Bash
|
||||
./ffplayout.py -l none -p ~/playlist.json -o desktop
|
||||
./ffplayout -l none -p ~/playlist.json -o desktop
|
||||
```
|
||||
|
@ -46,6 +46,7 @@ echo ""
|
||||
cargo deb --target=x86_64-unknown-linux-musl
|
||||
mv ./target/x86_64-unknown-linux-musl/debian/ffplayout-engine_${version}_amd64.deb .
|
||||
|
||||
echo ""
|
||||
echo "Create rhel package"
|
||||
echo ""
|
||||
|
||||
|
10
docs/folder_mode.md
Normal file
10
docs/folder_mode.md
Normal file
@ -0,0 +1,10 @@
|
||||
### Folder Mode
|
||||
|
||||
ffplayout can play files from a folder, no playlists are required for this mode. This folder is monitored for changes, and when new files are added or deleted, this is registered and updated accordingly.
|
||||
|
||||
You just have to set `mode: folder` in the config under `processing:` and under `storage:` you have to enter the correct folder and the file extensions you want to scan for.
|
||||
|
||||
Additionally there is a **shuffle** mode, if this is activated, the files will be played randomly.
|
||||
|
||||
If shuffle mode is off, the clips will be played in sorted order.
|
||||
|
21
docs/live_ingest.md
Normal file
21
docs/live_ingest.md
Normal file
@ -0,0 +1,21 @@
|
||||
### Live Ingest
|
||||
|
||||
With live ingest you have the possibility to switch from playlist, or folder mode to a live stream.
|
||||
|
||||
It works in a way, that it crate a ffmpeg instance in _listen_ (_server_) mode. For example when you stream over RTMP to it, you can set the ingest input parameters to:
|
||||
|
||||
```
|
||||
-f live_flv -listen 1 -i rtmp://localhost:1936/live/stream
|
||||
```
|
||||
|
||||
Have in mind, that the ingest mode **can't** pull from a server, it only can act as its own server and listen for income.
|
||||
|
||||
When it notice a incoming stream, it will stop the playlist playing and continue the live source. The output will not interrupt, so you have a continuously output stream.
|
||||
|
||||
In rare cases it can happen, that for a short moment after switching the image freezes, but then it will continue. Also a short frame flickering can happen.
|
||||
|
||||
You need to know, that **ffmpeg in current version has no authentication mechanism and it just listen to the protocol and port (no path or app name).**
|
||||
|
||||
For security you should not expose the ingest to the world. You localhost only, with an relay/reverse proxy where you can make your authentication. You could also use a [patch](https://gist.github.com/jb-alvarado/f8ee1e7a3cf5e482e818338f2b62c95f) for ffmpeg, but there is no guarantee if this really works.
|
||||
|
||||
In theory you can use every [protocol](https://ffmpeg.org/ffmpeg-protocols.html) from ffmpeg which support a **listen** mode.
|
57
docs/output.md
Normal file
57
docs/output.md
Normal file
@ -0,0 +1,57 @@
|
||||
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
|
||||
|
||||
### Multiple Outputs:
|
||||
|
||||
If you would like to have multiple outputs, you can add you settings to `output_param:` like:
|
||||
|
||||
```yam
|
||||
...
|
||||
output_param: >-
|
||||
...
|
||||
-flags +global_header
|
||||
-f flv rtmp://127.0.0.1/live/big
|
||||
-s 1280x720
|
||||
-c:v libx264
|
||||
-crf 23
|
||||
-x264-params keyint=50:min-keyint=25:scenecut=-1
|
||||
-maxrate 2400k
|
||||
-bufsize 4800k
|
||||
-preset medium
|
||||
-profile:v Main
|
||||
-level 3.1
|
||||
-c:a aac
|
||||
-ar 44100
|
||||
-b:a 128k
|
||||
-flags +global_header
|
||||
-f flv rtmp://127.0.0.1/live/middle
|
||||
-s 640x360
|
||||
-c:v libx264
|
||||
-crf 23
|
||||
-x264-params keyint=50:min-keyint=25:scenecut=-1
|
||||
-maxrate 600k
|
||||
-bufsize 1200k
|
||||
-preset medium
|
||||
-profile:v Main
|
||||
-level 3.1
|
||||
-c:a aac
|
||||
-ar 44100
|
||||
-b:a 128k
|
||||
-flags +global_header
|
||||
-f flv rtmp://127.0.0.1/live/small
|
||||
```
|
||||
|
||||
## Desktop
|
||||
|
||||
In desktop mode you will get your picture on screen. For this you need a desktop system, theoretical all platforms should work here. ffplayout will need for that **ffplay**.
|
||||
|
||||
## HLS
|
||||
|
||||
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.
|
||||
|
||||
#### Activating Output
|
||||
|
||||
To use one of the outputs you need to edit the **ffplayout.yml** config, here under **out** set your **mode** and use the different **output** options.
|
17
docs/remote_source.md
Normal file
17
docs/remote_source.md
Normal file
@ -0,0 +1,17 @@
|
||||
### Video from URL
|
||||
Videos from URL are videos where you can watch directly in browser or download, for example:
|
||||
|
||||
```json
|
||||
{
|
||||
"in": 0,
|
||||
"out": 149,
|
||||
"duration": 149,
|
||||
"source": "https://example.org/big_buck_bunny.webm"
|
||||
}
|
||||
```
|
||||
|
||||
This should work in general, because most time it have a duration information and it is faster playable then a real live stream source. Avoid seeking because it can take to much time.
|
||||
|
||||
**Live streams as input in playlist, like rtmp is not supported.**
|
||||
|
||||
Be careful with it, better test it multiple times!
|
Loading…
Reference in New Issue
Block a user