don't expose realtime filter to user

This commit is contained in:
jb-alvarado 2021-03-29 09:25:43 +02:00
parent acdadcbfd4
commit b4c4d15541
4 changed files with 5 additions and 7 deletions

View File

@ -42,8 +42,7 @@ processing:
'loud_*' can adjust the loudnorm filter. 'output_count' sets the outputs for
the filtering, > 1 gives the option to use the same filters for multiple outputs.
This outputs can be taken in 'ffmpeg_param', names will be vout2, vout3;
aout2, aout2 etc.'use_realtime' is realtime filter, it works not in all scenarios,
but for example is necessary for hls output.
aout2, aout2 etc.
width: 1024
height: 576
aspect: 1.778
@ -58,7 +57,6 @@ processing:
loud_TP: -1.5
loud_LRA: 11
output_count: 1
use_realtime: false
playlist:
helptext: Set 'playlist_mode' to 'False' if you want to play clips from the 'storage'

View File

@ -219,7 +219,7 @@ def realtime_filter(duration, track=''):
"""
speed_filter = ''
if pre.realtime:
if sync_op.realtime:
speed_filter = f',{track}realtime=speed=1'
if sync_op.time_delta < 0:

View File

@ -28,7 +28,7 @@ from threading import Thread
from ffplayout.folder import GetSourceFromFolder, MediaStore, MediaWatcher
from ffplayout.playlist import GetSourceFromPlaylist
from ffplayout.utils import (ff_proc, ffmpeg_stderr_reader, get_date, log,
messenger, playlist, playout, stdin_args,
messenger, playlist, playout, stdin_args, sync_op,
terminate_processes)
@ -68,6 +68,7 @@ def output():
this output is hls output, no preprocess is needed.
"""
year = get_date(False).split('-')[0]
sync_op.realtime = True
try:
if playlist.mode and not stdin_args.folder:

View File

@ -130,7 +130,7 @@ def get_time(time_format):
# default variables and values
# ------------------------------------------------------------------------------
sync_op = SimpleNamespace(time_delta=0)
sync_op = SimpleNamespace(time_delta=0, realtime=False)
mail = SimpleNamespace()
log = SimpleNamespace()
pre = SimpleNamespace()
@ -252,7 +252,6 @@ pre.aspect = _cfg['processing']['aspect']
pre.fps = _cfg['processing']['fps']
pre.v_bitrate = _cfg['processing']['width'] * _cfg['processing']['height'] / 10
pre.v_bufsize = pre.v_bitrate / 2
pre.realtime = _cfg['processing']['use_realtime']
playout.mode = _cfg['out']['mode']
playout.name = _cfg['out']['service_name']