From: Michael Niedermayer via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: Michael Niedermayer <michael@niedermayer.cc>, Ayose <ayosec@gmail.com>
Subject: Re: [FFmpeg-devel] [Proposal] drawvg filter
Date: Wed, 20 Aug 2025 22:58:26 +0200
Message-ID: <20250820205826.GE29660@pb2> (raw)
In-Reply-To: <20250818062256.s2blarmtwdv6psz4@zazen.home>
[-- Attachment #1.1: Type: text/plain, Size: 2487 bytes --]
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.
>
> This is my first contribution to FFmpeg, so I don't know if this is
> the right channel to make the proposal.
>
> 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.
>
>
> == What is drawvg ==
>
> drawvg is a filter to render vector graphics on top of video frames.
>
> 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.
>
> 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 <path>.
>
> [1] https://imagemagick.org/script/magick-vector-graphics.php
> [2] https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/path
>
> 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.
>
> 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.
>
> For example, to draw a blue circle in the middle of a frame:
>
> circle (w / 2) (h / 2) 100
> setcolor blue
> fill
>
> Then:
>
> $ ffplay -i example.webm -vf 'drawvg=file=blue-circle.vgs'
>
> 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.
>
> [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
[...]
--
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
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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".
prev parent reply other threads:[~2025-08-20 20:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-18 6:22 Ayose via ffmpeg-devel
2025-08-20 20:58 ` Michael Niedermayer via ffmpeg-devel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250820205826.GE29660@pb2 \
--to=ffmpeg-devel@ffmpeg.org \
--cc=ayosec@gmail.com \
--cc=michael@niedermayer.cc \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git