ffmpeg (libavfilter) filter plugin: Audio format not supported by filter

Need help with MPD?
Post Reply
flittermice
Posts: 4
Joined: October 14th, 2020, 8:51 pm

ffmpeg (libavfilter) filter plugin: Audio format not supported by filter

Post by flittermice »

Hello there,

I was very excited when I read about the new (0.22) "ffmpeg (libavfilter)" filter plugin because my goal is to implement an uncomplicated way of integrating an equalizer with fixed parameters on my headless computer without fiddling around with PulseAudio or Jack EQs (although I got both to work).

However, whatever I tried, I got the exception:
Audio format not supported by filter '<some weird text>': 44100:24:2
where <some weird text> is text that looks like a few bytes of random and in most cases unprintable mess. See below.
  • Setting a format like 44100:16:2 in the output configuration doesn't help anything at all.
  • Resampling within the filter graph did not work either.
  • Suspecting that 44100:24:2 would maybe be the standard decoded format of an MP3 in mpd, I tested a WAV file (see log: 44100:16:2), but surprisingly I got the same error message.
  • ffplay -v verbose -nodisp -af 'aformat=channel_layouts=stereo,equalizer=f=1000:t=h:width=2000:g=-20' <file.mp3> works as expected (with or without the channel_layouts part).
Questions:
  • Do you have any suggestions?
  • Has anyone gotten this filter to work yet (maybe with another filter)?
  • Is this "44100:24:2" coming from mpd? Is this error message concerning the input or the output side of the filter?
  • ... or am I misunderstanding the concept at all?
TIA,
Armin


The relevant parts of my configuration:

Code: Select all

audio_output {
    type        "jack"
    name        "Wohnzimmer_ffmpeg-EQ"
    mixer_type  "software"
    destination_ports "system:playback_1,system:playback_2"
    #format      "44100:16:2"
    filters     "libavfilter-EQ"
}

filter {
    plugin  "ffmpeg"
    name    "libavfilter-EQ"
    graph   "aformat=channel_layouts=stereo,equalizer=f=1000:t=h:width=2000:g=-20"
}
logfile:

Code: Select all

