Spaces:
Runtime error
Runtime error
from moviepy.editor import * | |
def Video_dub(video_path,audio_path): | |
output_filename = "video_with_new_audio.mp4" | |
video_clip = VideoFileClip(video_path) | |
audio_clip = AudioFileClip(audio_path) | |
video_clip = video_clip.set_audio(None) | |
video_clip = video_clip.set_audio(audio_clip) | |
video_clip.write_videofile(output_filename) | |
return output_filename |