浏览代码

字幕文件优化

zhangyong 1 年之前
父节点
当前提交
3088b2c780
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      video_stitching/video_stitching.py

+ 4 - 0
video_stitching/video_stitching.py

@@ -192,7 +192,11 @@ class VideoStitching():
             subtitle_clips = []
             for match in matches:
                 start = match[0]
+                start = cls.srt_to_seconds(start)
                 end = match[1]
+                end = cls.srt_to_seconds(end)
+                start = editor.cvsecs(start)
+                end = editor.cvsecs(end)
                 text = match[2].strip()
                 text = cls.split_text(text, 10)
                 # /System/Library/Fonts/Hiragino Sans GB.ttc 本地字体