[Libav-user] how to set filter's name in filter graph

Andrey Utkin andrey_utkin at fastmail.com
Thu Apr 28 14:46:15 CEST 2016

On Thu, Apr 28, 2016 at 04:54:27PM +0800, qw wrote:
> Hi,
> I define the following filter graph:
> setpts=PTS-STARTPTS, fps=fps=20.00, scale=500:280; drawtext="fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text'"
> And avfilter_graph_parse_ptr(), and avfilter_graph_config() are used to create filter graph.
> How to set the name of filter 'drawtext' instance in the filter graph, i.e. AVFilterContext::name?

AFAIR, with avfilter_graph_parse_ptr() there is no way.
You can do it only if you create AVFilter instances one by one.
Or, I guess, you could traverse your AVFilterGraph afterwards and change
I'd appreciate extension of filtergraph string syntax to allow setting
custom names to elements. What about common "name=" option?

More information about the Libav-user mailing list