sedmelluq / lavaplayer

Audio player library for Discord
Apache License 2.0
967 stars 247 forks source link

Attempting to detect file with container wav failed #705

Open Foxite opened 1 year ago

Foxite commented 1 year ago

Trying to play this audio file: https://cdn.discordapp.com/attachments/942881728039620630/1044690508905201685/Action_mic.wav

Produces glitched sound that resemble nothing but a codec error.

When loading the file, this error is logged:

[19:07:40] [WARN] [MediaContainerDetection]: Attempting to detect file with container wav failed.
java.lang.IllegalStateException: Invalid audio format 3, must be 1 (PCM)
       at com.sedmelluq.discord.lavaplayer.container.wav.WavFileLoader$InfoBuilder.validateFormat(WavFileLoader.java:106)
       at com.sedmelluq.discord.lavaplayer.container.wav.WavFileLoader$InfoBuilder.build(WavFileLoader.java:98)
       at com.sedmelluq.discord.lavaplayer.container.wav.WavFileLoader$InfoBuilder.access$300(WavFileLoader.java:88)
       at com.sedmelluq.discord.lavaplayer.container.wav.WavFileLoader.parseHeaders(WavFileLoader.java:53)
       at com.sedmelluq.discord.lavaplayer.container.wav.WavContainerProbe.probe(WavContainerProbe.java:45)
       at com.sedmelluq.discord.lavaplayer.container.MediaContainerDetection.checkContainer(MediaContainerDetection.java:91)
       at com.sedmelluq.discord.lavaplayer.container.MediaContainerDetection.detectContainer(MediaContainerDetection.java:76)
       at com.sedmelluq.discord.lavaplayer.container.MediaContainerDetection.detectContainer(MediaContainerDetection.java:61)
       at com.sedmelluq.discord.lavaplayer.source.http.HttpAudioSourceManager.detectContainerWithClient(HttpAudioSourceManager.java:143)
       at com.sedmelluq.discord.lavaplayer.source.http.HttpAudioSourceManager.detectContainer(HttpAudioSourceManager.java:121)
       at com.sedmelluq.discord.lavaplayer.source.http.HttpAudioSourceManager.loadItem(HttpAudioSourceManager.java:82)
       at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItemOnce(DefaultAudioPlayerManager.java:436)
       at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItem(DefaultAudioPlayerManager.java:418)
       at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$createItemLoader$0(DefaultAudioPlayerManager.java:217)
       at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
       at com.sedmelluq.discord.lavaplayer.tools.OrderedExecutor$ChannelRunnable.executeQueue(OrderedExecutor.java:98)
       at com.sedmelluq.discord.lavaplayer.tools.OrderedExecutor$ChannelRunnable.run(OrderedExecutor.java:87)
       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
       at java.base/java.lang.Thread.run(Thread.java:829)

These error messages are also logged, many times, in a seemingly random order:

Warning: Big change (MPEG version, layer, rate). Frankenstein stream?
[src/libmpg123/layer3.c:465] error: big_values too large!
[src/libmpg123/layer3.c:496] error: Blocktype == 0 and window-switching == 1 not allowed.
[src/libmpg123/layer3.c:2016] error: bad frame - unable to get valid sideinfo

I'm using a fork of Jagrosh/MusicBot and a fork of Lavaplayer, although the changes shouldn't have caused this - I'll test this with an unmodified bot and Lavaplayer soon.

The bot is running on Linux in Docker, the container OS is Debian (bullseye) and has openjdk 11.

Foxite commented 1 year ago

Error has been previously reported on Jagrosh/MusicBot here and here - seems to be related to the wav files having a certain bitness.