MoviePy – Assigning Audio Clip to Video File
# Import everything needed to edit video clips
from moviepy.editor import *
# loading video gfg
clip = VideoFileClip("test.mp4")
# getting only first 5 seconds
clip = clip.subclip(0, 5)
# loading audio file
audioclip = AudioFileClip("output.wav").subclip(3,10)
# adding audio to the video clip
videoclip = clip.set_audio(audioclip)
# showing video clip
videoclip.ipython_display()
Comments
Post a Comment