2018-01-07 07:58:45 -05:00
|
|
|
# This file is part of ffplayout.
|
|
|
|
#
|
|
|
|
# ffplayout is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# ffplayout is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with ffplayout. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
2019-06-07 07:31:52 -04:00
|
|
|
# set playlist_mode to False if you want to play clips from the [FOLDER] section
|
2019-06-06 12:16:04 -04:00
|
|
|
|
2019-03-11 07:29:47 -04:00
|
|
|
# sometimes it can happen, that a file is corrupt but still playable,
|
|
|
|
# this can produce an streaming error over all following files
|
|
|
|
# the only way in this case is, to stop ffplayout and start it again
|
|
|
|
# here we only say it can stop, the starting process is in your hand
|
|
|
|
# best way is a systemd serivce on linux
|
|
|
|
# stop_threshold: stop ffplayout, if it is async in time above this value
|
|
|
|
[GENERAL]
|
2019-06-06 12:16:04 -04:00
|
|
|
playlist_mode = True
|
2019-03-11 07:29:47 -04:00
|
|
|
stop_on_error = True
|
2019-03-29 09:55:51 -04:00
|
|
|
stop_threshold = 11
|
2018-01-07 07:58:45 -05:00
|
|
|
|
2019-05-29 05:44:18 -04:00
|
|
|
|
2018-01-07 07:58:45 -05:00
|
|
|
# send error messages to email address, like:
|
|
|
|
# missing playlist
|
2019-03-06 09:04:14 -05:00
|
|
|
# unvalid json format
|
2018-01-07 07:58:45 -05:00
|
|
|
# missing clip path
|
|
|
|
# leave recipient blank, if you don't need this
|
2019-05-10 05:08:07 -04:00
|
|
|
# mail_level can be: WARNING, ERROR
|
2018-01-07 07:58:45 -05:00
|
|
|
[MAIL]
|
2019-03-08 08:51:37 -05:00
|
|
|
subject = "Playout Error"
|
2018-01-07 07:58:45 -05:00
|
|
|
smpt_server = mail.example.org
|
|
|
|
smpt_port = 587
|
2018-01-07 11:56:54 -05:00
|
|
|
sender_addr = ffplayout@example.org
|
2018-01-07 07:58:45 -05:00
|
|
|
sender_pass = 12345
|
|
|
|
recipient =
|
2019-05-10 05:08:07 -04:00
|
|
|
mail_level = ERROR
|
2018-01-10 09:41:56 -05:00
|
|
|
|
|
|
|
|
|
|
|
# Logging to file
|
|
|
|
# path to /var/log/ only if you run this program as deamon
|
2019-05-10 05:08:07 -04:00
|
|
|
# log_level can be: DEBUG, INFO, WARNING, ERROR
|
2018-01-10 09:41:56 -05:00
|
|
|
[LOGGING]
|
2018-02-02 05:06:25 -05:00
|
|
|
log_file = /var/log/ffplayout/ffplayout.log
|
2018-01-10 09:41:56 -05:00
|
|
|
log_level = INFO
|
2018-01-07 07:58:45 -05:00
|
|
|
|
|
|
|
|
|
|
|
# output settings for the pre-compression
|
|
|
|
# all clips get prepared in that way,
|
|
|
|
# so the input for the final compression is unique
|
2018-02-19 05:12:13 -05:00
|
|
|
# it produce a uncompressed avi stream
|
2019-03-12 13:12:46 -04:00
|
|
|
# logo is only used if the path exist
|
2019-05-10 05:08:07 -04:00
|
|
|
# with logo_filter = overlay=W-w-12:12 you can modify the logo position
|
2019-03-04 11:54:36 -05:00
|
|
|
# live_protocols is for checking input, is input a live source ffplayout handles it a bit different
|
2018-01-07 07:58:45 -05:00
|
|
|
[PRE_COMPRESS]
|
|
|
|
width = 1024
|
|
|
|
height = 576
|
|
|
|
fps = 25
|
2019-05-28 03:58:34 -04:00
|
|
|
v_bitrate = 50000
|
2019-03-12 16:08:35 -04:00
|
|
|
logo = logo.png
|
2019-05-08 04:08:22 -04:00
|
|
|
logo_filter = overlay=W-w-12:12
|
2019-03-04 11:54:36 -05:00
|
|
|
live_protocols = ["http", "https", "ftp", "rtmp", "rtmpe", "rtmps", "rtp", "rtsp", "srt", "tcp", "udp"]
|
2018-04-29 12:07:42 -04:00
|
|
|
copy_mode = False
|
2019-06-04 04:16:15 -04:00
|
|
|
ffmpeg_copy_settings = ["-c", "copy", "-bsf:v", "h264_mp4toannexb", "-f", "mpegts", "-"]
|
2018-01-07 07:58:45 -05:00
|
|
|
|
|
|
|
|
|
|
|
# playlist settings
|
|
|
|
# put only the root path here, for example: "/playlists"
|
|
|
|
# subfolders are readed by the script
|
|
|
|
# subfolders needs this structur:
|
|
|
|
# "/playlists/2018/01" (/playlists/year/month)
|
|
|
|
# strings in playlist must have ampersan (&) as: &
|
|
|
|
|
|
|
|
# day_start means at witch hour starts the day, as integer
|
2018-02-19 05:12:13 -05:00
|
|
|
# filler_path are for the GUI only at the moment
|
|
|
|
# filler_clip get handle different, when a new length needs to calculate
|
2019-03-27 04:34:13 -04:00
|
|
|
# blackclip is for stream copy mode,
|
|
|
|
# best for this is a ~4 hours clip with black color and soft noise sound
|
2018-08-15 10:18:09 -04:00
|
|
|
|
2018-08-14 15:30:32 -04:00
|
|
|
# time_shift adds or subtract seconds to the clip start,
|
2018-08-15 10:18:09 -04:00
|
|
|
# this is usefull for example for hls, because it have a big delay
|
|
|
|
# the value will be added to the clip begin
|
|
|
|
# put 0 if you don't need it
|
|
|
|
|
2018-08-15 06:15:06 -04:00
|
|
|
# map_extension is only for special purpose,
|
2018-08-15 10:18:09 -04:00
|
|
|
# when your playlist have a different extension, then the originial clip
|
2018-08-15 06:15:06 -04:00
|
|
|
# example: map_extension = [".mp4", ".mkv"]
|
2019-06-06 12:16:04 -04:00
|
|
|
# life empty for no change
|
2018-01-07 07:58:45 -05:00
|
|
|
[PLAYLIST]
|
|
|
|
playlist_path = /playlists
|
2019-03-13 09:59:05 -04:00
|
|
|
clips_root = /media
|
|
|
|
filler_path = /media/filler/filler-clips
|
|
|
|
filler_clip = /media/filler/seperator.clock.mp4
|
2019-03-27 04:34:13 -04:00
|
|
|
blackclip = /opt/dummy.mkv
|
2019-03-20 12:24:28 -04:00
|
|
|
day_start = 06:00:00.000
|
2018-08-15 10:18:09 -04:00
|
|
|
time_shift = 35
|
2019-06-06 12:16:04 -04:00
|
|
|
map_extension = []
|
|
|
|
|
|
|
|
|
|
|
|
# play ordered or ramdomly files from clips_root
|
|
|
|
# extensions can be a list
|
|
|
|
# set shuffle to True to pick files randomly
|
|
|
|
[FOLDER]
|
|
|
|
storage = /media
|
|
|
|
extensions = ["*.mp4"]
|
|
|
|
shuffle = False
|
2018-01-07 07:58:45 -05:00
|
|
|
|
2019-05-26 14:59:01 -04:00
|
|
|
|
2019-06-07 10:42:11 -04:00
|
|
|
# overlay text
|
|
|
|
# for paramters check ffmpeg doc
|
2019-06-11 09:28:52 -04:00
|
|
|
# leave textfile blank when you don't need this
|
2019-06-09 15:04:33 -04:00
|
|
|
# in some systems decimal point is a comma, have this in mind when ffmpeg complains about wrong values
|
|
|
|
# on windows fontfile path need to be like this: C\:/WINDOWS/fonts/DejaVuSans.ttf
|
|
|
|
# textfile has the same pattern
|
2019-06-07 10:42:11 -04:00
|
|
|
[TEXT]
|
2019-06-11 09:28:52 -04:00
|
|
|
textfile = /opt/live.txt
|
2019-06-07 10:42:11 -04:00
|
|
|
fontsize = 24
|
|
|
|
fontcolor = white
|
2019-06-09 15:04:33 -04:00
|
|
|
fontfile = /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf
|
2019-06-11 09:28:52 -04:00
|
|
|
box = 1
|
|
|
|
boxcolor = black@0xbb
|
|
|
|
boxborderw = 6
|
2019-06-07 10:42:11 -04:00
|
|
|
x = w-w/8*mod(t,8*(w+tw)/w)
|
2019-06-09 15:04:33 -04:00
|
|
|
y = (h-line_h)*0.9
|
2019-06-07 10:42:11 -04:00
|
|
|
|
|
|
|
|
2018-01-07 07:58:45 -05:00
|
|
|
# the final playout post compression
|
|
|
|
# set the settings to your needs
|
2018-11-25 08:24:47 -05:00
|
|
|
# preview works only on a desktop system with ffplay!! Set it to True, if you need it
|
2018-01-07 07:58:45 -05:00
|
|
|
[OUT]
|
2018-11-25 08:24:47 -05:00
|
|
|
preview = False
|
2018-01-07 17:01:26 -05:00
|
|
|
service_name = Live Stream
|
|
|
|
service_provider = example.org
|
2019-06-04 04:16:15 -04:00
|
|
|
post_comp_video = [
|
2019-06-13 14:47:48 -04:00
|
|
|
"-c:v", "libx264", "-crf", "23", "-x264-params", "keyint=50:min-keyint=50:no-scenecut",
|
2019-06-11 12:29:39 -04:00
|
|
|
"-maxrate", "1300k", "-bufsize", "2600k", "-preset", "medium", "-profile:v", "Main",
|
|
|
|
"-level", "3.1", "-refs", "3"
|
2019-06-04 04:16:15 -04:00
|
|
|
]
|
2019-03-05 09:01:54 -05:00
|
|
|
post_comp_audio = ["-c:a", "libfdk_aac", "-ar", "44100", "-b:a", "128k"]
|
2019-06-04 04:16:15 -04:00
|
|
|
post_comp_extra = ["-flags", "+global_header", "-f", "flv"]
|
2018-04-29 12:07:42 -04:00
|
|
|
post_comp_copy = ["-bsf:a", "aac_adtstoasc"]
|
2018-02-02 05:06:25 -05:00
|
|
|
out_addr = rtmp://127.0.0.1/live/stream
|