You've already forked my-video-workflow
添加GOP配置
This commit is contained in:
@ -26,6 +26,8 @@ FFMPEG_USE_INTEL_GPU = False
|
||||
VIDEO_BITRATE = "2.5M"
|
||||
# crf
|
||||
VIDEO_CRF = 28
|
||||
# gop
|
||||
VIDEO_GOP = 60
|
||||
# [video]
|
||||
# enabled
|
||||
VIDEO_ENABLED = False
|
||||
@ -85,13 +87,15 @@ 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_HEVC, FFMPEG_USE_NVIDIA_GPU, FFMPEG_USE_INTEL_GPU, VIDEO_BITRATE, VIDEO_CRF
|
||||
global FFMPEG_EXEC, FFMPEG_USE_HEVC, FFMPEG_USE_NVIDIA_GPU, FFMPEG_USE_INTEL_GPU, VIDEO_BITRATE, VIDEO_CRF, \
|
||||
VIDEO_GOP
|
||||
FFMPEG_EXEC = section.get('exec', FFMPEG_EXEC)
|
||||
FFMPEG_USE_HEVC = section.getboolean('hevc', FFMPEG_USE_HEVC)
|
||||
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)
|
||||
VIDEO_GOP = section.getfloat('gop', VIDEO_GOP)
|
||||
if config.has_section("recorder"):
|
||||
global BILILIVE_RECORDER_DIRECTORY, XIGUALIVE_RECORDER_DIRECTORY, VIDEO_OUTPUT_DIR
|
||||
section = config['recorder']
|
||||
@ -128,6 +132,7 @@ def get_config():
|
||||
'intel_gpu': FFMPEG_USE_INTEL_GPU,
|
||||
'bitrate': VIDEO_BITRATE,
|
||||
'crf': VIDEO_CRF,
|
||||
'gop': VIDEO_GOP,
|
||||
},
|
||||
'recorder': {
|
||||
'bili_dir': BILILIVE_RECORDER_DIRECTORY,
|
||||
|
Reference in New Issue
Block a user