[Libav-user] creating a new filter...

Richard Schilling coderroadie at gmail.com
Wed Mar 27 23:48:18 CET 2013

Thanks for the heads up.  But, I'm on acronym overload.  What is IIRC exactly, and what does it mean to  FFMPEG.  Sorry - I'm relatively new to the FFMPEG library.

I'm a bit confused, because it seems that FFMPEG should allow me to write a new filter and add it to the library.

And the examples provided in the code seem to suggest that i can use filters programmatically, as opposed to just on the command line.

I guess I need a better guide on the ins and outs of doing that.



On Mar 27, 2013, at 5:22 AM, Paul B Mahol <onemda at gmail.com> wrote:

> On 3/26/13, Richard Schilling <coderroadie at gmail.com> wrote:
>> Greetings.
>> This is my first post.  I looked in the listserv archives but didn't find
>> anyone talking about this, so here it goes.
>> I need to implement a new audio (audio only) filter.  I see the example code
>> in filtering_audio.c that uses a buffer sink.  But, I'm having a hard time
>> finding particulars on what everything means.  So, I'm hoping someone on
>> this list can help.
>> My goal: I have an application that uses the FFMPG library.  I need to
>> create a new custom audio  filter, say my_filter.c.
>> filtering_audio.c looks like the place to start. Is that correct?
> IIRC currently the only way to implement new filters is in libavfilter itself.
>> In filtering_audio.c:
>> * Can I get a basic walk-through of the code in the function init_filters?
>> it looks like there is a source (AVFilter *abuffersrc) and sink buffer
>> (AVFilter *abuffersing).   This looks like two filters.  How do I install
>> just one filter?  I'm looking for a basic checklist here so I know that my
>> calls to avfilter_graph_create_filter, av_filtergraph_parse, etc ... are
>> correct ... .basically a walk-through of the example code.
>> * In avfilter_asink_abuffer (buffersink.c) I see .inputs and .outputs
>> defined.  .inputs defines an AVFilterPad called "default".  .outputs defines
>> no (NULL) filter pads.  How does this relate to this code in
>> filtering_audio.c?
>>    /* Endpoints for the filter graph. */
>>    outputs->name       = av_strdup("in");
>>    outputs->filter_ctx = buffersrc_ctx;
>>    outputs->pad_idx    = 0;
>>    outputs->next       = NULL;
>>    inputs->name       = av_strdup("out");
>>    inputs->filter_ctx = buffersink_ctx;
>>    inputs->pad_idx    = 0;
>>    inputs->next       = NULL;
>> Thank you in advance.
>> Cheers,
>> Richard Schilling
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user

More information about the Libav-user mailing list