[FFmpeg-user] Mystery error initializing complex filters -- bug?

Jim DeLaHunt list+ffmpeg-user at jdlh.com
Mon Mar 22 08:48:25 EET 2021


On 2021-03-21 22:40, Mark Filipak (ffmpeg) wrote:

> Hi All,
>
> A little help, please.
>
> Using the latest git source, using '-filter_complex_script', I get a 
> mystery error.
>
> I have checked the filter_complex_script: 23fps.ffmpeg.filter.txt, for 
> errors. Especially I've checked that every input pad (especially 
> [AA1]) has one and only one matching output pad, and that every output 
> pad (especially [AA1]) has one and only one matching input pad.
>
> Can you suggest any other checks or should I file a bug now?

…


> === command line ===
>
> ffmpeg -i "THE LAST EMPEROR.excerpt.24fps.mkv" -filter_complex_script 
> 23fps.ffmpeg.filter.txt -map 0 -codec:v libx265 -x265-params 
> crf=16:qcomp=1.00 -codec:a copy -codec:s copy -dn "THE LAST 
> EMPEROR.excerpt.60fps.mkv"
>
> === debug level report ===

...


> [AVFilterGraph @ 0000020abb032040] No output pad can be associated to 
> link label 'AA1'.
> [Parsed_fps_2 @ 0000020ababb3180] 0 frames in, 0 frames out; 0 frames 
> dropped, 0 frames duplicated.
> Error initializing complex filters.
> Invalid argument
...
> === filter_complex_script ===
>
> [in]settb=expr=1/720000,setpts=N*30030,fps=24000/1001,
> separatefields,split[ABC][abc],
> [ABC]tinterlace=mode=drop_odd,split[AC][B],
> [AC]tinterlace=mode=drop_odd,split[AA5][AA3][AA1][AC1][AC3],
> [AA5]select=eq(mod(N\,2)\,0),setpts=PTS+30030[A5],

....

I haven't read carefully enough to understand this whole filterchain and 
command output.  But reading the error message in a simple-minded way, 
it seems that FFmpeg is setting up the filter chain, it has a filter 
'split' which has a certain number of output filter pads, and it can't 
find a filter pad to assign to the label 'AA1'.  There are 5 labels 
after the split filter.  How many output filter pads does the split 
filter have?

The previous line has a split filter with two output pads.  'AA1' is the 
third label in the output list.  So perhaps the split filter had only 
two output pads when you use it this way?

At the Split filter documentation 
(http://ffmpeg.org/ffmpeg-all.html#split_002c-asplit), it says,

 > To create 3 or more outputs, you need to specify the number of 
outputs, like in:
 > [in] asplit=3 [out0][out1][out2]

Let's assume the `split` filter (video) works the same way as the 
`asplit` filter (audio).

Try changing your filter from:

 > [AC]tinterlace=mode=drop_odd,split[AA5][AA3][AA1][AC1][AC3],

by adding '=5' after 'split', so it becomes:

 > [AC]tinterlace=mode=drop_odd,split=5[AA5][AA3][AA1][AC1][AC3],

I haven't tried this myself.

Best regards,
—Jim DeLaHunt




More information about the ffmpeg-user mailing list