Music Bot on VPS (Lags/Crackling/Distortion/Stop)

Crazyhook

Member
Nov 22, 2015
24
6
35
I need help about my music bot on VPS Linux,
the sound stops,lags,crackling,distortion when any music be playing
sorry my bad english, i'm from brazil.

VPS Config:
1 GB Ram
1 Core 3.7Ghz
30GB HDD
100mbps
Ubuntu 12.04 LTS x86

Music Bot uses:
PulseAudio (Virtual Sound Card)
Audacious (Music Player)
ThightVNCServer
TeamSpeak 3 Client
 

Supervisor

Administrator
Apr 27, 2015
1,863
2,546
335
First make sure the audio quality in the channel you play the music in is set to Opus Music.
Other than that.. Maybe your RAM is not sufficient?
 

Asphyxia

Owner
Administrator
Apr 25, 2015
1,844
2
2,197
327
That sounds like an issue with "PulseAudio (Virtual Sound Card)" --- can you please check the memory utilization of the machine while the cracking/lagging is happening? Please type the "top" command in your terminal and post a screenshot of the results here.

I would also try a different music player and see if that helps. Please let us know whatever fixes it though. :)

If you can post up the "top" results, I may be able to further assist you.
 
Last edited:

Crazyhook

Member
Nov 22, 2015
24
6
35
Q1zDawx.jpg
 
Last edited by a moderator:

Asphyxia

Owner
Administrator
Apr 25, 2015
1,844
2
2,197
327
thanks, i've just solved an "audio sync" problem i had, using alsa instead of pulseaudio.

Can you try to switch from using PulseAudio to Alsa or Jack --- see if that helps? Also try switching from Audacious to http://www.musicpd.org/ and http://www.musicpd.org/clients/mpc/

Hi,

In fact it's much more easier to route sound on linux than on windows ;).

I'm currently running a TS3 client music bot on a linux server (no screen, no soundcard).

It's a bit complex so i won't explain in details how to setup all the demons. I hope that you have some linux knowledge and it can help you setup your own.

What i used :

- pulseaudio as the sound router : pipe sound between player output & ts3 client input (you could also use alsa or jack)
- Music Player Daemon (mpd) and its client mpc : the player that plays mp3 files on the server or a remote playlist.
- the TS3 client for linux (you need the QT libs and some other dependancies)
- Xfvb X server for running headless

Optionnal :
- vncserver to do the initial client setup and for troubleshooting (you can also redirect the X display to a remote X server)

I also have written a small python ts3 telnet client to command the player on the server directly from a ts3 channel text chat (#list, #play, #pause, #jump X,...)

Hope it can help you.

Try to follow this guy's tips, he had it setup and working using that although someone did say they tried Alsa and it worked. The best thing you can do is keep playing around with different configurations. I wish I had experience setting up a Linux bot for TeamSpeak 3 although I have only done this on Windows. :p

Once you get it working, please tell us here though to save someone else from the headache. If you have more questions, please ask and I will try to help.
 
Last edited:

ehthe

Retired Staff
Contributor
Apr 26, 2015
1,028
896
216
virtual cards (Alsa) support is shit in teamspeak.
More often that not, it crashes.
 

Asphyxia

Owner
Administrator
Apr 25, 2015
1,844
2
2,197
327
virtual cards (Alsa) support is shit in teamspeak.
More often that not, it crashes.
Do you have experience with which one seems to function the best between Pulse, Alsa, Jack?
 

ehthe

Retired Staff
Contributor
Apr 26, 2015
1,028
896
216
Well Jack is out of the question. There is no support for jack in teamspeak. Plus for a bot you don't need something as big as jack. Pulse seems to be the best standard option. But if you have time and patience (lots of it) you can edit .asoundrc (Alsa) and create some virtual mess.
 

Crazyhook

Member
Nov 22, 2015
24
6
35
The bot works fine, i asked various players on the server and reply is "Nice Bot" , "No stucks or lags","Never stoped"
the problem is my ISP and routes to server, i'm from brazil and the server on Canada, i think in "packet loses" to cause lags,distortion,stops
 

ehthe

Retired Staff
Contributor
Apr 26, 2015
1,028
896
216
In that case you should try different vpns to see if some fixe the issue.
 

Asphyxia

Owner
Administrator
Apr 25, 2015
1,844
2
2,197
327
The bot works fine, i asked various players on the server and reply is "Nice Bot" , "No stucks or lags","Never stoped"
the problem is my ISP and routes to server, i'm from brazil and the server on Canada, i think in "packet loses" to cause lags,distortion,stops
http://www.speedtest.net/ can you go here and share your result? Most likely you may want to get a VPN hosted in the United States of America, because I believe Brazil would have a good route to the USA. If I were you, I would run a speed test to a few different countries. Whichever country gives you the fastest connectivity/speed, that is where you may want to seek a VPN. It may even be helpful for you to find a VPN host right in Brazil.

I know PureVPN offers some VPN servers from Brazil. Maybe give them a try?

This image is pretty old, but it probably gives you an idea of the topography Brazil has. I am sure it has changed some, but it probably follows a similar path.

brazil_large.gif


This is a very cool network map also: http://www.submarinecablemap.com/#/landing-point/salvador-brazil

urwi5I0.png
 
Last edited:
Top