[FFmpeg-devel] [PATCH v2] vf_drawtext: Add pkt_pos, pkt_duration, pkt_size as variables

Moritz Barsnick barsnick at gmx.net
Thu Jun 13 00:32:27 EEST 2019

On Wed, Jun 12, 2019 at 12:11:16 -0400, greg Luce wrote:
> Ooops apologies, .patch file attached and with hopefully better line breaks

Yes, but something went wrong with its contents:

> Subject: [PATCH] Signed-off-by: greg Luce <electron.rotoscope at gmail.com>

This doesn't look correct. It's supposed to contain
Subject: vf_drawtext: Add pkt_pos, pkt_duration, pkt_size as variables
and the Signed-off-by line is to be somewhere in the remaining commit
message. How did you create the patch?

>  These parameters allow the @var{x} and @var{y} expressions to refer
> -each other, so you can for example specify @code{y=x/dar}.
> +to each other, so you can for example specify @code{y=x/dar}.
> +
> + at item pict_type
> +A 1 character description of the current packet's input picture type.
> +

Strictly speaking, you're fixing and amending existing documentation,
not related to your modifications. I personally don't mind, but others
will request you to do this is a separate patch.

> + at item pkt_pos
> +The current packet's position in the input datastream
> +(in bytes from the head of the source file).
> +
> +A value of -1 indicates this info is not available.

A non-related question: Do you understand when this is -1? (I myself
am looking for some filter or log info which can give me the pkt_pos
related to a certain time offset from the beginning of a file, as when
seeked using "-ss".)

> +The current packet's input duration.

"input duration" sounds confusing. You can likely drop the "input".

> +The current packet's input size (in bytes).


I can't comment on the rest, but like the feature.

You may need to bump libavfilter's MICRO version, as you are adding


More information about the ffmpeg-devel mailing list