fix error in streaming command

This commit is contained in:
jb-alvarado 2018-08-15 17:34:42 +02:00
parent d2583825d3
commit ccf7cb5450

View File

@ -81,7 +81,7 @@ _playlist = SimpleNamespace(
start=cfg.getint('PLAYLIST', 'day_start'), start=cfg.getint('PLAYLIST', 'day_start'),
filler=cfg.get('PLAYLIST', 'filler_clip'), filler=cfg.get('PLAYLIST', 'filler_clip'),
blackclip=cfg.get('PLAYLIST', 'blackclip'), blackclip=cfg.get('PLAYLIST', 'blackclip'),
shift=cfg.getfloat('PLAYLIST', 'time_shift'), shift=cfg.getint('PLAYLIST', 'time_shift'),
map_ext=cfg.get('PLAYLIST', 'map_extension') map_ext=cfg.get('PLAYLIST', 'map_extension')
) )
@ -568,8 +568,7 @@ def iter_src_commands():
# when there is no time left and we are in time, # when there is no time left and we are in time,
# set right values for new playlist # set right values for new playlist
list_date = get_date(False) list_date = get_date(False)
last_time = float( last_time = float(_playlist.start * 3600 - 5)
_playlist.start * 3600 - 5)
last_mod_time = 0.0 last_mod_time = 0.0
break break
@ -580,9 +579,7 @@ def iter_src_commands():
'Playlist is not valid!', dummy_len, xml_path, last 'Playlist is not valid!', dummy_len, xml_path, last
) )
begin = get_time( begin = get_time('full_sec') + _buffer.length + _buffer.tol
'full_sec'
) + _buffer.length + _buffer.tol
last = False last = False
dummy_len = 60 dummy_len = 60
last_mod_time = 0.0 last_mod_time = 0.0
@ -595,8 +592,7 @@ def iter_src_commands():
'Playlist not exist:', dummy_len, xml_path, last 'Playlist not exist:', dummy_len, xml_path, last
) )
begin = get_time( begin = get_time('full_sec') + _buffer.length + _buffer.tol
'full_sec') + _buffer.length + _buffer.tol
last = False last = False
dummy_len = 60 dummy_len = 60
last_mod_time = 0.0 last_mod_time = 0.0
@ -667,17 +663,15 @@ def main():
playout_pre = [ playout_pre = [
'ffmpeg', '-v', 'info', '-hide_banner', '-nostats', '-re', 'ffmpeg', '-v', 'info', '-hide_banner', '-nostats', '-re',
'-i', 'pipe:0', '-c', 'copy' '-i', 'pipe:0', '-c', 'copy'
] + list(_playout.post_comp_copy) ] + _playout.post_comp_copy
else: else:
playout_pre = [ playout_pre = [
'ffmpeg', '-v', 'info', '-hide_banner', '-nostats', '-re', 'ffmpeg', '-v', 'info', '-hide_banner', '-nostats', '-re',
'-thread_queue_size', '256', '-fflags', '+igndts', '-thread_queue_size', '256', '-fflags', '+igndts',
'-i', 'pipe:0', '-fflags', '+genpts' '-i', 'pipe:0', '-fflags', '+genpts'
] ] + _playout.logo + _playout.filter + \
+ list(_playout.logo) _playout.post_comp_video + \
+ list(_playout.filter) _playout.post_comp_audio
+ list(_playout.post_comp_video)
+ list(_playout.post_comp_audio)
playout = Popen( playout = Popen(
list(playout_pre) list(playout_pre)
@ -685,8 +679,7 @@ def main():
'-metadata', 'service_name=' + _playout.name, '-metadata', 'service_name=' + _playout.name,
'-metadata', 'service_provider=' + _playout.provider, '-metadata', 'service_provider=' + _playout.provider,
'-metadata', 'year=' + year '-metadata', 'year=' + year
] ] + list(_playout.post_comp_extra)
+ list(_playout.post_comp_extra)
+ [ + [
_playout.out_addr _playout.out_addr
], ],