Differentiate between error and standard terminal log with ffmpeg - nodejs

前端 未结 2 2083
一生所求
一生所求 2021-02-13 17:58

I\'m using ffmpeg in node js. Both the standard terminal output and the error seems to be sent to stdout, so I don\'t know how to differentiate between error and su

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-13 18:47

    Ffmpeg outputs all of its logging data to stderr, to leave stdout free for piping the output data to some other program or another ffmpeg instance.

    When running ffmpeg as an automatic process it's often useful give the option

    -loglevel error
    

    which turns it completely mute in a normal scenario and only outputs the error data (to stderr), which is normally what you would expect from a command-line program.

提交回复
热议问题