请参阅 https://ffmpeg.org/ffmpeg.html#Main-options -stdin - 启用标准输入上的交互。 默认情况下,如果检测到管道,则启用此功能。 -nostdin - 显式禁用控制台交互。 如果没有使用 -y,这将导致 ffmpeg 在目标文件存在时出错。 -y - 覆盖输出文件
-nostdin
选项。 - ubershmekelffmpeg ... > output.log 2>&1
(如果你想让错误信息也记录在日志文件中,就需要加上2>&1
)。 - Alexis Wilke