添加GOP配置

This commit is contained in:
2022-09-03 10:02:13 +08:00
parent db514f3519
commit 9ad58b8940
3 changed files with 13 additions and 3 deletions

View File

@ -4,7 +4,7 @@ from datetime import datetime, timedelta
from typing import IO
from config import FFMPEG_EXEC, FFMPEG_USE_HEVC, VIDEO_BITRATE, FFMPEG_USE_NVIDIA_GPU, VIDEO_CLIP_EACH_SEC, VIDEO_CLIP_OVERFLOW_SEC, \
FFMPEG_USE_INTEL_GPU, VIDEO_OUTPUT_DIR, VIDEO_CRF
FFMPEG_USE_INTEL_GPU, VIDEO_OUTPUT_DIR, VIDEO_CRF, VIDEO_GOP
from . import LOGGER
@ -204,6 +204,6 @@ def _common_ffmpeg_params():
return (
"-f", "mp4", "-b:v", VIDEO_BITRATE, "-c:a", "copy",
"-preset:v", "fast", "-profile:v", "main", "-avoid_negative_ts", "1",
"-qmin", "18", "-qmax", "38", "-crf", str(VIDEO_CRF), "-g:v", "900",
"-qmin", "18", "-qmax", "38", "-crf", str(VIDEO_CRF), "-g:v", str(VIDEO_GOP),
"-fflags", "+genpts", "-shortest"
)