ERROR: No loader found for resource <...> .MP3

Godot Version

4.4 Stable

Question

ERROR: No loader found for resource: res://SFX/VO/L05 01 speech_43473.mp3 (expected type: AudioStream)

Does anyone have any idea why this would error in my export console, but loads just fine in the editor? I can’t see how this is different than any of the other places I do this, and they export and work great.

This is the final export error blocking completion of the game! So close

Can you share the line of code that produces this error?

It errors as soon as the level is loaded, so I assumed it might just be the default MP3 in the AudioStreamPlayer2D stream (Inspector), but it could be

$VO.stream = load(VO_track)

- Level parent
- - Audio functions
- - - VO (AudioStreamPlayer2D node)

VO_track is from an array of “res:// <filename> .mp3”

Huh. looks fine, are you on windows? does the file have different capitalization than found in the VO_track array?

1 Like

Hm. Yes, Windows. Just double-checked, but case etc is correct. They’ve all been dragged in, so they should match.

I noticed in documentation that WAV and OGG are mentioned as supported, but no mention of MP3. My MP3s are working up until this though.

Also, I’d expect it to work after export if it works in-editor (am I nuts?)

MP3 is supported, do any of the other VO tracks cause an error?

1 Like

Maybe try using the AudioStreamMP3 instead.

$VO.stream = AudioStreamMP3.load_from_file(VO_track)
1 Like

I should have thought of that—thanks

  • I swapped in an MP3 from later in the array sequence, exported, did a playthrough, and it errored the same way
  • This somehow reminded me that this level’s MP3s are different than the others in that they are 44 kbps, stereo, 32 kHz, stereo, half the size
    (the rest are 192 kbps, mono, 44 kHz).
    So, I replaced with non-optimized (192 kbps mono 44 kHz) versions.
    Ugh same error
  • @natzombiegames thanks, I’d never used AudioStreamMP3 before and had high hopes. Unfortunately, it caused the prior levels’ VO not to play for some reason, and ugh same error after export anyway

  • Then I replaced the first MP3 in the array sequence with one from a prior level. No error after export! I was surprised to discover even if I place the ‘problem’ mp3 next in the sequence, it plays fine. All of the 44/stereo/32 MP3s play fine after that.

Any theories why audio would cause an issue as first in the sequence but not after? And, only after export?

The load_from_file expects un-packed files, not imported files like those found in "res://", it’s better suited to user content like in "user://" that isn’t packed with the project.


I would recommend converting to a consistent format in general, does that solve the issue?

I could see this as a wild engine bug as applications have to open audio devices with specific formats, but it should still be able to load the other formatted files, and Godot should automatically mix them to a consistent format on import or load. And it would have to be the first audio ever loaded to be considered the opening audio format. It seems unlikely to be an engine bug because of those reasons, it would be a huge oversight and we’d see more posts about this issue.

Is there anything different about the AudioStreamPlayer?

1 Like

The default stream in the Inspector is different, but I’ve tried swapping others in there, no change. This one goes to an audio bus unique to this level (there are no effects on this level’s VO bus).

This can remain unsolved. Thanks to the help :pray:t2:, at least now I should be able to hack a workaround :smiling_imp:

1 Like

My only thought to help fix this is related to this;

I has a similar issue in my project with not being able to use an imported file as the filetype I wanted to use isn’t supported by Godot (In the way I wanted to use it anyway). So I would say to check the import settings on your MP3’s. Otherwise using an EditorExportPlugin to keep the integrity of the files may be the solution.

As I said since I had this type of problem recently I made said EditorExportPlugin to get around the files not exporting properly; It is simple but hopefully it can help solve your problem if nothing better will.
Github Link.

1 Like

I ‘solved’ this by creating a short silent MP3 and forcing it to play immediately. The rest of the VO MP3s play properly after that, and the build didn’t choke