Node-fluent-ffmpeg: How to view the ffmpeg command line generated by fluent ffmpeg?

Created on 29 May 2017  路  8Comments  路  Source: fluent-ffmpeg/node-fluent-ffmpeg

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.

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

All 8 comments

+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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

geraldoramos picture geraldoramos  路  3Comments

LauraWebdev picture LauraWebdev  路  3Comments

danielbanfield picture danielbanfield  路  5Comments

Rubinhuang9239 picture Rubinhuang9239  路  3Comments

odigity picture odigity  路  4Comments