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 6E94142201 for ; Sun, 16 Jan 2022 11:06:47 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 128FC68AC7B; Sun, 16 Jan 2022 13:06:45 +0200 (EET) Received: from nef.ens.fr (nef2.ens.fr [129.199.96.40]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 49D93680CB2 for ; Sun, 16 Jan 2022 13:06:39 +0200 (EET) X-ENS-nef-client: 129.199.129.80 ( name = phare.normalesup.org ) Received: from phare.normalesup.org (phare.normalesup.org [129.199.129.80]) by nef.ens.fr (8.14.4/1.01.28121999) with ESMTP id 20GB6cRR002839 for ; Sun, 16 Jan 2022 12:06:38 +0100 Received: by phare.normalesup.org (Postfix, from userid 1001) id 4535BEB5BC; Sun, 16 Jan 2022 12:06:38 +0100 (CET) Date: Sun, 16 Jan 2022 12:06:38 +0100 From: Nicolas George To: FFmpeg development discussions and patches Message-ID: References: <72e9521f-b029-8637-c32c-27cf7c5de170@mail.de> <14470aae-c127-7532-a054-b5d878d415dd@mail.de> <52e4f109-41a4-a609-b583-c001c6077638@mail.de> <350ccc44-07dc-25c6-49a1-4281139d93ac@mail.de> MIME-Version: 1.0 In-Reply-To: <350ccc44-07dc-25c6-49a1-4281139d93ac@mail.de> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef.ens.fr [129.199.96.32]); Sun, 16 Jan 2022 12:06:38 +0100 (CET) Subject: Re: [FFmpeg-devel] [PATCH v2] lavfi/drawtext: Add localtime_ms for millisecond precision 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-Type: multipart/mixed; boundary="===============3103128943983885612==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============3103128943983885612== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="yoDtKQkv1ydScxF7" Content-Disposition: inline --yoDtKQkv1ydScxF7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Thilo Borgman (12022-01-14): > v6 does: >=20 > $> ffmpeg ... drawtext=3D"fontfile=3D...:text=3D'%{localtime \:%a %b %d= %Y %S}'" (seconds) > $> ffmpeg ... drawtext=3D"fontfile=3D...:text=3D'%{localtime_ms\:%a %b %d= %Y %S}'" (milliseconds) >=20 > I suggest v7 should according to your remark: >=20 > $> ffmpeg ... drawtext=3D"fontfile=3D...:text=3D'%{localtime \:%a %b %d= %Y %S}'" (seconds) > $> ffmpeg ... drawtext=3D"fontfile=3D...:text=3D'%{localtime \:%a %b %d= %Y %S}':show_ms=3D1" (milliseconds) >=20 > Good? I dislike both versions, from a user interface point of view: if there is a format string, then it stands to reason, for the user, that the resulting text is governed by the format string, not by an extra option somewhere else. There is no "use_four_digit_year=3D1" option, there is %Y instead of %y. There is no "use_slashes=3D1" option, you write %Y/%m/%d instead of %Y-%m-%d. There are no "omit_date=3D1" and "omit_hour=3D1" options, you just write what you want in the format string. My proposal goes the same way: $> ffmpeg ... drawtext=3D"fontfile=3D...:text=3D'%{localtime \:%a %b %d %= Y %S.%3N}'" It has several merits over your proposal: - It can be extended later to support printing the milliseconds at another place than the end (for example to put the time in brackets). - It can be extended to support microseconds or centiseconds (%6N, %2N). - It is somewhat compatible with GNU date and possibly a few others. And I do not think it is harder to implement. Regards, --=20 Nicolas George --yoDtKQkv1ydScxF7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE6ooRQGBoNzw0KnwPcZVLI8pNxgwFAmHj/DwACgkQcZVLI8pN xgzryBAAtoU21ZzZVEnw0qIhcX2maJFD5I5JZKpTidLl4PtjOm9DU/QWn8NOngr0 9LP0Lk72JaO9c76LSySOPWQmex4RAcOtGOmeJYA9/ZmZPFcLGJT6+n0uIcrx15H3 ja6hq4l/MOskUjTH7THdY8pYBo+0bw1uqCvpZWM7mih3chdff3P76b0lEtdAWGTR 56OWiqjUIvjSDemtPsF11m3dbZ8MIoENq+K2X+7vdxyshwuXW4w6X7v8/TDpDcgw OkuvmVyOUseL9po1TYE/vibS7GgbgJB+ciPAJZ+c71IF/b7Hr0oNbToqByaa+t3h IfXLdChIVBePLKwcMMUgRO0lXNJNHwUhcwZ+gxJGUVjZ/3oMX97qJNvnUMEnbw4J uQmrPHG6usmT4Nd2IMsfTUjwIKPJay1aM/ZthtwarW+VwDaZI1tQa1Ix8B5FVMNh 4YRTWng0dpO9FD5vQ/kco2IEbEZJ73XJs4vC0DvZ98+MRTosdV1niF8LmR9Y/mWG xq3is6pld0yavwGdj1naI3+ElupdiDVG+xT78tcp+83xQOpDdmLOBGgRKbJzUHxw Z5IHnNH5K2rQzEhbj3lzQrSssH3ELcEuQO6qczRN/42thIa/fswwPGskMfjYBTKR LfYzjXfK5gomhMxkvhtjwbvE2Aa2kzfcNA8An1rfUouBAVJSOZU= =zRlo -----END PGP SIGNATURE----- --yoDtKQkv1ydScxF7-- --===============3103128943983885612== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============3103128943983885612==--