简体   繁体   English

Moviepy制作了两个concatenate_videoclips的CompositeVideoClip

[英]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. 使用Moviepy lib,最后一段时间我一直不停地跳墙。

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. 它具有TextClips的音频并显示GifClips,但文本不可见。 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. 如果我将GifClips与单个TextClip结合使用,它确实可以工作,但是当我需要文本剪辑一个接一个地运行时,这将不起作用。

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. 我可以对每个TextClip和GifClips的一部分运行CompositeVideoClip,然后将它们全部连接在一起,但这似乎并不是最巧妙的方法。 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. 我对如何使TextClips剪辑正确显示在合成中的任何建议将不胜感激。

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. 串联TextClip时删除方法参数,并在串联完成后再次设置位置。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将Python列表传递给Moviepy模块中的concatenate_videoclips函数 - Pass Python list to concatenate_videoclips function in Moviepy module 带有 concatenate_videoclips 数组的 Moviepy write_videofile 导致 AttributeError - Moviepy write_videofile with Array in concatenate_videoclips results in AttributeError Moviepy concatenate_videoclips(method='compose') AttributeError: 'NoneType' 对象没有属性 'stdout' - Moviepy concatenate_videoclips(method='compose') AttributeError: 'NoneType' object has no attribute 'stdout' Python concatenate_videoclips,奇怪的音频和视频故障 - Python concatenate_videoclips, strange audio and video glitches Moviepy-TextClip的CompositeVideoClip错误 - Moviepy - CompositeVideoClip error with TextClip 使用moviepy在半圆路径上显示gif VideoClips - Displaying gif VideoClips on a half circle path with moviepy CompositeVideoClip = TypeError 上的 Moviepy 返回错误:'float' object 不能解释为 integer - Moviepy return error on CompositeVideoClip = TypeError: 'float' object cannot be interpreted as an integer 如何在moviepy中连接视频? - How to concatenate videos in moviepy? 尝试使用 moviepy 编写 CompositeVideoClip 时,如何修复“AttributeError:‘NoneType’对象没有属性‘stdout’”? - How do I fix "AttributeError: 'NoneType' object has no attribute 'stdout'" when trying to write a CompositeVideoClip with moviepy? 用moviepy合成两个配乐 - Compositing two soundtracks with moviepy
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM