matthieugrieger / mumbledj

A Mumble bot that plays audio fetched from various media sites.
MIT License
170 stars 59 forks source link

Music doesn't start playing when I add a song. #30

Closed AmalieNot closed 9 years ago

AmalieNot commented 9 years ago

So I installed it (using Go 1.4.1), as well as installing ffmpeg and mercurial.

However, when I add a song, the music doesn't start playing. It seems to know the song is there, but is not playing it. image

After reading other issues, I made sure gopus and goprotobuf were installed. However, that does not seem to have fixed the issue.

I'm sure I'm doing something wrong, but do you know how to fix it?

matthieugrieger commented 9 years ago

Can you open up your Mumble client and navigate to Server -> Information and tell me what it says underneath the "Audio bandwidth" header?

AmalieNot commented 9 years ago

I've tried it in two servers with similar results. The first server says this: image

The second, which I'm hosting through linode, says this: image (Max 89 and 72 kbit/s, repectively, using Opus).

matthieugrieger commented 9 years ago

Hmm.. strange. I was expecting that the server was on the CELT audio codec. It should be working if your server is on Opus.

You didn't mention youtube-dl in your original post, do you have that installed (and up to date)?

AmalieNot commented 9 years ago

I did install it before setting up the bot. When I do "youtube-dl -U" it tells me it's up-to-date...

matthieugrieger commented 9 years ago

Another thing to maybe try... have you set opusthreshold in your /etc/mumble-server.ini or /etc/murmur.ini to 0? This forces Opus at all times, otherwise the server sometimes switches to CELT momentarily if a certain percentage of users don't support Opus.

AmalieNot commented 9 years ago

I do also have that set to 0.

Pao-Lumu commented 9 years ago

I'm also experiencing issues. Similar server settings.

matthieugrieger commented 9 years ago

@AmalieNot, @evanjohnman:

I just tested out MumbleDJ on my own server and I am not experiencing the issue. Which distro are you two running? My instance of MumbleDJ is running on Ubuntu.

ghost commented 9 years ago

@matthieugrieger It may be worth doing some error checking here to see if ffmpeg was successfully started.

matthieugrieger commented 9 years ago

@bontibon: Good point. I'll remember to add that in.

AmalieNot commented 9 years ago

If you meant distro of mumbledj, I'm fully updated. I'm running ubuntu 14.10 on my server.

matthieugrieger commented 9 years ago

Oh, sorry, yeah I meant your Linux distro. I will have to look into this later as I am not quite sure what is causing problem. I'll post updates if I figure out anything.

Pao-Lumu commented 9 years ago

Ubuntu 14.04.1 64-bit. Client

matthieugrieger commented 9 years ago

@bontibon: Could this possibly be related to this commit: https://github.com/layeh/gumble/commit/8f7277e3e110aa653534702e1871026208013533?

I have struggled with situations where libav and ffmpeg clash with each other before on Ubuntu.

Pao-Lumu commented 9 years ago

Dang. I figured that was the issue.

matthieugrieger commented 9 years ago

@evanjohnman: If possible, could you try removing avconv from your system? I believe it is a part of the package called libav-tools. If you can't remove it for some reason, no worry.

Pao-Lumu commented 9 years ago

Will do.

Pao-Lumu commented 9 years ago

Not showing up. Checking aptitude.

matthieugrieger commented 9 years ago

@AmalieNot, @evanjohnman: Are you two still having issues with getting the audio to play?

Pao-Lumu commented 9 years ago

I was unable to find that codec in aptitude. I'll look again now.

Pao-Lumu commented 9 years ago

