添加output_dir

This commit is contained in:
2022-05-17 17:56:27 +08:00
parent 80bac4498e
commit f70d04f1b2
2 changed files with 19 additions and 10 deletions

View File

@ -33,6 +33,8 @@ VIDEO_CLIP_OVERFLOW_SEC = 5
BILILIVE_RECORDER_DIRECTORY = "./"
# xigua_dir
XIGUALIVE_RECORDER_DIRECTORY = "./"
# output_dir
VIDEO_OUTPUT_DIR = "/mnt/"
def load_config():
@ -65,10 +67,11 @@ def load_config():
FFMPEG_USE_INTEL_GPU = section.getboolean('intel_gpu', FFMPEG_USE_INTEL_GPU)
VIDEO_BITRATE = section.get('bitrate', VIDEO_BITRATE)
if config.has_section("recorder"):
global BILILIVE_RECORDER_DIRECTORY, XIGUALIVE_RECORDER_DIRECTORY
global BILILIVE_RECORDER_DIRECTORY, XIGUALIVE_RECORDER_DIRECTORY, VIDEO_OUTPUT_DIR
section = config['recorder']
BILILIVE_RECORDER_DIRECTORY = section.get('bili_dir', BILILIVE_RECORDER_DIRECTORY)
XIGUALIVE_RECORDER_DIRECTORY = section.get('xigua_dir', XIGUALIVE_RECORDER_DIRECTORY)
VIDEO_OUTPUT_DIR = section.get('output_dir', VIDEO_OUTPUT_DIR)
return True
@ -96,6 +99,7 @@ def get_config():
'recorder': {
'bili_dir': BILILIVE_RECORDER_DIRECTORY,
'xigua_dir': XIGUALIVE_RECORDER_DIRECTORY,
'output_dir': VIDEO_OUTPUT_DIR,
},
}
return config