Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -378,8 +378,11 @@ def process_video(url, type):
|
|
378 |
input_video_name = input_video.replace(".mp4", "")
|
379 |
video = VideoFileClip(input_video)
|
380 |
image_clip = ImageClip(image_path).with_duration(1)
|
|
|
|
|
381 |
first_video = CompositeVideoClip([video.with_start(1), image_clip])
|
382 |
-
input_video = input_video_name+"
|
|
|
383 |
first_video.write_videofile(input_video, codec="libx264", audio_codec="aac", logger=None)
|
384 |
input_audio = extract_audio(input_video)
|
385 |
elif type=="youtube":
|
|
|
378 |
input_video_name = input_video.replace(".mp4", "")
|
379 |
video = VideoFileClip(input_video)
|
380 |
image_clip = ImageClip(image_path).with_duration(1)
|
381 |
+
# Set the position and size of the image (optional)
|
382 |
+
image = image.set_position(("center", "center")).resize(height=video.size[1])
|
383 |
first_video = CompositeVideoClip([video.with_start(1), image_clip])
|
384 |
+
input_video = input_video_name+"_cover.mp4"
|
385 |
+
input_video_name = input_video.replace(".mp4", "")
|
386 |
first_video.write_videofile(input_video, codec="libx264", audio_codec="aac", logger=None)
|
387 |
input_audio = extract_audio(input_video)
|
388 |
elif type=="youtube":
|