gpt4 book ai didi

ffmpeg - 如何仅将错误消息保存在日志文件中?

转载 作者:行者123 更新时间:2023-12-04 23:19:40 26 4
gpt4 key购买 nike

ffmpeg ... -loglevel +error FFREPORT=file=test.logffmpeg ... -FFREPORT=file=test.log:level=verboseffmpeg ... FFREPORT=file=test.log:level=error这些都不起作用。
这有效:ffmpeg ... -loglevel +error -report =file=test.log但它确实将所有内容保存在日志文件中,不仅是错误消息,而且创建的日志文件包含不同的名称。

最佳答案

FFREPORT必须定义为环境变量才能与 FFmpeg 一起使用。
或者您可以使用 -report选项。
第一种方法在 unix 世界中可能如下所示:

FFREPORT=<report-opts> ffmpeg -i input output
第二个:
ffmpeg -report <report-opts> -i input output
<report-opts>在您的情况下,应该是: file=test.log:level=16请注意 level report 中的选项应该有数值。根据 FFmpeg documentation 的可能值:
`quiet, -8’
Show nothing at all; be silent.

‘panic, 0’
Only show fatal errors which could lead the process to crash, such as an assertion failure. This is not currently used for anything.

‘fatal, 8’
Only show fatal errors. These are errors after which the process absolutely cannot continue.

‘error, 16’
Show all errors, including ones which can be recovered from.

‘warning, 24’
Show all warnings and errors. Any message related to possibly incorrect or unexpected events will be shown.

‘info, 32’
Show informative messages during processing. This is in addition to warnings and errors. This is the default value.

‘verbose, 40’
Same as info, except more verbose.

‘debug, 48’
Show everything, including debugging information.

‘trace, 56’

关于ffmpeg - 如何仅将错误消息保存在日志文件中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69200995/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com