fffiloni commited on
Commit
987752b
1 Parent(s): 744331b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
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'