[FFmpeg-devel] [PATCH] Configure graph filters with more than one output
Stefano Sabatini
stefano.sabatini-lala
Sun May 31 12:53:44 CEST 2009
On date Saturday 2009-05-30 20:56:16 +0200, Vitor Sessak encoded:
> Stefano Sabatini wrote:
>> Hi all,
>>
>> I'm experimenting with a graph chain of this kind:
>> ffplay in.avi -vfilters "split [out] [select], [select] select='eq(mod(N, 10), 0)', snapshot"
>
> I suppose you mean
>
> ffplay in.avi -vfilters "split [out] [select]; [select] select='eq(mod(N, 10), 0)', snapshot"
>
> (note the ';')
It's equivalent to the previous syntax in this specific case.
> or
>
> ffplay in.avi -vfilters "split [out] select='eq(mod(N, 10), 0)', snapshot"
This is wrong syntax.
stefano at geppetto ~/s/l/ffmpeg> ffplay in.avi -vfilters "split [out] select='eq(mod(N, 10), 0)', snapshot"
FFplay version SVN-r18854, Copyright (c) 2003-2009 Fabrice Bellard, et al.
[...]
Unable to parse graph description substring: "select='eq(mod(N, 10), 0)', snapshot"
>
> ?
>
>> the problem is that the config_props of the snapshot is never called,
>> since the code which do the configuration:
>>
>> if(avfilter_config_links(filt_out)) goto the_end;
>>
>> only configure the part of the graph from the application output
>> filers towards the beginning.
>>
>> Suggested function call avfilter_config_links(filt_out) on all the
>> output filters of a graph (that is filters which one input and no
>> output).
>
>> +int avfilter_graph_config_links(AVFilterGraph *graph, AVClass *log_ctx)
>> +{
>> + AVFilterContext *filt;
>> + int i, ret;
>> +
>> + for (i=0; i < graph->filter_count; i++) {
>> + filt = graph->filters[i];
>> +
>> + if (!filt->output_count) {
>> + if ((ret = avfilter_config_links(filt)))
>> + return ret;
>> + }
>> + }
>
> Hmmm... I'm fine with the patch, but I think this makes the
> recursiveness of avfilter_config_links() useless.
Why?
avfilter_config_list() recursiveness works in the direction from an
output link towards all the connected sources in input, but you need
to call it on each output if you have a graph with more than one
output.
> Since it doesn't work for the example you've given, I'd say it
> should be removed (but it can be another patch).
I really cannot understand this, should we keep it or should we remove
it, what is not working?
Regards.
--
FFmpeg = Faithful and Fantastic Most Portable Ephemeral God
More information about the ffmpeg-devel
mailing list