FFCreator
FFCreator copied to clipboard
为什么很多特效都设置无效
const creator = new FFCreator({
cacheDir: path.join(__dirname, '../../catch'), // 缓存目录
outputDir: path.join(__dirname, '../../video/'), // 输出目录
width, // 影片宽
height, // 影片高
parallel: 8,
fps: 30,
audio: audioPath
});
const scene = new FFScene();
const img = path.join(__dirname, ../../${data.image}
);
const bg = new FFImage({ path: img, x: width / 2, y: height / 2, width, height });
bg.addEffect({ type: data.start.type, time: Number(data.start.time) }); scene.setTransition(data.end.type, Number(data.end.time));
creator.addChild(scene);
这是我图片生成视频的部分代码,分别用addEffect 和 setTransition 设置一些特效,为什么很多特效都没有效果,有些特效就有,没有效果的部分占比还挺多的,不知道是不是我缺了什么依赖,能不能出一些详细的安装教程,或者针对这个问题出一些解决方案或者QA
我是Macos系统,nodejs 18.16.0
https://tnfe.github.io/FFCreator/#/guide/animate
请检查自己的代码,是不是使用错误