From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id E953943C5D for ; Mon, 27 Mar 2023 04:36:34 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8FFE468C635; Mon, 27 Mar 2023 07:36:26 +0300 (EEST) Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [80.241.56.161]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A297068C5C6 for ; Mon, 27 Mar 2023 07:36:19 +0300 (EEST) Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4PlKl514r7z9sV8 for ; Mon, 27 Mar 2023 06:36:17 +0200 (CEST) Message-ID: <3cfcc99f-82e0-b055-4ecd-69e496df9ca0@gyani.pro> Date: Mon, 27 Mar 2023 10:06:07 +0530 MIME-Version: 1.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20230326173401.56228-1-stefasab@gmail.com> From: Gyan Doshi In-Reply-To: <20230326173401.56228-1-stefasab@gmail.com> X-Rspamd-Queue-Id: 4PlKl514r7z9sV8 Subject: Re: [FFmpeg-devel] [PATCH 1/3] doc/filters/drawtext: clarify meaning of strftime format string X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 2023-03-26 11:03 pm, Stefano Sabatini wrote: > Also clarify what should be used instead of the strftime expansion mode. LGTM. Regards, Gyan > --- > doc/filters.texi | 28 +++++++++++++++------------- > 1 file changed, 15 insertions(+), 13 deletions(-) > > diff --git a/doc/filters.texi b/doc/filters.texi > index 4449998ba4..b397100ff8 100644 > --- a/doc/filters.texi > +++ b/doc/filters.texi > @@ -12103,13 +12103,12 @@ The default value of @var{bordercolor} is "black". > > @item expansion > Select how the @var{text} is expanded. Can be either @code{none}, > -@code{strftime} (deprecated) or > -@code{normal} (default). See the @ref{drawtext_expansion, Text expansion} section > -below for details. > +@code{strftime} (deprecated) or @code{normal} (default). See the > +@ref{drawtext_expansion, Text expansion} section below for details. > > @item basetime > 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) > as the second argument. > > @@ -12340,10 +12339,12 @@ The current packet's size (in bytes). > @anchor{drawtext_expansion} > @subsection Text expansion > > -If @option{expansion} is set to @code{strftime}, > -the filter recognizes strftime() sequences in the provided text and > -expands them accordingly. Check the documentation of strftime(). This > -feature is deprecated. > +If @option{expansion} is set to @code{strftime}, the filter recognizes > +sequences accepted by the @code{strftime} C function in the provided > +text and expands them accordingly. Check the documentation of > +@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. > > @@ -12390,13 +12391,13 @@ It can be used to add padding with zeros from the left. > > @item gmtime > 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} > which prints fractions of the second with optionally specified number of digits. > > @item localtime > 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} > 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 > (00-23). > > -If the format is set to @code{localtime} or @code{gmtime}, > -a third argument may be supplied: a strftime() format string. > +If the format is set to @code{localtime} or @code{gmtime}, a third > +argument may be supplied: a @code{strftime} C function format string. > By default, @var{YYYY-MM-DD HH:MM:SS} format will be used. > @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 > > @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 > drawtext='fontfile=FreeSans.ttf:text=%@{localtime\:%a %b %d %Y@}' > @end example _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".