work on time shift - we need some testings for that

This commit is contained in:
jb-alvarado 2018-08-14 21:41:20 +02:00
parent d3b134a268
commit 07f0276565
2 changed files with 7 additions and 3 deletions

View File

@ -66,6 +66,7 @@ ffmpeg_copy_settings = ["-c", "copy", "-bsf:v", "h264_mp4toannexb", "-threads",
# time_shift adds or subtract seconds to the clip start,
# 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
[PLAYLIST]
playlist_path = /playlists
clips_root = /ADtvMedia

View File

@ -81,7 +81,7 @@ _playlist = SimpleNamespace(
start=cfg.getint('PLAYLIST', 'day_start'),
filler=cfg.get('PLAYLIST', 'filler_clip'),
blackclip=cfg.get('PLAYLIST', 'blackclip'),
shift=cfg.get('PLAYLIST', 'time_shift')
shift=cfg.getint('PLAYLIST', 'time_shift')
)
_buffer = SimpleNamespace(
@ -563,7 +563,9 @@ def iter_src_commands():
'Playlist is not valid!', dummy_len, xml_path, last
)
begin = get_time('full_sec') + _buffer.length + _buffer.tol
begin = get_time(
'full_sec'
) + _buffer.length + _buffer.tol + _playlist.shift
last = False
dummy_len = 60
last_mod_time = 0.0
@ -576,7 +578,8 @@ def iter_src_commands():
'Playlist not exist:', dummy_len, xml_path, last
)
begin = get_time('full_sec') + _buffer.length + _buffer.tol
begin = get_time(
'full_sec') + _buffer.length + _buffer.tol + _playlist.shift
last = False
dummy_len = 60
last_mod_time = 0.0