添加字体大小

This commit is contained in:
2022-07-20 10:16:46 +08:00
parent 8b87e28bef
commit 59f199db33
3 changed files with 12 additions and 3 deletions

View File

@ -7,7 +7,7 @@ from typing import Union
from bs4 import BeautifulSoup
from config import DANMAKU_FACTORY_EXEC, VIDEO_RESOLUTION, DANMAKU_SPEED, DEFAULT_FONT_NAME
from config import DANMAKU_FACTORY_EXEC, VIDEO_RESOLUTION, DANMAKU_SPEED, DEFAULT_FONT_NAME, DANMAKU_FONT_SIZE
from exception.danmaku import NoDanmakuException, DanmakuFormatErrorException
from util.file import check_file_exist
@ -37,7 +37,7 @@ def danmaku_to_subtitle(file: Union[os.PathLike[str], str], time_shift: float):
process = subprocess.Popen((
DANMAKU_FACTORY_EXEC, "--ignore-warnings",
"-r", str(VIDEO_RESOLUTION), "-s", str(DANMAKU_SPEED), "-f", "5",
"-S", "40", "-N", str(DEFAULT_FONT_NAME), "--showmsgbox", "FALSE",
"-S", str(DANMAKU_FONT_SIZE), "-N", str(DEFAULT_FONT_NAME), "--showmsgbox", "FALSE",
"-O", "255", "-L", "1", "-D", "0",
"-o", "ass", new_subtitle_name, "-i", file, "-t", str(time_shift)
))