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

Audio Issue while concatenate_videoclips'ing ImageClip and VideoFileClip (contains audio already) #1064

Closed
shin-illua opened this issue Jan 23, 2020 · 1 comment

Comments

@shin-illua
Copy link

shin-illua commented Jan 23, 2020

Expected Behavior

I have a code which looks something like this:

clips = [] 
iclip1 = ImageClip(...)
iclip2 = ImageClip(...)

aclip1 = AudioFileClip(...)
aclip2 = AudioFileClip(...)

iclip1.audio = aclip1
iclip2.audio = aclip2
iclip1.duration = aclip1.duration 
iclip2.duration = aclip2.duration 

vclip = VideoFileClip(...)

clips.append(iclip1)
clips.append(vclip)
clips.append(iclip1)
final_clip = concatenate_videoclips(clips)
final_clip.write_videofile("out.mp4", fps=30)

Actual Behavior

out.mp4 is outputted like this:

[iclip1---][vclip-][iclip2---]   <- Video Timeline
[iclip1---][vclip---][iclip2---]  <- Audio Timeline

What I'm trying to illustrate is that, the video duration of the vclip is shrinked/cutted, while the sudio is still the same, this puts the remaining audio after the audio of this clip in not the right place, meaning the rest of the audio after the vclip's audio is delayed.

Steps to Reproduce the Problem

Code above.

Specifications

  • Python Version: Python 3.7.3
  • Moviepy Version: 1.0.1
  • Platform Name: Windows
  • Platform Version: 10
@shin-illua shin-illua changed the title Audio Issue while concatenate_videoclips'ing ImageClip.set_audio() and VideoFileClip (contains audio already) Audio Issue while concatenate_videoclips'ing ImageClip and VideoFileClip (contains audio already) Jan 23, 2020
@shin-illua
Copy link
Author

I found the issue in my code, my bad.

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

1 participant