Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Audio Glitches from concatenate_audioclips #77

Closed
Vaughn1234 opened this issue Feb 8, 2024 · 5 comments
Closed

[BUG] Audio Glitches from concatenate_audioclips #77

Vaughn1234 opened this issue Feb 8, 2024 · 5 comments
Assignees

Comments

@Vaughn1234
Copy link

I am getting weird audio fragments inbetween the audio clips. Searching online lead me here Zulko/moviepy#1936 (comment) but the suggested solution doesn't fix it either. I've also attempted adding audio fade-in and -out to the audio clips which seems to alleviate the issue a bit but still no full fix

@FujiwaraChoki
Copy link
Owner

FujiwaraChoki commented Feb 8, 2024

Could you share the video, and what you changed in the code specifically?

@Vaughn1234
Copy link
Author

Here is an example video: https://cdn.discordapp.com/attachments/1070765422275731476/1205155443102453760/output.mp4?ex=65d75778&is=65c4e278&hm=03567f6f3ff24690b997d39ec2d9eb7406c0ef47bf10bdc5066b007a20011f11&

You can hear the artifacts at 0:07 and at the very end after the final word. What I mainly changed are to use videos from a local folder instead of searching for stock videos and adjusting the aspect ratio of those videos. I am also using the openAI library instead of g4f.

@nayan924
Copy link

nayan924 commented Feb 8, 2024

concatenate clips and then set audio later

@Vaughn1234
Copy link
Author

concatenate clips and then set audio later

This is already what is happening and I didn't change it. The video clips are being concatenated, then the audio clips are being concatenated and then they are combined. The audio artifacts do not exist in the individual audio clips, they are only introduced in the concatenated audio file

@Cyberghost999
Copy link

Use this after importing your audio clip audio_clip = audio_clip.subclip(0, audio_clip.duration - 0.05) . This fixed the problem for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants