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

Gyan ffmpeg at gyani.pro
Wed Jul 10 23:28:38 EEST 2019



On 11-07-2019 01:33 AM, greg Luce wrote:
>> What output were you expecting with the first patch and what command did
>> you test to check?
> I was hoping it would make
> -filter_complex [0:v]drawtext=text='%{pkt_duration}'
> (and also pkt_size and pkt_pos) work the same way as
> -filter_complex [0:v]drawtext=text='%{frame_num}'
> does currently, but all I got was error messages as if I'd put
> nonsense between the {brackets}
>
> Would this new patch make that work now?

Yes, but it's not needed. These are constants, so they have to be 
referenced within a function. There are two suitable ones: e and eif

e.g.

drawtext=text='pos %{e\:pkt_pos}, dur %{e\:pkt_duration}, size 
%{e\:pkt_size}'

Gyan


More information about the ffmpeg-devel mailing list