tnfe / FFCreator

A fast video processing library based on node.js (一个基于node.js的高速视频制作库)
http://tnfe.github.io/FFCreator/
MIT License
2.82k stars 399 forks source link

为什么很多特效都设置无效 #373

Open HandsomeTea opened 1 year ago

HandsomeTea commented 1 year ago

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

HandsomeTea commented 1 year ago

我是Macos系统,nodejs 18.16.0

drawcall commented 1 year ago

https://tnfe.github.io/FFCreator/#/guide/animate

请检查自己的代码,是不是使用错误