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

Mark Filipak (ffmpeg) markfilipak at bog.us
Mon Mar 22 17:35:00 EET 2021


On 2021-03-22 02:48, Jim DeLaHunt wrote:
> 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?

Yes, it was a careless mistake, fixed by 'split=5[AA5][AA3][AA1][AC1][AC3]'. I made similar mistakes 
because of the difference between 'N' in expressions and 'n' in modulos.

What have I learned? Always list the number of inputs, even if it is the default.

Now that I have the huge filtergraph up and passing the initial setup (11 minutes), when it actually 
starts processing frames, it eats all the 32GB of RAM and tops out the virtual memory and crashes. 
Oh, dear.


More information about the ffmpeg-user mailing list