Why does audio get offtrack when i merge back audio and video in moviepy?

16 Views Asked by At

I split audio and video to denoise the audio using Audacity. then when i merge back audio and video using a conventional video editor (OpenShot), the resulting video and its audio are fine. but if i use moviepy code below to merge:

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")

the output audio in the video goes a little offtrack after around 1 hour. why does moviepy do that? is there a solution for it?

0

There are 0 best solutions below