Rehman1603 commited on
Commit
ffb16dc
1 Parent(s): 243c47f

Create Video_dube.py

Browse files
Files changed (1) hide show
  1. Video_dube.py +10 -0
Video_dube.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ from moviepy.editor import *
2
+
3
+ def Video_dub(video_path,audio_path):
4
+ output_filename = "video_with_new_audio.mp4"
5
+ video_clip = VideoFileClip(video_path)
6
+ audio_clip = AudioFileClip(audio_path)
7
+ video_clip = video_clip.set_audio(None)
8
+ video_clip = video_clip.set_audio(audio_clip)
9
+ video_clip.write_videofile(output_filename)
10
+ return output_filename