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