Open f1748x opened 10 months ago
info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm@6.14.11
3 info using node@v14.16.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle ffcreate@0.1.0~prestart: ffcreate@0.1.0
6 info lifecycle ffcreate@0.1.0~start: ffcreate@0.1.0
7 verbose lifecycle ffcreate@0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle ffcreate@0.1.0~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/thomas/web/node/ffcreate/node_modules/.bin:/Users/thomas/ffmpeg:/Users/thomas/.docker/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Users/thomas/ffmpeg:/Users/thomas/.docker/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/thomas/go_item/bin:GOROOT/bin:/Users/thomas/go_item/bin:GOROOT/bin
9 verbose lifecycle ffcreate@0.1.0~start: CWD: /Users/thomas/web/node/ffcreate
10 silly lifecycle ffcreate@0.1.0~start: Args: [ '-c', 'node bin/www' ]
11 silly lifecycle ffcreate@0.1.0~start: Returned: code: 1 signal: null
12 info lifecycle ffcreate@0.1.0~start: Failed to exec start script
13 verbose stack Error: ffcreate@0.1.0 start: node bin/www
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.node bin/www
22 error Exit status 1
23 error Failed at the ffcreate@0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
感谢回复🙏
我的代码 go``` FFCreatorCenter.createTemplate(template_id, ({ text, num }) => { console.log("开始合成视频--------------------") // console.log(text) const font1 = path.join(dirname, './source/font/font1.ttf'); const audio = path.join(dirname, './bar.m4a'); console.log(num) const creator = new FFCreator({ cacheDir: path.join(dirname, "./cache"), // outputDir: path.join(dirname, "../output/voice_user"), outputDir: path.join(__dirname, "./output"), // output:"thomas.mp4", width: width, height: height, log: false, fps: 30, // fps threads: 4, // 多线程(伪造)并行渲染
});
const scene1 = new FFScene();
const video = new FFVideo({
path: path.join(__dirname,"./source/video/2.mp4"),
audio: false,
x: width/2,
y: height/2,
width: width,
height: height
});
console.log("视频高度------1----------")
scene1.addChild(video);
scene1.addAudio({path:audio});
let subtitle = new FFSubtitle({
comma: true, // 是否逗号分割
backgroundColor: '#00219C',
color: '#fff',
fontSize: 24,
x: width / 2,
y: height / 2 + 300,
// 1. srt方式
// path:,
});
subtitle.setText(text);
subtitle.setFont(font1);
subtitle.setSpeech(audio);
subtitle.frameBuffer = 24;
scene1.setDuration(20);
scene1.addChild(subtitle);
creator.addChild(scene1);
creator.start();
creator.openLog();
creator.on("error", (e) => {
console.log(`err-----------:: \n ${e.error}`);
});
creator.on("progress", (e) => {
console.log(
colors.yellow(`合成进度: ${(e.percent * 100) >> 0}%`)
);
});
creator.on("complete", (e) => {
console.log(
colors.yellow(`合成完成:\n ${e.output}`)
);
});
return creator;
})
我也遇到了 怎么解决
mark
spawn ffprobe ENOENT [FF] Creator production error. FFEvent { type: 'error', pos: 'preProcessing', error: 'spawn ffprobe ENOENT' } events.js:292 throw er; // Unhandled 'error' event ^
Error: ffmpeg was killed with signal SIGKILL at ChildProcess. (/Users/thomas/web/node/ffcreate/node_modules/fluent-ffmpeg/lib/processor.js:180:22)
at ChildProcess.emit (events.js:315:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
Emitted 'error' event on FfmpegCommand instance at:
at emitEnd (/Users/thomas/web/node/ffcreate/node_modules/fluent-ffmpeg/lib/processor.js:424:16)
at endCB (/Users/thomas/web/node/ffcreate/node_modules/fluent-ffmpeg/lib/processor.js:544:13)
at handleExit (/Users/thomas/web/node/ffcreate/node_modules/fluent-ffmpeg/lib/processor.js:170:11)
at Socket. (/Users/thomas/web/node/ffcreate/node_modules/fluent-ffmpeg/lib/processor.js:197:11)
at Socket.emit (events.js:327:22)
at Pipe. (net.js:673:12)
[nodemon] app crashed - waiting for file changes before starting..