Merge pull request #10 from jb-alvarado/main

update Readme
This commit is contained in:
jb-alvarado 2022-04-07 21:16:50 +02:00 committed by GitHub
commit 0ee9fbc0ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 58 additions and 10 deletions

View File

@ -41,6 +41,7 @@ The main purpose of ffplayout is to provide a 24/7 broadcasting solution that pl
- **stream** - **stream**
- **desktop** - **desktop**
- **HLS** - **HLS**
- JSON RPC server, for getting infos about current playing and controlling.
Requirements Requirements
----- -----
@ -126,6 +127,53 @@ out:
-hls_segment_filename /var/www/html/live/stream-%09d.ts /var/www/html/live/stream.m3u8 -hls_segment_filename /var/www/html/live/stream-%09d.ts /var/www/html/live/stream.m3u8
``` ```
JSON RPC
-----
The ffplayout engine can run a JSON RPC server. A request show look like:
```Bash
curl -X POST -H "Content-Type: application/json" -H "Authorization: ---auth-key---" \
-d '{"jsonrpc": "2.0", "method": "player", "params":{"control":"next"}, "id":1 }' \
127.0.0.1:7070
```
At the moment this comments are possible:
```Bash
'{"jsonrpc": "2.0", "method": "player", "params":{"media":"current"}, "id":1 }' # get infos about current clip
'{"jsonrpc": "2.0", "method": "player", "params":{"control":"next"}, "id":1 }' # jump to next clip
'{"jsonrpc": "2.0", "method": "player", "params":{"control":"back"}, "id":1 }' # jump to last clip
'{"jsonrpc": "2.0", "method": "player", "params":{"control":"reset"}, "id":1 }' # reset playlist to old state
```
Output from `{"media":"current"}` show:
```JSON
{
"jsonrpc": "2.0",
"result": {
"current_media": {
"category": "",
"duration": 154.2,
"out": 154.2,
"seek": 0.0,
"source": "/opt/tv-media/clip.mp4"
},
"index": 39,
"play_mode": "playlist",
"played_sec": 67.80771999300123,
"remaining_sec": 86.39228000699876,
"start_sec": 24713.631999999998,
"start_time": "06:51:53.631"
},
"id": 1
}
```
Installation Installation
----- -----

View File

@ -18,13 +18,13 @@ mail:
help_text: Send error messages to email address, like missing playlist; invalid help_text: Send error messages to email address, like missing playlist; invalid
json format; missing clip path. Leave recipient blank, if you don't need this. json format; missing clip path. Leave recipient blank, if you don't need this.
'mail_level' can be INFO, WARNING or ERROR. 'interval' means seconds until a new mail will be sended. 'mail_level' can be INFO, WARNING or ERROR. 'interval' means seconds until a new mail will be sended.
subject: "Playout Error" subject: Playout Error
smtp_server: "mail.example.org" smtp_server: mail.example.org
starttls: true starttls: true
sender_addr: "ffplayout@example.org" sender_addr: ffplayout@example.org
sender_pass: "abc123" sender_pass: "abc123"
recipient: recipient:
mail_level: "ERROR" mail_level: ERROR
interval: 30 interval: 30
logging: logging:
@ -37,9 +37,9 @@ logging:
backup_count: 7 backup_count: 7
local_time: true local_time: true
timestamp: true timestamp: true
log_path: "/var/log/ffplayout/" log_path: /var/log/ffplayout/
log_level: "DEBUG" log_level: DEBUG
ffmpeg_level: "error" ffmpeg_level: error
processing: processing:
help_text: Default processing, for all clips that they get prepared in that way, help_text: Default processing, for all clips that they get prepared in that way,
@ -57,10 +57,10 @@ processing:
aspect: 1.778 aspect: 1.778
fps: 25 fps: 25
add_logo: true add_logo: true
logo: "docs/logo.png" logo: docs/logo.png
logo_scale: logo_scale:
logo_opacity: 0.7 logo_opacity: 0.7
logo_filter: "overlay=W-w-12:12" logo_filter: overlay=W-w-12:12
add_loudnorm: false add_loudnorm: false
loud_i: -18 loud_i: -18
loud_tp: -1.5 loud_tp: -1.5
@ -84,7 +84,7 @@ playlist:
should always start at the begin. 'length' represent the target length from should always start at the begin. 'length' represent the target length from
playlist, when is blank real length will not consider. 'infinit true' works with playlist, when is blank real length will not consider. 'infinit true' works with
single playlist file and loops it infinitely. single playlist file and loops it infinitely.
path: "/playlists" path: /playlists
day_start: "5:59:25" day_start: "5:59:25"
length: "24:00:00" length: "24:00:00"
infinit: false infinit: false