-
|
Hi Paul, It currently seems the aformat filter is the only one using AVOptions arrays (I made a small function to iterate over all filters and dump their AVOption info). When building a filtergraph (e.g. anoisesrc -> aformat -> abuffersink) and trying to set the AVOptions for aformat (AVSampleFormat(s), sample rate(s) [1], AVChannelLayout(s)), the log receives an error message from the call to av_opt_set_array() called from draw_options(): 'Cannot set array element [n] for parameter sample_fmts: value [N] is out of rage [0-0].' Case in point: Similarly for AVChannelLayout, which currently isn't handled and after adding the respective code in my local repo, the same workaround (serialize and call av_opt_set()) did the job there too, but it seems a little kludgy. [1] (Changing sample_rates doesn't cause an error message because .min and .max are defined. Mentioning this just for completeness.) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
|
for illustration: |
Beta Was this translation helpful? Give feedback.
-
|
The librempeg build of lavfi-preview works fine here, except I need to add handling for channel layout array option. |
Beta Was this translation helpful? Give feedback.
-
|
Unfortunately, I can not fix this on my side. complain to FFmpeg developers about ffmpeg aformat filter not signaling proper range for sample formats and rates. Interestingly FFmpeg abuffersink filter have .max set, and buffersrc have both .min and .max set. |
Beta Was this translation helpful? Give feedback.
The librempeg build of lavfi-preview works fine here, except I need to add handling for channel layout array option.
The ffmpeg state of code is very buggy lately, so I do not recommend to use it at all.
Also you do not need to manually insert (a)format filters. Will check if lavfi-preview binaries that are using FFmpeg code can be improved in this case.