reorder variables
This commit is contained in:
parent
0286f94c2a
commit
67c58c8240
@ -116,19 +116,18 @@ shuffle = False
|
||||
|
||||
# overlay text
|
||||
# for paramters check ffmpeg doc
|
||||
# with show you can enable/disable the filter
|
||||
# leave textfile blank when you don't need this
|
||||
# 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
|
||||
[TEXT]
|
||||
show = True
|
||||
box = 1
|
||||
boxcolor = black@0xbb
|
||||
boxborderw = 6
|
||||
textfile = /opt/live.txt
|
||||
fontsize = 24
|
||||
fontcolor = white
|
||||
fontfile = /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf
|
||||
textfile = /opt/live.txt
|
||||
box = 1
|
||||
boxcolor = black@0xbb
|
||||
boxborderw = 6
|
||||
x = w-w/8*mod(t,8*(w+tw)/w)
|
||||
y = (h-line_h)*0.9
|
||||
|
||||
|
12
ffplayout.py
12
ffplayout.py
@ -108,14 +108,13 @@ _folder = SimpleNamespace(
|
||||
)
|
||||
|
||||
_text = SimpleNamespace(
|
||||
show=cfg.getboolean('TEXT', 'show'),
|
||||
box=cfg.get('TEXT', 'box'),
|
||||
boxcolor=cfg.get('TEXT', 'boxcolor'),
|
||||
boxborderw=cfg.get('TEXT', 'boxborderw'),
|
||||
textfile=cfg.get('TEXT', 'textfile'),
|
||||
fontsize=cfg.get('TEXT', 'fontsize'),
|
||||
fontcolor=cfg.get('TEXT', 'fontcolor'),
|
||||
fontfile=cfg.get('TEXT', 'fontfile'),
|
||||
textfile=cfg.get('TEXT', 'textfile'),
|
||||
box=cfg.get('TEXT', 'box'),
|
||||
boxcolor=cfg.get('TEXT', 'boxcolor'),
|
||||
boxborderw=cfg.get('TEXT', 'boxborderw'),
|
||||
x=cfg.get('TEXT', 'x'),
|
||||
y=cfg.get('TEXT', 'y')
|
||||
)
|
||||
@ -1029,7 +1028,8 @@ def main():
|
||||
'-ar', '48000', '-ac', '2',
|
||||
'-f', 'mpegts', '-']
|
||||
|
||||
if _text.show:
|
||||
if os.path.isfile(_text.textfile):
|
||||
logger.info('Use text file "{}" for overlay'.format(_text.textfile))
|
||||
overlay = [
|
||||
'-vf', ("drawtext=box={}:boxcolor='{}':boxborderw={}:fontsize={}"
|
||||
":fontcolor={}:fontfile='{}':textfile={}:reload=1"
|
||||
|
Loading…
x
Reference in New Issue
Block a user