Sometimes, we need remove all audio or voice from a video file, in this tutorial, we will introduce you how to do in python.
We will use python MoviePy package to implement it.
Here is an example:
from moviepy.editor import VideoFileClip video_file = r"D:\test1.mp4" videoclip = VideoFileClip(video_file) new_clip = videoclip.without_audio() new_clip.write_videofile("without_audio.mp4")
Run this code, we will get a copy of test1.mp4, which is no audio.
As to without_audio(), it will remove the clip’s audio.
def without_audio(self): """Remove the clip's audio. Return a copy of the clip with audio set to None. """ self.audio = None