deeme commited on
Commit
ac0afbe
·
verified ·
1 Parent(s): 4ecde73

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -282,7 +282,7 @@ def create_video(project_dir, image_paths, caption_subtitle_file, speech_subtitl
282
 
283
  subtitle_path = caption_subtitle_file.replace(os.sep, '/')
284
  subtitle_path = subtitle_path.replace(':', '\\:')
285
- caption_filter = f"subtitles='{subtitle_path}':force_style='Fontname=Noto Sans CJK SC,Alignment=2,FontSize=15,PrimaryColour=&H00E0FFFF,OutlineColour=&H80000000,BackColour=&H40000000,BorderStyle=1,Outline=0.8,Shadow=0.5,MarginV=10'"
286
 
287
  cmd2 = [
288
  "ffmpeg", "-y",
@@ -297,7 +297,7 @@ def create_video(project_dir, image_paths, caption_subtitle_file, speech_subtitl
297
  # 再添加speech字幕(顶部)
298
  subtitle_path = speech_subtitle_file.replace(os.sep, '/')
299
  subtitle_path = subtitle_path.replace(':', '\\:')
300
- speech_filter = f"subtitles='{subtitle_path}':force_style='Fontname=Noto Sans CJK SC,Alignment=6,FontSize=15,PrimaryColour=&H00FFCCE6,OutlineColour=&H80000000,BackColour=&H40000000,BorderStyle=1,Outline=0.8,Shadow=0.5,MarginV=10,MarginR=15'"
301
 
302
  cmd3 = [
303
  "ffmpeg", "-y",
 
282
 
283
  subtitle_path = caption_subtitle_file.replace(os.sep, '/')
284
  subtitle_path = subtitle_path.replace(':', '\\:')
285
+ caption_filter = f"subtitles='{subtitle_path}':force_style='Fontname=Noto Sans CJK SC,Alignment=2,FontSize=15,PrimaryColour=&H00E0FFFF,OutlineColour=&H80000000,BackColour=&H40000000,BorderStyle=1,Outline=0.8,Shadow=0.5,MarginV=30,MarginL=40,MarginR=40,LineSpacing=8'"
286
 
287
  cmd2 = [
288
  "ffmpeg", "-y",
 
297
  # 再添加speech字幕(顶部)
298
  subtitle_path = speech_subtitle_file.replace(os.sep, '/')
299
  subtitle_path = subtitle_path.replace(':', '\\:')
300
+ speech_filter = f"subtitles='{subtitle_path}':force_style='Fontname=Noto Sans CJK SC,Alignment=8,FontSize=15,PrimaryColour=&H00FFFFFF,OutlineColour=&H80000000,BackColour=&H40000000,BorderStyle=1,Outline=0.8,Shadow=0.5,MarginV=30,MarginL=40,MarginR=40,LineSpacing=8'"
301
 
302
  cmd3 = [
303
  "ffmpeg", "-y",