playlist: play 51:"Metal/S/Sinira (USA) [2020] The Everlorn/01_Where Starlight Does Not Shine.mp3"
decoder_thread: probing plugin mad
decoder: audio_format=44100:24:2, seekable=true
ffmpeg/abuffer: Setting 'sample_rate' to value '44100'
ffmpeg/abuffer: Setting 'sample_fmt' to value 's32'
ffmpeg/abuffer: Setting 'channels' to value '2'
ffmpeg/abuffer: Setting 'time_base' to value '1/44100'
ffmpeg/abuffer: tb:1/44100 samplefmt:s32 samplerate:44100 chlayout:(null)
ffmpeg/Parsed_aformat_0: Setting 'channel_layouts' to value 'stereo'
ffmpeg/Parsed_equalizer_1: Setting 'f' to value '1000'
ffmpeg/Parsed_equalizer_1: Setting 't' to value 'h'
ffmpeg/Parsed_equalizer_1: Setting 'width' to value '2000'
ffmpeg/Parsed_equalizer_1: Setting 'g' to value '-20'
ffmpeg/Parsed_equalizer_1: auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_aformat_0' and the filter 'Parsed_equalizer_1'
ffmpeg/AVFilterGraph: query_formats: 4 queried, 6 merged, 3 already done, 0 delayed
ffmpeg/auto_resampler_0: picking s32p out of 4 ref:s32
ffmpeg/SWR: Using s32p internally between filters
ffmpeg/auto_resampler_0: ch:2 chl:stereo fmt:s32 r:44100Hz -> ch:2 chl:stereo fmt:s32p r:44100Hz
ffmpeg/Parsed_equalizer_1: a=1.449025 -1.979735 0.550975:b=1.044903 -1.979735 0.955097
exception: Failed to open filter for "Wohnzimmer_ffmpeg-EQ" (jack); Audio format not supported by filter 'kU': 44100:24:2
exception: Failed to open filter for "Wohnzimmer_ffmpeg-EQ" (jack); Audio format not supported by filter 'kU': 44100:24:2
client: [0] command returned 0
playlist: queue song 52:"Metal/S/Sinira (USA) [2020] The Everlorn/02_Gardens of Pestilence.mp3"
client: [0] process command "idle"
client: [0] command returned 1
client: [0] process command "status"
client: [0] command returned 0
client: [0] process command "idle"
client: [0] command returned 1
state_file: Saving state file /home/flitter/Programme/mpd/mpd.state
client: [0] process command "playid "60""
playlist: play 59:"Diverses/Testmusik/Sanguis - Burden of Heritage.wav"
decoder_thread: probing plugin sndfile
decoder: audio_format=44100:16:2, seekable=true
ffmpeg/abuffer: Setting 'sample_rate' to value '44100'
ffmpeg/abuffer: Setting 'sample_fmt' to value 's32'
ffmpeg/abuffer: Setting 'channels' to value '2'
ffmpeg/abuffer: Setting 'time_base' to value '1/44100'
ffmpeg/abuffer: tb:1/44100 samplefmt:s32 samplerate:44100 chlayout:(null)
ffmpeg/Parsed_aformat_0: Setting 'channel_layouts' to value 'stereo'
ffmpeg/Parsed_equalizer_1: Setting 'f' to value '1000'
ffmpeg/Parsed_equalizer_1: Setting 't' to value 'h'
ffmpeg/Parsed_equalizer_1: Setting 'width' to value '2000'
ffmpeg/Parsed_equalizer_1: Setting 'g' to value '-20'
ffmpeg/Parsed_equalizer_1: auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_aformat_0' and the filter 'Parsed_equalizer_1'
ffmpeg/AVFilterGraph: query_formats: 4 queried, 6 merged, 3 already done, 0 delayed
ffmpeg/auto_resampler_0: picking s32p out of 4 ref:s32
ffmpeg/SWR: Using s32p internally between filters
ffmpeg/auto_resampler_0: ch:2 chl:stereo fmt:s32 r:44100Hz -> ch:2 chl:stereo fmt:s32p r:44100Hz
ffmpeg/Parsed_equalizer_1: a=1.449025 -1.979735 0.550975:b=1.044903 -1.979735 0.955097
exception: Failed to open filter for "Wohnzimmer_ffmpeg-EQ" (jack); Audio format not supported by filter 'kU': 44100:24:2
exception: Failed to open filter for "Wohnzimmer_ffmpeg-EQ" (jack); Audio format not supported by filter 'kU': 44100:24:2
flittermice
Posts: 4
Joined: October 14th, 2020, 8:51 pm

Re: ffmpeg (libavfilter) filter plugin: Audio format not supported by filter

Post by flittermice »

I don't want to be demanding or impatient, but as I'm new here:
Is this question asked in a wrong way or is it just not of any interest to anyone?

Cheers, Flittermice
max
Forum team
Posts: 1179
Joined: January 15th, 2013, 3:43 pm

Re: ffmpeg (libavfilter) filter plugin: Audio format not supported by filter

Post by max »

This is a bug in the filter plugin - I'm just about to fix it. Expect a fix soon in version 0.22.3.
If you encounter bugs or behavior that looks like a bug - write a bug report on GitHub. There, it's easier to track it.
flittermice
Posts: 4
Joined: October 14th, 2020, 8:51 pm

Re: ffmpeg (libavfilter) filter plugin: Audio format not supported by filter

Post by flittermice »

Thanks for your answer, max.
I wasn't aware that this is indeed a bug, and I didn't find the issue in the bug tracker. But as you already working on that issue I suppose I can spare the bug report.
max
Forum team
Posts: 1179
Joined: January 15th, 2013, 3:43 pm

Re: ffmpeg (libavfilter) filter plugin: Audio format not supported by filter

Post by max »

Fix for the garbage filter name in the error message: https://github.com/MusicPlayerDaemon/MP ... dc96918ef5
Fix for the filter format error: https://github.com/MusicPlayerDaemon/MP ... 03b2d56b9e
MPD 0.22.3 will be released soon with those fixes.
flittermice
Posts: 4
Joined: October 14th, 2020, 8:51 pm

Re: ffmpeg (libavfilter) filter plugin: Audio format not supported by filter

Post by flittermice »

Gorgeous! This works in such a wonderful and elegant way now. Thank you!!! CPU usage is much lower than with the system-wide EQs.
I suppose there will be many uses for the filter plugin in future.
BTW: I was not able to test the "garbage filter name in the error message" because the error no longer occurs :-D
Now for the hard work: finding out the EQ parameters.
Post Reply