|
@@ -21,7 +21,7 @@ from moviepy import editor
|
|
|
|
|
|
|
|
|
|
|
|
-output_path = "./video_stitchingvideo/new_video.mp4"
|
|
|
+output_path = "./video_stitchingvideo/video/new_video.mp4"
|
|
|
class VideoStitching():
|
|
|
@classmethod
|
|
|
def split_text(cls, text, max_length):
|
|
@@ -124,6 +124,12 @@ class VideoStitching():
|
|
|
total_duration = 0
|
|
|
included_videos = []
|
|
|
# 提取视频的音频
|
|
|
+ filename = "./video_stitching/video.mp4"
|
|
|
+
|
|
|
+ response = requests.get(audio)
|
|
|
+ with open(filename, "wb") as f:
|
|
|
+ f.write(response.content)
|
|
|
+ time.sleep(10)
|
|
|
Common.logger().info(f"开始提取视频的音频{audio}")
|
|
|
video1 = VideoFileClip(audio)
|
|
|
mp3 = video1.audio
|