import moviepy.editor as mp
#Input audio file
audio = mp.AudioFileClip('a.mp3')
#Input video file
video = mp.VideoFileClip('a.mp4')
#adding external audio to video
final_video = video.set_audio(audio)
#Extracting final output video
final_video.write_videofile("a Denoised.mp4")
Expected Behavior
When I denoise an audio file and merge it back into the video, then the audio and video should be perfectly in sync.
Actual Behavior
When I merge back audio and video after denoising audio from the video file, then after around 1 hour of video, the audio and video go out of sync i.e. offtrack.
Steps to Reproduce the Problem
Split audio and video from a video file into separate parts (the video must be longer than an hour).
Then merge back audio and video using the above provided code.
In the output video file, the video and audio will go out of sync after around 1 hour.
Expected Behavior
When I denoise an audio file and merge it back into the video, then the audio and video should be perfectly in sync.
Actual Behavior
When I merge back audio and video after denoising audio from the video file, then after around 1 hour of video, the audio and video go out of sync i.e. offtrack.
Steps to Reproduce the Problem
Specifications