FFCreator
FFCreator copied to clipboard
我在使用 FFCreator 时候 编写了一段测试代码 但它跑不起来 Input format rawvideo is not available 报了这个错误
报错信息
[FF] Synthesis stdout:undefined stderr:undefinedInput format rawvideo is not available
代码
const { FFScene, FFText, FFVideo, FFAlbum, FFCreator,FFImage } = require("ffcreator"); const path = require("path");
const creator = new FFCreator({ cacheDir: "./cache/", // 设置缓存目录 outputDir: "./output/", // 设置输出目录 width: 1920, height: 1080, debug: true, log: true, });
const scene = new FFScene(); scene.setBgColor("#ffcc00"); scene.setDuration(6); creator.addChild(scene);
const image = new FFImage({path: path.join(__dirname, "./car.png")}) image.addEffect("moveInUp", 1, 1); image.addEffect("fadeOutDown", 1, 4); scene.addChild(image);
const text = new FFText({ text: "Hello, FFCreator!", x: 960, y: 540 }); text.setColor("#ffffff"); scene.addChild(text);
creator.start();
creator.closeLog();
creator.on('complete', (e) => {
console.log(FFCreator video has been created: ${e.output}
);
});
这是否是因为我的ffmpeg的问题?我从 https://ffmpeg.org/download.html 下载的最新版本的
我之前下新版本也是不行,之后改用4.3.6版本的ffmpeg就可以了
我之前下新版本也是不行,之后改用4.3.6版本的ffmpeg就可以了
好的 我找个时间试试
最新的版本不行吗?ffmpeg 直接命令行执行生成视频没问题,使用ffcreator 就提示Input format rawvideo is not available
最新的版本不行吗?ffmpeg 直接命令行执行生成视频没问题,使用ffcreator 就提示输入格式 rawvideo 不可用
对的 最新版本不太行 我用旧版本就可以了
目前 [email protected] 会报错。测试了 ffmpeg@6 可以通过测试。