Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: MP3 playback error - unsupported format (Read 3795 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

MP3 playback error - unsupported format

foobar2000 throws an unrecoverable playback error "Unsupported stream format: 22050 Hz / 24-bit / 2 channels" trying to play this MP3 file (see attachment). Other media players I tried like Winamp, XMPlay and Windows Media player can play the file without issues.

Using Foobar v1.4.1 beta 5, audio output via WASAPI, Windows 10 64-bit 1803

Installed foobar2000 plugins:
Spoiler (click to show/hide)

Re: MP3 playback error - unsupported format

Reply #1
Apparently, your output device does not support 22050/24. You have chosen a solution where foobar2000 tries to feed your output device the signal in its original format (rather than processing it behind your back, which WMP does).

Solution: resample on the fly. I use a component that resamples only the ones needed: go to https://hydrogenaud.io/index.php/topic,67373.0.html and pick the "mod2".
Install it, go to Preferences > Playback > Decoding > DSP Manager.  Select it, double click to configure, and set it to resample 22050 to 44100. By all means include "11025" on the list if you have or think you will ever have such files. I have five ... and two files with 16k sample rate, and quite a few at 32k. Surprisingly, none at 24k.

Re: MP3 playback error - unsupported format

Reply #2
@Porcus

thank you for explaining the details of the issue and for providing a solution. I successfully tested the mod2 variant of the foo_dsp_resampler. XMPlay's WASAPI plugin appears to be more flexible, as it can play the MP3 file without any additional resampling plugin in the output chain.


A couple questions, that probably only lvqcl (foo_dsp_resampler author) can answer:

1. Why do three versions of the plugin (normal, mod, mod2) have to co-exist? Can't these be realized in just one plugin?
 
2. For example, when using the mod2 variant and configuring it to resample only "8000;11025;22050;24000;32000", what happens to files with an uncommon samplerate, like 43284 kHz? Does the plugin pass/skip these files?
 
3. Why isn't an option available to configure the "resample ONLY frequencies" option using "<44100" ? I.e. upsample every file that has a lower frequency than 4100 kHz, leave any file with a samplerate greater than 4099 kHz untouched.

Re: MP3 playback error - unsupported format

Reply #3
XMPlay's WASAPI plugin appears to be more flexible, as it can play the MP3 file without any additional resampling plugin in the output chain.

Actually it's not due to xmp-wasapi.  XMPlay is defined around the BASS audio library (whose author IS the XMPlay author);  when BASS is presented with a rate that is not compatible with the audio device, it internally resamples the audio to a compatible result (in every case I have seen, 44.1kHz).  I do not know what resampling algorithm it uses. In XMPlay itself there is an option to SRC resample to a fixed specified rate if desired.

As far as your question #2, if the frequency is not specified in the mod2 options, it is not resampled, and sent on to the audio device as-is.  In the case of "43284", that would produce no audio unless your device itself is compatible with it.

The answer to questions #1 and #3 is, "because the plugin developer didn't design it that way."  I imagine it would be OK to suggest those additions/changes if he is doing updates.

Re: MP3 playback error - unsupported format

Reply #4
@deus-ex : mod1 is "leave these as-is", mod2 is "resample only these". I agree that it could be done the BASS way that @sveakul explains (in that the component could intercept an error message).

But then, how many samplerates do you have? (I have eight: CD, half CD, quarter CD; 16k/32k/48k/96k - and one lonely DSD-in-WavPack , 352k, just to test it out. No 24k, surprisingly.)

Re: MP3 playback error - unsupported format

Reply #5
As far as your question #2, if the frequency is not specified in the mod2 options, it is not resampled, and sent on to the audio device as-is.  In the case of "43284", that would produce no audio unless your device itself is compatible with it.
Yes, that was my understanding of the function, too. I just wanted to verify whether my understanding is correct.

The answer to questions #1 and #3 is, "because the plugin developer didn't design it that way."
Actually you cannot know, only the author of the plugin can really tell. Therefore I raised the questions to find out whether there is the possibility of combining all three variants into one release, and probably expand/improve the samplerate configuration dialog.

Thank you for your reply, sveakul.



@deus-ex : mod1 is "leave these as-is", mod2 is "resample only these".
Yes, I fully understood that from the get go. Still the question remains why lvqcl chose to offer three different versions of the basically same plugin instead of combining all variants into one binary release.

But then, how many samplerates do you have?
That is not the question. I want to be sure that no file with a samplerate out of the ordinary is passed by the plugin, eventually leading to a unrecoverable playback error. In the first place that's the reason I would want to use such a plugin. Furthermore it's rather inconvenient having to type in every sample rate one likes to be covered in either of the mod variants, instead of having the option to define ranges via "from A to B", "smaller than" and "greater than".

Thank you again for your valuable input, Porcus.

Re: MP3 playback error - unsupported format

Reply #6
Why do you people insist on using WASAPI when it's so cumbersome?

Re: MP3 playback error - unsupported format

Reply #7
Therefore I raised the questions to find out whether there is the possibility of combining all three variants into one release, and probably expand/improve the samplerate configuration dialog.
Not by me. I'd rather drop "mod" and "mod2" versions because I don't use them myself.
Also, I don't understand why someone wants to use them. Just resample everything into one supported frequency, and call it a day.


Re: MP3 playback error - unsupported format

Reply #9
Just resample everything into one supported frequency, and call it a day.
Agreed, that appears to be the most reasonable approach eliminating the need to worry about extraordinary cases.

1. There are already two resamplers included in foobar2000, namely "dBpoweramp/SSRC" and "PPHS". How does your "SOX" resampler compare to these in terms of speed and quality. Would you recommend using the SOX resampler instead of those?

2. What about files that already have the desired target samplerate, are those skipped/passed through by the SOX resampler? As far as I can tell foobar2000's internal resampler "PPHS", which I use in the converter tool, does exactly this.


Re: MP3 playback error - unsupported format

Reply #11
Excellent! Thank you very much.