|
@@ -114,7 +114,8 @@ class FFmpeg():
|
|
|
'-map', 'a',
|
|
|
pw_mp3_path
|
|
|
]
|
|
|
- subprocess.run(command, check=True)
|
|
|
+ subprocess.run(command)
|
|
|
+ time.sleep(1)
|
|
|
return pw_mp3_path
|
|
|
|
|
|
"""
|
|
@@ -142,6 +143,7 @@ class FFmpeg():
|
|
|
pw_duration = cls.get_video_duration(pw_url)
|
|
|
# 获取音频
|
|
|
pw_mp3_path = cls.get_video_mp3(pw_url, video_path_url, pw_random_id)
|
|
|
+ time.sleep(2)
|
|
|
# 添加字幕 wqy-zenhei Hiragino Sans GB
|
|
|
subtitle_cmd = f"subtitles={pw_srt_path}:force_style='Fontsize=14,Fontname=wqy-zenhei,Outline=0,PrimaryColour=&H000000,SecondaryColour=&H000000,Bold=1,MarginV=155'"
|
|
|
background_cmd = "drawbox=y=366/2:color=yellow@1.0:width=iw:height=50:t=fill"
|