简体   繁体   中英

Moviepy Making a CompositeVideoClip of two concatenate_videoclips

Working with the Moviepy lib and I've been beating my head off a wall with this last step for a while.

GifClips = concatenate_videoclips(TheGIFs, method='compose')
TextClips = concatenate_videoclips(TheTexts, method='compose')

I've written both of these to separate files and they look fine. But I'm having a problem getting them to combine properly.

I'm trying:

FinishedClips = CompositeVideoClip([GifClips, TextClips], size=(1920,1080))

It has the audio from TextClips and shows the GifClips but the text isn't visible. It did show when written alone without the composite.

It does work if I combine GifClips with a single TextClip but this doesn't work when I need text clips to run one after another.

I could run a CompositeVideoClip with every single TextClip and a part of the GifClips and then concatenate them all together but that doesn't seem like the neatest way of doing this. My guess is there's a fairly obvious argument here somewhere but looking through the docs and examples I'm struggling so far.

Any suggestions on how I could get the TextClips clip to show up properly in a composite would be much appreciated.

Alright looks like I found the answer. Remove the method argument when concatenating the TextClips and set the position again once the concatenate is done.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM