Open ncugit-sec opened 3 months ago
It is due to incorrect reporting of audio length by ffmpeg. This causes moviepy to read frame outside of the audio which results in artifact being added towards the end of the audio. I fixed this issue by taking subclip of the audio file by audio_clip = audio_clip.subclip(0, audio_clip.duration - 0.05)
or you can define the audio path while writing the final clip. You can also refer #1936 for alternate solutions.
The generated audio appears to be padded with the last few points of the source audio, even if no operations are performed on it.
Expected Behavior
CompositeAudioClip
orCompositeVideoClip
should generate output with consistent duration if no operation related to duration editting is made.Actual Behavior
The duration of
CompositeAudioClip
generate a longer duration than input file.Steps to Reproduce the Problem
https://github.com/Zulko/moviepy/assets/53465444/2a590af9-325a-45a3-a1bd-03c49d6ed57b
Generated duration are longer than source audio.
Specifications