Closed Zauberbutter closed 1 year ago
Looked into the source. The output of pactl list sink-inputs
is:
Sink Input #5
Driver: protocol-native.c
Owner Module: 7
Client: 9
Sink: 0
Sample Specification: s16le 2ch 48000Hz
Channel Map: front-left,front-right
Format: pcm, format.sample_format = "\"s16le\"" format.rate = "48000" format.channels = "2" format.channel_map = "\"front-left,front-right\""
Corked: no
Mute: no
Volume: front-left: 65536 / 100% / 0,00 dB, front-right: 65536 / 100% / 0,00 dB
balance 0,00
Buffer Latency: 0 usec
Sink Latency: 929 usec
Resample method: n/a
Properties:
media.name = "ts.pa.dummy.playbackdefaultrender1"
application.name = "TeamSpeak"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "33"
media.role = "phone"
media.icon_name = "teamspeak"
application.process.id = "1189835"
application.process.user = "tsbot"
application.process.host = "ferberite"
application.process.binary = "ts3client_linux_amd64"
application.language = "de_DE.UTF-8"
window.x11.display = ":100"
application.process.machine_id = "257dce953b6d4eeca01f43b5b325e900"
module-stream-restore.id = "sink-input-by-media-role:phone"
And the function audioIsWorking
is checking for application.name == "TeamSpeak3"
which is missing the 3
in my case.
Hi, thanks for trying out the bot! It clearly still has issues when running on Ubuntu, so these issue reports are very helpful.
I haven't yet had the time to make a new release of the bot, so I'm glad you found the jar in that issue you mentioned.
This seems like an issue I haven't encountered before, but I don't know if it has something to do with the way you set up pulseaudio? Pulseaudio normally runs in userspace, so I don't know if the instructions in that askubuntu page are correct.
After you have pulseaudio installed, you should be able to start it by just running pulseaudio --start
and no modifications should be needed in any pulseaudio's configuration files either, but with the latest jar, the bot should be able to start pulseaudio automatically too if it isn't already running.
If you could, please try running teamspeak3 manually and then check if you are able to see it in pactl output.
To run teamspeak 3 manually in headless mode, you can run a command like this:
xvfb-run teamspeak3 ts3server://$SERVER_ADDRESS?port=$SERVER_PORT&nickname=$NICKNAME&password=$SERVER_PASSWORD
Just replace $SERVER_ADDRESS, $SERVER_PORT, $NICKNAME and $SERVER_PASSWORD with the correct values.
Then with teamspeak running, run this pactl
command and check if you can see a sink input with TeamSpeak3
as the application name:
pactl list sink-inputs
Or if you want, you can just grep it directly from the command's output:
pactl list sink-inputs | grep 'application.name = "TeamSpeak3"'
This command should output application.name = "TeamSpeak3"
if it exists, and it won't output anything if it doesn't.
And the function
audioIsWorking
is checking forapplication.name == "TeamSpeak3"
which is missing the3
in my case.
Ohhh you were fast, great find! I'll fix that
Alright the bug should be fixed with the latest commit and here's the .jar file if you don't want to build it yourself: ts3-musicbot.zip
GitHub doesn't allow uploading .jar files directly, so I put it inside a .zip file
Thank you, I'll try it in the next minutes.
Looks fine! The issue is resolved.
FYI: To use a command i had to install dbus-x11
. And the bot fails to start ncspot. If I have more time I'll look into that.
Thank you for providing a fix so quickly!
Ok, nice that it fixed your problem. I recommend creating future issues on the gitlab page instead of here, since that is the main page for this bot.
Is the command you are talking about something that you need with running the musicbot? Could you provide more details about this? If it's some dependency that is needed, I need to update the installation guide then
Is the command you are talking about something that you need with running the musicbot?
Yes, there was a error when using the commands to play music. I wonder why the dbus-interface isn't a dependency of pulse. If you want I can reproduce the error.
Did you ever take a look at https://github.com/Splamy/TS3AudioBot? It uses a virtual TS3 client so one don't have to install the TS3 client itself. Also I wonder how it plays music without pulse. Maybe its worth to look into that. In a few weeks I have more time, so if you want I can help you with some things.
I have seen that project but haven't really studied how it works, but I guess if it doesn't use pulseaudio it works with alsa directly. I have a WIP internal tsclient in the musicbot but it still has some issues and no audio output/input yet so for now the official client provides the best experience. And sure, help is always appreciated! :)
I successfully installed the bot on a server running Ubuntu 20.04 with the
jar
which was provided in https://gitlab.com/Bettehem/ts3-musicbot/-/issues/24.I set up pulse with the tutorial from: https://askubuntu.com/questions/28176/how-do-i-run-pulseaudio-in-a-headless-server-installation
The output of
pacmd list-sinks
gives:So I think this looks fine. But when I start the bot it restarts constantly:
Thank you for creating a TS3 Audiobot with Spotify support! I look forward to using it.