Update app.py
Browse files
app.py
CHANGED
@@ -156,6 +156,8 @@ def blend_vsfx(video_in, audio_result):
|
|
156 |
print(f"AUD: {audioClip.duration}")
|
157 |
clip = VideoFileClip(video_in)
|
158 |
print(f"VID: {clip.duration}")
|
|
|
|
|
159 |
final_clip = clip.set_audio(audioClip)
|
160 |
# Set the output codec
|
161 |
codec = 'libx264'
|
|
|
156 |
print(f"AUD: {audioClip.duration}")
|
157 |
clip = VideoFileClip(video_in)
|
158 |
print(f"VID: {clip.duration}")
|
159 |
+
if clip.duration < audioClip.duration :
|
160 |
+
clip = clip.subclip((0.0), (audioClip.duration))
|
161 |
final_clip = clip.set_audio(audioClip)
|
162 |
# Set the output codec
|
163 |
codec = 'libx264'
|