No music playback on arch linux.
Hey I'm on a arch linux pc, and when I try to do playback of an url the bot just joins the voice channel, goes into Playing Status, and after like 100ms it goes back to idle. The thing is the exact same code works perfectly fine on my debian server.
I tried searching in the web and also asked GPT, but after 3 hours of no result I'm asking here.
11 Replies
- What are your intents?
GuildVoiceStates
is required to receive voice data!
- Show what dependencies you are using -- generateDependencyReport()
is exported from @discordjs/voice
.
- Try looking at common examples: https://github.com/discordjs/voice-examples.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!My Intents are:
Guilds, GuildVoiceStates and GuildMembers
1s
@discordjs/opus is detected? I tried installing it before but the installation of it failed during the build process, so I just switched to opusscript
Welp
I cant remove it tho as pnpm says its not installed :/
Ah
I got it removed by deleting node modules, lemme try rq
Welp nope
Lemme grab the code
Play cmd
https://haste.luax.xyz/oyihuyicam.typescript
musicHandler
https://haste.luax.xyz/pelacejuyo.typescript
If you want the code raw in discord just tell me
And when I run the play cmd it just says Playback started, and directly after it says Playback idle
Uh I've been playing mp3 stream urls for like years now
My oldest bot that still supports playing urls, is even on djs/voice 0.16
Sure
--------------------------------------------------
Core Dependencies
- @discordjs/voice: 0.18.0
- prism-media: 1.3.5
Opus Libraries
- @discordjs/opus: not found
- opusscript: 0.0.8
Encryption Libraries
- sodium-native: not found
- sodium: not found
- libsodium-wrappers: 0.7.10
- @stablelib/xchacha20poly1305: not found
- @noble/ciphers: not found
FFmpeg
- version: 6.0-static https://johnvansickle.com/ffmpeg/
- libopus: yes
--------------------------------------------------
Thats of the bot I shared the src from, which works on my server
lemme grab one of the other bot
root@v2202105150054154803:/home/gka# node musicBot.js
--------------------------------------------------
Core Dependencies
- @discordjs/voice: 0.16.0
- prism-media: 1.3.5
Opus Libraries
- @discordjs/opus: 0.9.0
- opusscript: 0.0.8
Encryption Libraries
- sodium-native: not found
- sodium: not found
- libsodium-wrappers: 0.7.11
- tweetnacl: 0.14.5
FFmpeg
- version: 5.0.1-static https://johnvansickle.com/ffmpeg/
- libopus: yes
--------------------------------------------------
what the
I just uploaded the bot from my pc to the server
Thats the 2nd bot that has been running for idk 2 years now
uuh
ooh
I have installed node 18.15 there
And node 23.6.0 on my local machine
(even tried with 20.18.1)
hmm on my pc latest opusscript is 0.1.1 and on the server its 0.0.8
So with node version 18.15.0 on my pc (same the server is on), and opusscript downgraded to 0.0.8 it does the same
report of my pc rn
I mean it instantly goes back to idle
When I specify a file path it works tho. And I also tried pre-fetching and streaming the audio then. that works aswell, but only with non-stream mp3s
But I quite need that ability
you mean my pc?
Cuz my pc is on arch which its not working on
Sry for the missdeclaration. my pc is on arch, my server on debian
And I'm playing the stream through vlc player rn
And that works perfectly fine
I did start the stream just now after I did stop the bot
I even tried with a mp3 file that is hosted on my server
Not even that works
hmm not that I know of
I'm connected via my normal internet.
yup
ā°ā curl https://gkaapi.luax.xyz/audio/10428332738
Warning: Binary output can mess up your terminal. Use "--output -" to tell curl to output it to your terminal anyway, or consider
Warning: "--output <FILE>" to save to a file.
with the stream it just exits after 533ms
āāī² ļ¢ ī° ļ¼ ~ ī° ī² 533ms ļ ī² 23 ī² 21:38:03 ļ ī°āā®
ā°ā curl https://streams.ilovemusic.de/iloveradio29.mp3
I swap them out every 2 tries
So I try the streams one, and then the gka
Well when I put the gka one as the link it does the same as the ilovemusic one
well with curl I can download the gka one atleast š
But if I put the gka one as link, then it wont play asw
I just turned on debug mode, and this is what gets logged.
When I play the file that I downloaded via file it shows this.
welp, I tbh have no idea why its doing that
Exact same thing happens on the debian server it works on
also, idk why but when I do the gka url with node-fetch then it works fine. so idk.
if anyone has any idea on how I could maybe fix it please reply and ping me
hey, i have the same problem but instead of Arch its Ubuntu on my side which does not like to work as it should.... have you found something to workaround?
Sadly not.
damn
I was finally able to get my bot running.. do you use ffmpeg-static? If so remove it.
This module if used on newer Linux and ffmpeg versions the module makes problems cause it's binaries are only up to ffmpeg version 6.0.0 everything above 6.0.0 will NOT work. Only way to make it work is to install only newest ffmpeg (sudo apt ffmpeg) and get rid of ffmpeg-static completely.
You can give this a try
Tysm.. It rly works
wonderfull!
glad to help
Was encountering this issue - where my Raspberry Pi would not be able to stream some remote audio files - due to
ffmpeg-static
. Removing the ffmpeg-static
npm package and installing ffmpeg itself on the machine was enough to fix the issue.
Thank you for helping me figure out what was wrong through this post!no problem. one hand cleans the other one š