python - 无法将大小数组重塑为形状 MoviePy 边距
问题描述
我正在尝试在 MoviePy 中为我的视频添加边距 - 但每当我尝试这样做时 - 就会出现错误:
ValueError: cannot reshape array of size 1045200 into shape (780,1340,3)
我不知道这是什么原因造成的?
这是我添加边距的代码:
def addMargin(self, vid, type, size, color):
if type == "border":
clip_with_margin = vid.margin(size, color=color)
else:
clip_with_margin = vid.margin(top=size, bottom=size, color=color)
return clip_with_margin
解决方案
推荐阅读
- php - 显示网站中的 Apacheserver 配置错误?
- python-3.x - 用于遗传算法的 TensorFlow (2.x) 模型
- java - NodeUtil 解包方法
- excel - VBA - 识别格式并将其用作条件
- c++ - 当函数只有一个迭代器时处理异常和清理的正确方法
- windows - 在 Windows 服务器上无法访问 Tomcat 端口 8080
- php - Unirest 请求返回带有有效 URL 的 404 错误
- selenium - 自动识别 Selenium 测试的真假失败
- hibernate - JPA/Hibernate 事务问题
- android - Firebase onDataChange 避免 if 语句