Hi,
How do I get the generated command that's being executed by fluent ffmpeg?
Is there a function that would return this string?
Thanks.
+1
I'd like to know what the error message of ffmpeg is (instead of process exited with status 1) and having the command line would help.
Guys, please read the docs first...
start event with command line : https://github.com/fluent-ffmpeg/node-fluent-ffmpeg#start-ffmpeg-process-started
ffmpeg console output : https://github.com/fluent-ffmpeg/node-fluent-ffmpeg#stderr-ffmpeg-output
@njoyard Is there a way to get the command line without spawning an ffmpeg process? I'm wondering if this tool can be used just to create the command string.
how to print?
.on('start', (cmdline) => console.log(cmdline))
https://github.com/fluent-ffmpeg/node-fluent-ffmpeg#start-ffmpeg-process-started
createCommand(conf = {}) {
const {threads = 1} = conf;
const command = ffmpeg();
if (threads > 1) command.addOptions([`-threads ${threads}`]);
console.log("###:"+command)
return command;
},
this.command = FFmpegUtil.createCommand();
this.command.on('start', (cmdline) => {
console.log(cmdline)
})
@letoribo Not work. How to print it?
const command = ffmpeg();
command.on('start', (cmdline) => {
console.log(cmdline)
})
@letoribo Not work. How to print it?
It does work. Thanks!
Most helpful comment
Guys, please read the docs first...
start event with command line : https://github.com/fluent-ffmpeg/node-fluent-ffmpeg#start-ffmpeg-process-started
ffmpeg console output : https://github.com/fluent-ffmpeg/node-fluent-ffmpeg#stderr-ffmpeg-output