revert to string instead of list
This commit is contained in:
parent
654f54e176
commit
44b33b7bcc
@ -64,7 +64,7 @@ ingest:
|
||||
for a ingest stream. This stream will override the normal streaming until is done.
|
||||
There is no authentication, this is up to you. The recommend way is to set address to localhost, stream to a local server with authentication and from there stream to this app.
|
||||
enable: false
|
||||
stream_input: [-f, live_flv, -listen, 1, -i, rtmp://localhost:1936/live/stream]
|
||||
input_param: -f live_flv -listen 1 -i rtmp://localhost:1936/live/stream
|
||||
|
||||
playlist:
|
||||
helptext: >
|
||||
@ -115,34 +115,34 @@ out:
|
||||
inside. 'preview' works only in streaming output and creates a separate preview stream.
|
||||
mode: 'stream'
|
||||
preview: false
|
||||
preview_param:
|
||||
[-s, 512x288,
|
||||
-c:v, libx264,
|
||||
-crf, 24,
|
||||
-x264-params, keyint=50:min-keyint=25:scenecut=-1,
|
||||
-maxrate, 800k,
|
||||
-bufsize, 1600k,
|
||||
-preset, ultrafast,
|
||||
-tune, zerolatency,
|
||||
-profile:v, Main,
|
||||
-level, 3.1,
|
||||
-c:a, aac,
|
||||
-ar, 44100,
|
||||
-b:a, 128k,
|
||||
-flags, +global_header,
|
||||
-f, flv, rtmp://preview.local/live/stream]
|
||||
stream_param:
|
||||
[-c:v, libx264,
|
||||
-crf, 23,
|
||||
-x264-params, keyint=50:min-keyint=25:scenecut=-1,
|
||||
-maxrate, 1300k,
|
||||
-bufsize, 2600k,
|
||||
-preset, faster,
|
||||
-tune, zerolatency,
|
||||
-profile:v, Main,
|
||||
-level, 3.1,
|
||||
-c:a, aac,
|
||||
-ar, 44100,
|
||||
-b:a, 128k,
|
||||
-flags, +global_header,
|
||||
-f, flv, rtmp://localhost/live/stream]
|
||||
preview_param: >-
|
||||
-s 512x288
|
||||
-c:v libx264
|
||||
-crf 24
|
||||
-x264-params keyint=50:min-keyint=25:scenecut=-1
|
||||
-maxrate 800k
|
||||
-bufsize 1600k
|
||||
-preset ultrafast
|
||||
-tune zerolatency
|
||||
-profile:v Main
|
||||
-level 3.1
|
||||
-c:a aac
|
||||
-ar 44100
|
||||
-b:a 128k
|
||||
-flags +global_header
|
||||
-f flv rtmp://preview.local/live/stream
|
||||
output_param: >-
|
||||
-c:v libx264
|
||||
-crf 23
|
||||
-x264-params keyint=50:min-keyint=25:scenecut=-1
|
||||
-maxrate 1300k
|
||||
-bufsize 2600k
|
||||
-preset faster
|
||||
-tune zerolatency
|
||||
-profile:v Main
|
||||
-level 3.1
|
||||
-c:a aac
|
||||
-ar 44100
|
||||
-b:a 128k
|
||||
-flags +global_header
|
||||
-f flv rtmp://localhost/live/stream
|
||||
|
@ -36,7 +36,7 @@ def listener(que):
|
||||
|
||||
server_cmd = [
|
||||
'ffmpeg', '-hide_banner', '-nostats', '-v', 'level+error'
|
||||
] + ingest.stream_input + [
|
||||
] + ingest.input_param + [
|
||||
'-filter_complex', f'{filter_}[vout1]',
|
||||
'-map', '[vout1]', '-map', '0:a'
|
||||
] + pre.settings
|
||||
|
@ -87,7 +87,7 @@ def output():
|
||||
cmd = [
|
||||
'ffmpeg', '-v', f'level+{log.ff_level}',
|
||||
'-hide_banner', '-nostats'
|
||||
] + node['src_cmd'] + node['filter'] + playout.stream_param
|
||||
] + node['src_cmd'] + node['filter'] + playout.output_param
|
||||
|
||||
messenger.debug(f'Encoder CMD: "{" ".join(cmd)}"')
|
||||
|
||||
|
@ -45,7 +45,7 @@ def output():
|
||||
enc_cmd = [
|
||||
'ffmpeg', '-v', f'level+{log.ff_level}', '-hide_banner',
|
||||
'-nostats', '-re', '-thread_queue_size', '160', '-i', 'pipe:0'
|
||||
] + playout.stream_param[:-3] + ['-f', 'null', '-']
|
||||
] + playout.output_param[:-3] + ['-f', 'null', '-']
|
||||
|
||||
messenger.debug(f'Encoder CMD: "{" ".join(enc_cmd)}"')
|
||||
|
||||
|
@ -66,7 +66,7 @@ def output():
|
||||
enc_cmd = [
|
||||
'ffmpeg', '-v', f'level+{log.ff_level}', '-hide_banner',
|
||||
'-nostats', '-re', '-thread_queue_size', '160', '-i', 'pipe:0'
|
||||
] + filtering + preview + playout.stream_param
|
||||
] + filtering + preview + playout.output_param
|
||||
|
||||
messenger.debug(f'Encoder CMD: "{" ".join(enc_cmd)}"')
|
||||
|
||||
|
@ -23,6 +23,7 @@ import json
|
||||
import logging
|
||||
import math
|
||||
import re
|
||||
import shlex
|
||||
import signal
|
||||
import smtplib
|
||||
import socket
|
||||
@ -258,9 +259,9 @@ if playlist.start is None:
|
||||
playlist.start = get_time('full_sec')
|
||||
|
||||
if stdin_args.length:
|
||||
playlist.length = str_to_sec(stdin_args.length)
|
||||
playlist.length = str_to_sec(stdin_args.length)
|
||||
else:
|
||||
playlist.length = str_to_sec(_cfg['playlist']['length'])
|
||||
playlist.length = str_to_sec(_cfg['playlist']['length'])
|
||||
|
||||
if stdin_args.loop:
|
||||
playlist.loop = stdin_args.loop
|
||||
@ -287,7 +288,7 @@ def pre_audio_codec():
|
||||
|
||||
|
||||
ingest.enable = _cfg['ingest']['enable']
|
||||
ingest.stream_input = [str(e) for e in _cfg['ingest']['stream_input']]
|
||||
ingest.input_param = shlex.split(_cfg['ingest']['input_param'])
|
||||
|
||||
if stdin_args.play_mode:
|
||||
pre.mode = stdin_args.play_mode
|
||||
@ -310,7 +311,7 @@ pre.settings = [
|
||||
'-minrate', f'{pre.v_bitrate}k',
|
||||
'-maxrate', f'{pre.v_bitrate}k',
|
||||
'-bufsize', f'{pre.v_bufsize}k'
|
||||
] + pre_audio_codec() + ['-f', 'mpegts', '-']
|
||||
] + pre_audio_codec() + ['-f', 'mpegts', '-']
|
||||
|
||||
if stdin_args.output:
|
||||
playout.mode = stdin_args.output
|
||||
@ -318,8 +319,8 @@ else:
|
||||
playout.mode = _cfg['out']['mode']
|
||||
|
||||
playout.preview = _cfg['out']['preview']
|
||||
playout.preview_param = [str(e) for e in _cfg['out']['preview_param']]
|
||||
playout.stream_param = [str(e) for e in _cfg['out']['stream_param']]
|
||||
playout.preview_param =shlex.split(_cfg['out']['preview_param'])
|
||||
playout.output_param = shlex.split(_cfg['out']['output_param'])
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
@ -947,7 +948,7 @@ def src_or_dummy(node):
|
||||
f'Seek in remote source "{node.get("source")}" not supported!')
|
||||
node['src_cmd'] = [
|
||||
'-i', node['source']
|
||||
] + set_length(86400, node['seek'], node['out'])
|
||||
] + set_length(86400, node['seek'], node['out'])
|
||||
elif node.get('source') and Path(node['source']).is_file():
|
||||
if probe.format.get('duration') and not math.isclose(
|
||||
probe.format['duration'], node['duration'], abs_tol=3):
|
||||
@ -962,8 +963,8 @@ def src_or_dummy(node):
|
||||
f'Seek in looped source "{node["source"]}" not supported!')
|
||||
node['src_cmd'] = [
|
||||
'-i', node['source']
|
||||
] + set_length(node['duration'], node['seek'],
|
||||
node['out'] - node['seek'])
|
||||
] + set_length(node['duration'], node['seek'],
|
||||
node['out'] - node['seek'])
|
||||
else:
|
||||
# when list starts with looped clip,
|
||||
# the logo length will be wrong
|
||||
@ -979,4 +980,3 @@ def src_or_dummy(node):
|
||||
node = gen_filler(node)
|
||||
|
||||
return node
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user