diff mbox

[FFmpeg-devel,v3] doc: update loglevel option documentation

Message ID 1523431881-6429-1-git-send-email-t.rapp@noa-archive.com
State Accepted
Commit bc62d20dc415caf949b6452b2707b9eba78cb098
Headers show

Commit Message

Tobias Rapp April 11, 2018, 7:31 a.m. UTC
Updates documentation after the changes to loglevel flag prefix parsing
in 4b736bc921ed96ad6d312ce0cbe0de29b9e3fe81.

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
---
 doc/fftools-common-opts.texi | 37 +++++++++++++++++++++++++++++--------
 1 file changed, 29 insertions(+), 8 deletions(-)

Comments

Lou Logan April 12, 2018, 12:01 a.m. UTC | #1
On Tue, Apr 10, 2018, at 11:11 PM, Tobias Rapp wrote:
>
> BTW: Is there some documentation on the generic flags syntax used in 
> FFmpeg for options like "-fflags" or "-cpuflags" and how to combine the 
> tokens with "+" or "-"? I couldn't find something on a quick scan.

Doesn't appear to be documented, but maybe I missed it.

On Tue, Apr 10, 2018, at 11:31 PM, Tobias Rapp wrote:
> Updates documentation after the changes to loglevel flag prefix parsing
> in 4b736bc921ed96ad6d312ce0cbe0de29b9e3fe81.
> 
> Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
> ---
>  doc/fftools-common-opts.texi | 37 +++++++++++++++++++++++++++++--------
>  1 file changed, 29 insertions(+), 8 deletions(-)

LGTM, thanks.
Tobias Rapp April 12, 2018, 6:48 a.m. UTC | #2
On 12.04.2018 02:01, Lou Logan wrote:
> On Tue, Apr 10, 2018, at 11:11 PM, Tobias Rapp wrote:
>>
>> BTW: Is there some documentation on the generic flags syntax used in
>> FFmpeg for options like "-fflags" or "-cpuflags" and how to combine the
>> tokens with "+" or "-"? I couldn't find something on a quick scan.
> 
> Doesn't appear to be documented, but maybe I missed it.
> 
> On Tue, Apr 10, 2018, at 11:31 PM, Tobias Rapp wrote:
>> Updates documentation after the changes to loglevel flag prefix parsing
>> in 4b736bc921ed96ad6d312ce0cbe0de29b9e3fe81.
>>
>> Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
>> ---
>>   doc/fftools-common-opts.texi | 37 +++++++++++++++++++++++++++++--------
>>   1 file changed, 29 insertions(+), 8 deletions(-)
> 
> LGTM, thanks.

Pushed, thanks for the review.

Regards,
Tobias
diff mbox

Patch

diff --git a/doc/fftools-common-opts.texi b/doc/fftools-common-opts.texi
index 185ec21..7787e11 100644
--- a/doc/fftools-common-opts.texi
+++ b/doc/fftools-common-opts.texi
@@ -168,14 +168,24 @@  The returned list cannot be assumed to be always complete.
 ffmpeg -sinks pulse,server=192.168.0.4
 @end example
 
-@item -loglevel [repeat+]@var{loglevel} | -v [repeat+]@var{loglevel}
-Set the logging level used by the library.
-Adding "repeat+" indicates that repeated log output should not be compressed
-to the first line and the "Last message repeated n times" line will be
-omitted. "repeat" can also be used alone.
-If "repeat" is used alone, and with no prior loglevel set, the default
-loglevel will be used. If multiple loglevel parameters are given, using
-'repeat' will not change the loglevel.
+@item -loglevel [@var{flags}+]@var{loglevel} | -v [@var{flags}+]@var{loglevel}
+Set logging level and flags used by the library.
+
+The optional @var{flags} prefix can consist of the following values:
+@table @samp
+@item repeat
+Indicates that repeated log output should not be compressed to the first line
+and the "Last message repeated n times" line will be omitted.
+@item level
+Indicates that log output should add a @code{[level]} prefix to each message
+line. This can be used as an alternative to log coloring, e.g. when dumping the
+log to file.
+@end table
+Flags can also be used alone by adding a '+'/'-' prefix to set/reset a single
+flag without affecting other @var{flags} or changing @var{loglevel}. When
+setting both @var{flags} and @var{loglevel}, a '+' separator is expected
+between the last @var{flags} value and before @var{loglevel}.
+
 @var{loglevel} is a string or a number containing one of the following values:
 @table @samp
 @item quiet, -8
@@ -201,6 +211,17 @@  Show everything, including debugging information.
 @item trace, 56
 @end table
 
+For example to enable repeated log output, add the @code{level} prefix, and set
+@var{loglevel} to @code{verbose}:
+@example
+ffmpeg -loglevel repeat+level+verbose -i input output
+@end example
+Another example that enables repeated log output without affecting current
+state of @code{level} prefix flag or @var{loglevel}:
+@example
+ffmpeg [...] -loglevel +repeat
+@end example
+
 By default the program logs to stderr. If coloring is supported by the
 terminal, colors are used to mark errors and warnings. Log coloring
 can be disabled setting the environment variable