Browse Source

修改字体文件

zhangyong 1 year ago
parent
commit
744b03cf6d
1 changed files with 3 additions and 3 deletions
  1. 3 3
      video_stitching/video_stitching.py

+ 3 - 3
video_stitching/video_stitching.py

@@ -193,7 +193,7 @@ class VideoStitching():
                 # /System/Library/Fonts/Hiragino Sans GB.ttc 本地字体
                 # /System/Library/Fonts/Hiragino Sans GB.ttc 本地字体
                 Common.logger().info(f"字幕:{text}")
                 Common.logger().info(f"字幕:{text}")
 
 
-                sub = editor.TextClip(text, font="/usr/share/fonts/truetype/wqy/WenQuanYiZenHei.ttf",
+                sub = editor.TextClip(text, font="//usr/share/fonts/truetype/wqy/wqy-zenhei.ttc",
                                       fontsize=30, color="black").set_duration(end - start).set_start(
                                       fontsize=30, color="black").set_duration(end - start).set_start(
                     start).set_position(
                     start).set_position(
                     ("center", final_height - 80)).set_opacity(0.8)
                     ("center", final_height - 80)).set_opacity(0.8)
@@ -203,7 +203,7 @@ class VideoStitching():
             video_with_subtitles = editor.CompositeVideoClip([final_clip] + subtitle_clips)
             video_with_subtitles = editor.CompositeVideoClip([final_clip] + subtitle_clips)
         else:
         else:
             text_clip = (
             text_clip = (
-                editor.TextClip("分享、转发给群友", font="/usr/share/fonts/truetype/wqy/WenQuanYiZenHei.ttf",
+                editor.TextClip("分享、转发给群友", font="/usr/share/fonts/truetype/wqy/wqy-zenhei.ttc",
                                 fontsize=30, color="black").
                                 fontsize=30, color="black").
                     set_position(("center", final_height - 80)).
                     set_position(("center", final_height - 80)).
                     set_duration(duration_limit).
                     set_duration(duration_limit).
@@ -303,7 +303,7 @@ class VideoStitching():
                 except Exception as e:
                 except Exception as e:
                     Common.logger().warning(f"新拼接视频发送oss失败:{e}\n")
                     Common.logger().warning(f"新拼接视频发送oss失败:{e}\n")
                     continue
                     continue
-            if count >= 20:
+            if count >= 1:
                 break
                 break