From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 2745D4AD8F for ; Wed, 20 Aug 2025 20:58:38 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id CBF5068D5E4; Wed, 20 Aug 2025 23:58:34 +0300 (EEST) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 7C2A568D4A1 for ; Wed, 20 Aug 2025 23:58:28 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id CD66A44487; Wed, 20 Aug 2025 20:58:27 +0000 (UTC) Date: Wed, 20 Aug 2025 22:58:26 +0200 To: FFmpeg development discussions and patches Message-ID: <20250820205826.GE29660@pb2> References: <20250818062256.s2blarmtwdv6psz4@zazen.home> MIME-Version: 1.0 In-Reply-To: <20250818062256.s2blarmtwdv6psz4@zazen.home> X-GND-State: clean X-GND-Score: -41 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduheelfeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenogfuuhhsphgvtghtffhomhgrihhnucdlgeelmdenfghrlhcuvffnffculddutddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhephffgieeflefhgeefkeeitdeifeefledtleeitdefiefhfffhjeejueeitdfhteehnecuffhomhgrihhnpehimhgrghgvmhgrghhitghkrdhorhhgpdhmohiiihhllhgrrdhorhhgpdhgihhthhhusgdrihhonecukfhppeeguddrieeirdeihedrudejieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeihedrudejiedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrghdprhgtphhtthhopegrhihoshgvtgesghhmrghilhdrtghomh X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [Proposal] drawvg filter 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: , From: Michael Niedermayer via ffmpeg-devel Reply-To: FFmpeg development discussions and patches Cc: Michael Niedermayer , Ayose Content-Type: multipart/mixed; boundary="===============1753050806570455136==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============1753050806570455136== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="0fQY2IaORwvfsPQ6" Content-Disposition: inline --0fQY2IaORwvfsPQ6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Ayose On Mon, Aug 18, 2025 at 07:22:56AM +0100, Ayose via ffmpeg-devel wrote: > This is a proposal to add a new filter to FFmpeg: drawvg, to draw > vector graphics on top of a video, using libcairo. >=20 > This is my first contribution to FFmpeg, so I don't know if this is > the right channel to make the proposal. >=20 > I was thinking on how to write it, and I thought that a FAQ-like > summary may be the easiest way to describe it. Apologies if this is > more confusing than helpful. >=20 >=20 > =3D=3D What is drawvg =3D=3D >=20 > drawvg is a filter to render vector graphics on top of video frames. >=20 > The render is done by executing a script written in its own language, > called VGS (Vector Graphics Script). The script consists of a series > of commands to describe 2D graphics, which are rasterized using the > libcairo library. >=20 > VGS is not intended to be used as a general-purpose language. Since > its scope is limited, it prioritizes being concise and easy to use. > The syntax is heavily inspired by languages like [1]Magick Vector > Graphics, or [2]SVG's . >=20 > [1] https://imagemagick.org/script/magick-vector-graphics.php > [2] https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Elemen= t/path >=20 > Some features of the syntax (like using whitespaces to separate > arguments) are also present in languages like TCL or shell scripts. > Many command names are taken from PostScript. >=20 > Scripts can use FFmpeg expressions to describe graphics dynamically, > so they can compute coordinates based on frame dimensions, frame > metadata, generate random values, read pixel colors, etc. >=20 > For example, to draw a blue circle in the middle of a frame: >=20 > circle (w / 2) (h / 2) 100 > setcolor blue > fill >=20 > Then: >=20 > $ ffplay -i example.webm -vf 'drawvg=3Dfile=3Dblue-circle.vgs' >=20 > There is a [3]website with some examples on how to integrate drawvg > with other FFmpeg filters, and also a [4]playground to experiment with > the capabilities of the language. >=20 > [3] https://ayosec.github.io/ffmpeg-drawvg/ > [4] https://ayosec.github.io/ffmpeg-drawvg/playground/ i like the filter, i think its useful and cool thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The bravest are surely those who have the clearest vision of what is before them, glory and danger alike, and yet notwithstanding go out to meet it. -- Thucydides --0fQY2IaORwvfsPQ6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaKY26QAKCRBhHseHBAsP q13IAJ0Sl9hYEZSqytKvHuczQpqK2FfuFwCeN+deWI5urVrk92gMY7LOd1c2CEw= =Nq69 -----END PGP SIGNATURE----- --0fQY2IaORwvfsPQ6-- --===============1753050806570455136== 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". --===============1753050806570455136==--