doc/filters/drawtext: clarify meaning of strftime format string
Also clarify what should be used instead of the strftime expansion mode.
This commit is contained in:
@@ -12103,13 +12103,12 @@ The default value of @var{bordercolor} is "black".
|
|||||||
|
|
||||||
@item expansion
|
@item expansion
|
||||||
Select how the @var{text} is expanded. Can be either @code{none},
|
Select how the @var{text} is expanded. Can be either @code{none},
|
||||||
@code{strftime} (deprecated) or
|
@code{strftime} (deprecated) or @code{normal} (default). See the
|
||||||
@code{normal} (default). See the @ref{drawtext_expansion, Text expansion} section
|
@ref{drawtext_expansion, Text expansion} section below for details.
|
||||||
below for details.
|
|
||||||
|
|
||||||
@item basetime
|
@item basetime
|
||||||
Set a start time for the count. Value is in microseconds. Only applied
|
Set a start time for the count. Value is in microseconds. Only applied
|
||||||
in the deprecated strftime expansion mode. To emulate in normal expansion
|
in the deprecated @code{strftime} expansion mode. To emulate in normal expansion
|
||||||
mode use the @code{pts} function, supplying the start time (in seconds)
|
mode use the @code{pts} function, supplying the start time (in seconds)
|
||||||
as the second argument.
|
as the second argument.
|
||||||
|
|
||||||
@@ -12340,10 +12339,12 @@ The current packet's size (in bytes).
|
|||||||
@anchor{drawtext_expansion}
|
@anchor{drawtext_expansion}
|
||||||
@subsection Text expansion
|
@subsection Text expansion
|
||||||
|
|
||||||
If @option{expansion} is set to @code{strftime},
|
If @option{expansion} is set to @code{strftime}, the filter recognizes
|
||||||
the filter recognizes strftime() sequences in the provided text and
|
sequences accepted by the @code{strftime} C function in the provided
|
||||||
expands them accordingly. Check the documentation of strftime(). This
|
text and expands them accordingly. Check the documentation of
|
||||||
feature is deprecated.
|
@code{strftime}. This feature is deprecated in favor of @code{normal}
|
||||||
|
expansion with the @code{gmtime} or @code{localtime} expansion
|
||||||
|
functions.
|
||||||
|
|
||||||
If @option{expansion} is set to @code{none}, the text is printed verbatim.
|
If @option{expansion} is set to @code{none}, the text is printed verbatim.
|
||||||
|
|
||||||
@@ -12390,13 +12391,13 @@ It can be used to add padding with zeros from the left.
|
|||||||
|
|
||||||
@item gmtime
|
@item gmtime
|
||||||
The time at which the filter is running, expressed in UTC.
|
The time at which the filter is running, expressed in UTC.
|
||||||
It can accept an argument: a strftime() format string.
|
It can accept an argument: a @code{strftime} C function format string.
|
||||||
The format string is extended to support the variable @var{%[1-6]N}
|
The format string is extended to support the variable @var{%[1-6]N}
|
||||||
which prints fractions of the second with optionally specified number of digits.
|
which prints fractions of the second with optionally specified number of digits.
|
||||||
|
|
||||||
@item localtime
|
@item localtime
|
||||||
The time at which the filter is running, expressed in the local time zone.
|
The time at which the filter is running, expressed in the local time zone.
|
||||||
It can accept an argument: a strftime() format string.
|
It can accept an argument: a @code{strftime} C function format string.
|
||||||
The format string is extended to support the variable @var{%[1-6]N}
|
The format string is extended to support the variable @var{%[1-6]N}
|
||||||
which prints fractions of the second with optionally specified number of digits.
|
which prints fractions of the second with optionally specified number of digits.
|
||||||
|
|
||||||
@@ -12438,8 +12439,8 @@ If the format is set to @code{hms}, a third argument @code{24HH} may be
|
|||||||
supplied to present the hour part of the formatted timestamp in 24h format
|
supplied to present the hour part of the formatted timestamp in 24h format
|
||||||
(00-23).
|
(00-23).
|
||||||
|
|
||||||
If the format is set to @code{localtime} or @code{gmtime},
|
If the format is set to @code{localtime} or @code{gmtime}, a third
|
||||||
a third argument may be supplied: a strftime() format string.
|
argument may be supplied: a @code{strftime} C function format string.
|
||||||
By default, @var{YYYY-MM-DD HH:MM:SS} format will be used.
|
By default, @var{YYYY-MM-DD HH:MM:SS} format will be used.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@@ -12543,7 +12544,8 @@ drawtext="text='Test Text': fontsize=h/30: x=(w-text_w)/2: y=(h-text_h*2)"
|
|||||||
@end example
|
@end example
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Print the date of a real-time encoding (see strftime(3)):
|
Print the date of a real-time encoding (see documentation for the
|
||||||
|
@code{strftime} C function):
|
||||||
@example
|
@example
|
||||||
drawtext='fontfile=FreeSans.ttf:text=%@{localtime\:%a %b %d %Y@}'
|
drawtext='fontfile=FreeSans.ttf:text=%@{localtime\:%a %b %d %Y@}'
|
||||||
@end example
|
@end example
|
||||||
|
Reference in New Issue
Block a user