Browse Source

更换字体库

zhangyong 1 year ago
parent
commit
39041a0cca
2 changed files with 3 additions and 3 deletions
  1. 1 1
      common/aliyun_oss_uploading.py
  2. 2 2
      video_stitching/video_stitching.py

+ 1 - 1
common/aliyun_oss_uploading.py

@@ -9,7 +9,7 @@ import requests
 OSS_BUCKET_PATH = "douyin"
 OSS_ACCESS_KEY_ID = "LTAIP6x1l3DXfSxm"
 OSS_ACCESS_KEY_SECRET = "KbTaM9ars4OX3PMS6Xm7rtxGr1FLon"
-OSS_BUCKET_ENDPOINT = "oss-cn-hangzhou-internal.aliyuncs.com" # 外网地址上到服务器需要更改为内网地址
+OSS_BUCKET_ENDPOINT = "oss-cn-hangzhou-internal.aliyuncs.com"# 外网地址上到服务器需要更改为内网地址
 OSS_BUCKET_NAME = "art-crawler"
 class Oss():
     # 抓取视频上传到art-crawler

+ 2 - 2
video_stitching/video_stitching.py

@@ -191,7 +191,7 @@ class VideoStitching():
                     end = editor.cvsecs(end)
                 text = cls.split_text(text, 10)
                 # /System/Library/Fonts/Hiragino Sans GB.ttc 本地字体
-                sub = editor.TextClip(text, font="/usr/share/fonts/truetype/arphic/ukai.ttc",
+                sub = editor.TextClip(text, font="/usr/share/fonts/truetype/wqy/wqy-zenhei.ttc",
                                       fontsize=30, color="black").set_duration(end - start).set_start(
                     start).set_position(
                     ("center", final_height - 80)).set_opacity(0.8)
@@ -201,7 +201,7 @@ class VideoStitching():
             video_with_subtitles = editor.CompositeVideoClip([final_clip] + subtitle_clips)
         else:
             text_clip = (
-                editor.TextClip("分享、转发给群友", font="/System/Library/Fonts/Hiragino Sans GB.ttc",
+                editor.TextClip("分享、转发给群友", font="/usr/share/fonts/truetype/wqy/wqy-zenhei.ttc",
                                 fontsize=30, color="black").
                     set_position(("center", final_height - 80)).
                     set_duration(duration_limit).