|
@@ -107,16 +107,19 @@ class getVideo:
|
|
pw_list, zm_list = Material.get_pwsrt_data(feishu_id, pw_sheet) # 获取srt
|
|
pw_list, zm_list = Material.get_pwsrt_data(feishu_id, pw_sheet) # 获取srt
|
|
pws = random.choice(pw_list) # 随机选择 片尾srt+音频
|
|
pws = random.choice(pw_list) # 随机选择 片尾srt+音频
|
|
zm = random.choice(zm_list) # 随机选择 视频中字幕
|
|
zm = random.choice(zm_list) # 随机选择 视频中字幕
|
|
- if video_share and video_share != 'None':
|
|
|
|
- new_video_path = FFmpeg.single_video(new_video_path, video_share, video_path_url, zm)
|
|
|
|
if video_ending and video_ending != 'None':
|
|
if video_ending and video_ending != 'None':
|
|
pw_id = pws["pw_id"]
|
|
pw_id = pws["pw_id"]
|
|
pw_srt = pws["pw_srt"]
|
|
pw_srt = pws["pw_srt"]
|
|
pw_url = PQ.get_audio_url(task_mark, pw_id, title, mark)
|
|
pw_url = PQ.get_audio_url(task_mark, pw_id, title, mark)
|
|
jpg_path = FFmpeg.video_png(new_video_path, video_path_url) # 生成视频最后一帧jpg
|
|
jpg_path = FFmpeg.video_png(new_video_path, video_path_url) # 生成视频最后一帧jpg
|
|
|
|
+ time.sleep(1)
|
|
pw_path = FFmpeg.pw_video(jpg_path, video_path_url, pw_url[0]["video_url"], pw_srt) # 生成片尾视频
|
|
pw_path = FFmpeg.pw_video(jpg_path, video_path_url, pw_url[0]["video_url"], pw_srt) # 生成片尾视频
|
|
|
|
+ time.sleep(1)
|
|
|
|
+
|
|
video_list = [new_video_path, pw_path]
|
|
video_list = [new_video_path, pw_path]
|
|
video_path = FFmpeg.concatenate_videos(video_list, video_path_url) # 视频与片尾拼接到一起
|
|
video_path = FFmpeg.concatenate_videos(video_list, video_path_url) # 视频与片尾拼接到一起
|
|
|
|
+ time.sleep(1)
|
|
|
|
+
|
|
if video_share and video_share != 'None':
|
|
if video_share and video_share != 'None':
|
|
new_video_path = FFmpeg.single_video(video_path, video_share, video_path_url, zm)
|
|
new_video_path = FFmpeg.single_video(video_path, video_share, video_path_url, zm)
|
|
else:
|
|
else:
|
|
@@ -124,6 +127,7 @@ class getVideo:
|
|
else:
|
|
else:
|
|
if video_share and video_share != 'None':
|
|
if video_share and video_share != 'None':
|
|
new_video_path = FFmpeg.single_video(new_video_path, video_share, video_path_url, zm)
|
|
new_video_path = FFmpeg.single_video(new_video_path, video_share, video_path_url, zm)
|
|
|
|
+ time.sleep(1)
|
|
oss_id = cls.random_id()
|
|
oss_id = cls.random_id()
|
|
oss_object_key = Oss.stitching_sync_upload_oss(new_video_path, oss_id) # 视频发送OSS
|
|
oss_object_key = Oss.stitching_sync_upload_oss(new_video_path, oss_id) # 视频发送OSS
|
|
status = oss_object_key.get("status")
|
|
status = oss_object_key.get("status")
|