Closed christerjohansson closed 9 years ago
I am not sure about this at the moment, need to ask @dafoxia ...
But please change the first line in your own config from
def std_config()
into
def ext_config()
Then it should at least use your config. I changed that in the documentation, too. Missed it when dafoxia made the change.
/home/botmaster/.rvm/gems/ruby-2.2.1@bots/gems/mumble-ruby-1.1.2/lib/mumble-ruby/connection.rb:36:in read_message': undefined methodunpack' for nil:NilClass (NoMethodError)
I remember that message but not the reason and how to solve it ... maybe the config thing fixes that, too :)
Setting mumbleserver_host to 127.0.0.1 should be fine.
Ok, I changed my bot config accordingly and it now logs in to my server. But sound is all "choppy" however, is this due to bitrate?
Is your server limited? Check Server -> Information -> Audio Bandwidth maximum ...
If the limit is for example 72 kbit/s then the bots quality must be set around 40 kbits because it uses TCP mode and has much overhead.
Thanks for helping! :) My server has a limit of 100 kbit/s (Raspberry Pi). I've set the quality bitrate to 60 kbit/s, but I can't get it to play nice stream. In reality I have a mp3-file that I want to play instead of the stream that plays by default. Do you have a manual somewhere online where I can read more about the MP3-part?
I just talked to dafoxia. He tested the Mumble-Ruby-Pluginbot on Raspberry Pi I and II.
Pi I is too weak for even one bot. You need at least a Pi II.
Sorry, didn't realize that when reading your post.
Oh, ok. I do get the bot to play songs..but it is very distorted. I am merely running mp3's. I mean, I am running Kodi on a Raspberry Pi 1 and can easily decode 1080p...
I'll do some digging and open a new ticket in this "new" issue later.
Thanx for clearing things up. I will do some tinkering around and see if I can contribute somehow. :)
AFAIK the Pi uses hardware decoding for some video formats. The pluginbot does not.
The problem is not the decoding for the mp3. The bot has to encode the whole audio after decoding again as opus stream. Audio encoding take a lot more cpu power. Encoding / Decoding of lossy audio codecs is an asymetric thing.
Ok, I understand that your bot is using software to encode/decode and not hardware. Thing is, I know the RPi is very capable of streaming audio and video, since I use Kodi for my home entertainment system. I have "boosted" it a bit to run 900Mhz instead of the ordinary 700Mhz, and it runs smoothly with both audio and video. Kodi fetches my mp3-library from the network and plays it fine through my HDMI-connected reciever. My point is, maybe there is a way to make your plugin use hardware instead? Some way of telling MPD to decode/encode using hardware instead?
I followed your instructions and it went very smooth, no surprises or errors given. I rebooted my little Pi and Mumble-server works fine, but the Botmaster does not. I am not sure how to set the mumbleserver_host to 127.0.0.1 or what it is supposed to be, I am running it all on the same "box".
This is the output I get when running start.sh as the Botmaster (in su),
Killing running mpd instances of user "botmaster" daemon: cannot init supplementary groups of user "botmaster": Operation not permitted Updating youtube-dl... youtube-dl is up-to-date (2015.10.24) Killing running ruby scripts of user "botmaster" Using /home/botmaster/.rvm/gems/ruby-2.2.1 with gemset bots
Your bot(s) should now be connected to the configured Mumble server. Have fun with mumble-ruby-pluginbot :)
If something doesn't work, start this script with the additional parameter debug: ~/src/mumble-ruby-pluginbot/start.sh debug
Then take a look into the logfile within /home/botmaster/logs/.
Also make sure to run this script as user botmaster if you used the official installation documentation and DO NOT RUN THIS SCRIPT AS root.
Also please reread the official documentation at http://wiki.natenom.com/w/Mumble-Ruby-Pluginbot botmaster@mumbler:~$
And the pluginbots.log shows this output,
pluginbot is starting... Plugin ./plugins/version.rb geladen. Plugin ./plugins/ektoplazm.rb geladen. Plugin ./plugins/mpd.rb geladen. Plugin ./plugins/soundcloud.rb geladen. Plugin ./plugins/messages.rb geladen. Plugin ./plugins/bandcamp.rb geladen. Plugin ./plugins/radiostream.rb geladen. Plugin ./plugins/control.rb geladen. Plugin ./plugins/youtube.rb geladen. Plugin ./plugins/null.rb geladen. Config loaded! parse extra config Your config could not be loaded! start /home/botmaster/.rvm/gems/ruby-2.2.1@bots/gems/mumble-ruby-1.1.2/lib/mumble-ruby/connection.rb:36:in
read_message': undefined method
unpack' for nil:NilClass (NoMethodError) from /home/botmaster/.rvm/gems/ruby-2.2.1@bots/gems/mumble-ruby-1.1.2/lib/mumble-ruby/client.rb:194:inread' from /home/botmaster/.rvm/gems/ruby-2.2.1@bots/gems/mumble-ruby-1.1.2/lib/mumble-ruby/thread_tools.rb:8:in
block (2 levels) in spawn_thread' from /home/botmaster/.rvm/gems/ruby-2.2.1@bots/gems/mumble-ruby-1.1.2/lib/mumble-ruby/thread_tools.rb:8:inloop' from /home/botmaster/.rvm/gems/ruby-2.2.1@bots/gems/mumble-ruby-1.1.2/lib/mumble-ruby/thread_tools.rb:8:in
block in spawn_thread'This is my config for the bot1_conf.rb (part of it),
def std_config() puts "Config loaded!" @settings = { version: 2.0, main_tempdir: "/home/botmaster/temp/", ducking: false, chan_notify: 0x0000, controlstring: ".", debug: true, listen_to_private_message_only: false, listen_to_registered_users_only: true, use_vbr: 1, stop_on_unregistered_users: false, use_comment_for_status_display: true,
set_comment_available: false,
My server is a dedicated Raspberry Pi, Linux mumbler 3.18.11+ #781 PREEMPT Tue Apr 21 18:02:18 BST 2015 armv6l GNU/Linux PRETTY_NAME="Raspbian GNU/Linux 7 (wheezy)" NAME="Raspbian GNU/Linux" VERSION_ID="7" VERSION="7 (wheezy)"