Think I found it. (Didn't want Audacity on this anyway.

matthieugrieger commented 9 years ago

Let me know if you find out anything.

Pao-Lumu commented 9 years ago

I've removed libavtools, etc from my machine... Unfortunately, I had to SSH it from my phone and couldn't test it. I tried connecting it to a private server (with opus forced, running off RPi :P) but I wasn't able to get it to respond to my mumble app.

This is likely a bug with my iPhone, but it (mumdj) ran without error from SSH. I hope this is just a glitch with the app. I'll report any further bugs to you, should I encounter any more.

Pao-Lumu commented 9 years ago

The issue was not fixed, although I need to try rebooting my PC.

Pao-Lumu commented 9 years ago

Tried reboot; no change.

Posting 'make install' script output:

mkdir -p ~/.mumbledj/config mkdir -p ~/.mumbledj/songs if [ -a ~/.mumbledj/config/mumbledj.gcfg ]; then mv ~/.mumbledj/config/mumbledj.gcfg ~/.mumbledj/config/mumbledj_backup.gcfg; fi; /bin/sh: 1: [: -a: unexpected operator cp -u mumbledj.gcfg ~/.mumbledj/config/mumbledj.gcfg sudo cp -f mumbledj /usr/local/bin/mumbledj

There seems to be a messed up operator. Maybe it's related to that.

AmalieNot commented 9 years ago

I have the same make output. I'll look for libavtools now - sorry, some things came up that took me afk for a bit.

Pao-Lumu commented 9 years ago

Question: what is the minimum version of opus required to run this? Because my install defaulted to the 1.0 release, and 1.2 is available.

AmalieNot commented 9 years ago

I don't appear to have avconv or libav-tools installed. I'm wondering about the opus version thing myself.

matthieugrieger commented 9 years ago

@evanjohnman: I'm not sure what is going on with your make install output. Running make install on my Ubuntu installation doesn't cause any errors.

Also, via dpkg -s libopus0 I am running version 1.1 of opus. It wouldn't hurt to update opus, so I'd try that.

Just to be clear, did both of you have a working installation of MumbleDJ before? Or did the audio never work?

Pao-Lumu commented 9 years ago

Hmm... I need to test with the updated version of opus. (My old one returned 1.0, this says 1.1. Hope that clears it up.

On Saturday, January 31, 2015, Matthieu Grieger notifications@github.com wrote:

@evanjohnman https://github.com/evanjohnman: I'm not sure what is going on with your make install output. Running make install on my Ubuntu installation doesn't cause any errors.

Also, via dpkg -s libopus0 I am running version 1.1 of opus.

— Reply to this email directly or view it on GitHub https://github.com/matthieugrieger/mumbledj/issues/30#issuecomment-72348599 .

Evan

matthieugrieger commented 9 years ago

@evanjohnman: Let me know what happens. I just fully updated my server, updated/recompiled MumbleDJ, rebooted my server (which has MumbleDJ and my Mumble server), and it still works fine for me.

Pao-Lumu commented 9 years ago

Audio has not worked yet. It download the files into the ~/.mumbledj/music folder and then doesn't play the music

Pao-Lumu commented 9 years ago

@matthieugrieger All I can say is, it's the part that @bontibon Pointed out that is causing the issue. opus, mercurial, and ffmpeg are all installed correctly.

matthieugrieger commented 9 years ago

@evanjohnman: Can you update to the newest release and give me the output when you try to play a song? Hopefully this will help us find the issue.

Pao-Lumu commented 9 years ago

Will do!

Pao-Lumu commented 9 years ago

Words cannot express how irritated I am at this right now. panic, it did not. ;-;

matthieugrieger commented 9 years ago

Huh. So it didn't panic, but it also didn't play audio?

Sorry about the frustration. I'm trying my best to figure it out but it's hard to test it when I don't have the same problem on any of my machines.

Pao-Lumu commented 9 years ago

Yes. And now with the latest release I can't build.

I apologize for being a problem child.

./commands.go:273: cannot call non-function dj.audioStream.Volume (type float32) ./commands.go:278: dj.audioStream.SetVolume undefined (type gumble_ffmpeg.Stream has no field or method SetVolume) ./commands.go:279: cannot call non-function dj.audioStream.Volume (type float32) ./main.go:54: dj.audioStream.Done undefined (type gumble_ffmpeg.Stream has no field or method Done) ./main.go:55: dj.audioStream.SetVolume undefined (type *gumble_ffmpeg.Stream has no field or method SetVolume)

matthieugrieger commented 9 years ago

That build error signifies to me that something on your end isn't installed correctly. I receive no build errors, and I test if each release builds before I release it.

Are you sure that you have gumble_ffmpeg installed correctly? I would check the src folder in your Go root to make sure that gumble_ffmpeg is there and isn't corrupted or anything.

In your src folder, gumble_ffmpeg should be located at github.com/layeh/gumble.

ghost commented 9 years ago

@matthieugrieger I have been updating gumble_ffmpeg today. It may be worth looking into a dependency manager for mumbledj. That would prevent your program from breaking when other people (in this case, me) make API changes in their projects.

matthieugrieger commented 9 years ago

@bontibon: Thanks for the suggestion. I'm still getting the hang of Go, so I don't know all the best practices yet. :)

I'll add something like goop later. On Feb 2, 2015 12:21 PM, "Tim Cooper" notifications@github.com wrote:

@matthieugrieger https://github.com/matthieugrieger I have been updating gumble_ffmpeg today. It may be worth looking into a dependency manager for mumbledj. That would prevent breaking your program from breaking when other people (in this case, me) make API changes on their projects.

— Reply to this email directly or view it on GitHub https://github.com/matthieugrieger/mumbledj/issues/30#issuecomment-72530125 .

AmalieNot commented 9 years ago

Okay, I went to update this today via the "make clean, make, make install" directions you provided and get this output from "make":

go get -u github.com/layeh/gumble/gumble go get -u github.com/layeh/gumble/gumbleutil go get -u github.com/layeh/gumble/gumble_ffmpeg go get -u code.google.com/p/gcfg go get -u github.com/kennygrant/sanitize go get -u github.com/jmoiron/jsonq go build .

_/home/strongsuit/mumbledj

./commands.go:273: cannot call non-function dj.audioStream.Volume (type float32) ./commands.go:278: dj.audioStream.SetVolume undefined (type _gumble_ffmpeg.Strea m has no field or method SetVolume) ./commands.go:279: cannot call non-function dj.audioStream.Volume (type float32) ./main.go:54: dj.audioStream.Done undefined (type gumble_ffmpeg.Stream has no f ield or method Done) ./main.go:55: dj.audioStream.SetVolume undefined (type gumbleffmpeg.Stream has no field or method SetVolume) Makefile:4: recipe for target 'mumbledj' failed make: ** [mumbledj] Error 2

matthieugrieger commented 9 years ago

@AmalieNot: That's a bug with the make process at the moment.

I will be adding a dependency manager later to help counteract this. I would do it now but I am in class. :) On Feb 2, 2015 12:54 PM, "AmalieNot" notifications@github.com wrote:

Okay, I went to update this today via the "make clean, make, make install" directions you provided and get this output from "make":

go get -u github.com/layeh/gumble/gumble go get -u github.com/layeh/gumble/gumbleutil go get -u github.com/layeh/gumble/gumbleffmpeg go get -u code.google.com/p/gcfg go get -u github.com/kennygrant/sanitize go get -u github.com/jmoiron/jsonq go build . /home/strongsuit/mumbledj

./commands.go:273: cannot call non-function dj.audioStream.Volume (type float32) ./commands.go:278: dj.audioStream.SetVolume undefined (type

_gumble_ffmpeg.Strea m has no field or method SetVolume) ./commands.go:279: cannot call non-function dj.audioStream.Volume (type float32) ./main.go:54: dj.audioStream.Done undefined (type gumble_ffmpeg.Stream has no f ield or method Done) ./main.go:55: dj.audioStream.SetVolume undefined (type gumbleffmpeg.Stream has no field or method SetVolume) Makefile:4: recipe for target 'mumbledj' failed make: ** [mumbledj] Error 2

— Reply to this email directly or view it on GitHub https://github.com/matthieugrieger/mumbledj/issues/30#issuecomment-72535566 .

AmalieNot commented 9 years ago

Thank you!

hamilton5 commented 9 years ago

!add https://www.youtube.com/playlist?list=PLFgquLnL59alW3xmYiWRaoz0oM3H17Lth

would not start playing or even acknowledge it was added... I added another song after and nothing happened... I did a !reset and then got a crash (panic:runtime error: index out of range) .

try this for an instant crash; an invalid playlist url: !add https://www.youtube.com/playlist?list=RD_1phPo or a !reset when nothing is playing or added to queue (panic: nothing playing)

matthieugrieger commented 9 years ago

@AmalieNot, @evanjohnman, @hamilton5: The build issues have been fixed in the latest release. Sorry about that!

I will be adding a dependency manager to prevent problems like this from happening in the future.

hamilton5 commented 9 years ago

I have successfully built the new version... the issue with invalid playlist url still stands.

AmalieNot commented 9 years ago

Well, that was exciting.

So, when I add a song now, this is what happens:

root@munin:/home/strongsuit/mumbledj# screen -S mumblebot runtime.goexit() /usr/local/go/src/runtime/asm_amd64.s:2232 +0x1

goroutine 6 [select]: github.com/layeh/gumble/gumble.(_Client).pingRoutine(0xc20806c000) /root/go/src/github.com/layeh/gumble/gumble/client.go:166 +0x2dc created by github.com/layeh/gumble/gumble.(_Client).Connect /root/go/src/github.com/layeh/gumble/gumble/client.go:112 +0x485

goroutine 10 [IO wait]: net.(_pollDesc).Wait(0xc208010df0, 0x72, 0x0, 0x0) /usr/local/go/src/net/fd_poll_runtime.go:84 +0x47 net.(_pollDesc).WaitRead(0xc208010df0, 0x0, 0x0) /usr/local/go/src/net/fd_poll_runtime.go:89 +0x43 net.(_netFD).Read(0xc208010d90, 0xc20800f000, 0x1000, 0x1000, 0x0, 0x7fbcb6bd4d70, 0xc20812cb30) /usr/local/go/src/net/fd_unix.go:242 +0x40f net.(_conn).Read(0xc20802e080, 0xc20800f000, 0x1000, 0x1000, 0x0, 0x0, 0x0) /usr/local/go/src/net/net.go:121 +0xdc net/http.noteEOFReader.Read(0x7fbcb6bd6400, 0xc20802e080, 0xc208060ec8, 0xc20800f000, 0x1000, 0x1000, 0x748e60, 0x0, 0x0) /usr/local/go/src/net/http/transport.go:1270 +0x6e net/http.(_noteEOFReader).Read(0xc20801e9e0, 0xc20800f000, 0x1000, 0x1000, 0xc208012000, 0x0, 0x0)

:125 +0xd4 bufio.(_Reader).fill(0xc20800a6c0) /usr/local/go/src/bufio/bufio.go:97 +0x1ce bufio.(_Reader).Peek(0xc20800a6c0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0) /usr/local/go/src/bufio/bufio.go:132 +0xf0 net/http.(_persistConn).readLoop(0xc208060e70) /usr/local/go/src/net/http/transport.go:842 +0xa4 created by net/http.(*Transport).dialConn /usr/local/go/src/net/http/transport.go:660 +0xc9f goroutine 11 [select]: net/http.(_persistConn).writeLoop(0xc208060e70) /usr/local/go/src/net/http/transport.go:945 +0x41d created by net/http.(_Transport).dialConn /usr/local/go/src/net/http/transport.go:661 +0xcbc In mumble, this is what happened: ![image](https://cloud.githubusercontent.com/assets/8811239/6013113/24798ea6-ab1e-11e4-94ba-e16fbe62d297.png)
hamilton5 commented 9 years ago

@AmalieNot it concerns me you run things like this as root.

AmalieNot commented 9 years ago

It's a clean server install I have no issue wiping. I was having some other minor issues with my other server install.