You've already forked my-video-workflow
CRF客制化
This commit is contained in:
@ -20,6 +20,8 @@ FFMPEG_USE_NVIDIA_GPU = False
|
||||
FFMPEG_USE_INTEL_GPU = False
|
||||
# bitrate
|
||||
VIDEO_BITRATE = "2.5M"
|
||||
# crf
|
||||
VIDEO_CRF = 28
|
||||
# [video]
|
||||
# title
|
||||
VIDEO_TITLE = "【永恒de草薙直播录播】直播于 {}"
|
||||
@ -61,11 +63,12 @@ def load_config():
|
||||
VIDEO_CLIP_OVERFLOW_SEC = section.getfloat('overflow_sec', VIDEO_CLIP_OVERFLOW_SEC)
|
||||
if config.has_section("ffmpeg"):
|
||||
section = config['ffmpeg']
|
||||
global FFMPEG_EXEC, FFMPEG_USE_NVIDIA_GPU, FFMPEG_USE_INTEL_GPU, VIDEO_BITRATE
|
||||
global FFMPEG_EXEC, FFMPEG_USE_NVIDIA_GPU, FFMPEG_USE_INTEL_GPU, VIDEO_BITRATE, VIDEO_CRF
|
||||
FFMPEG_EXEC = section.get('exec', FFMPEG_EXEC)
|
||||
FFMPEG_USE_NVIDIA_GPU = section.getboolean('nvidia_gpu', FFMPEG_USE_NVIDIA_GPU)
|
||||
FFMPEG_USE_INTEL_GPU = section.getboolean('intel_gpu', FFMPEG_USE_INTEL_GPU)
|
||||
VIDEO_BITRATE = section.get('bitrate', VIDEO_BITRATE)
|
||||
VIDEO_CRF = section.getfloat('crf', VIDEO_CRF)
|
||||
if config.has_section("recorder"):
|
||||
global BILILIVE_RECORDER_DIRECTORY, XIGUALIVE_RECORDER_DIRECTORY, VIDEO_OUTPUT_DIR
|
||||
section = config['recorder']
|
||||
@ -95,6 +98,7 @@ def get_config():
|
||||
'nvidia_gpu': FFMPEG_USE_NVIDIA_GPU,
|
||||
'intel_gpu': FFMPEG_USE_INTEL_GPU,
|
||||
'bitrate': VIDEO_BITRATE,
|
||||
'crf': VIDEO_CRF,
|
||||
},
|
||||
'recorder': {
|
||||
'bili_dir': BILILIVE_RECORDER_DIRECTORY,
|
||||
|
Reference in New Issue
Block a user