Just-Some-Bots / MusicBot

:musical_note: The original MusicBot for Discord (formerly SexualRhinoceros/MusicBot)
https://just-some-bots.github.io/MusicBot/
MIT License
3.14k stars 2.36k forks source link

Error on startup #169

Closed itsfolf closed 8 years ago

itsfolf commented 8 years ago

I runned all the commends on the wiki, but on my unbutu instance there's now ffmpeg so I installed it by this:

cd ~/ffmpeg_sources
wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
tar xjvf ffmpeg-snapshot.tar.bz2
cd ffmpeg
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
  --prefix="$HOME/ffmpeg_build" \
  --pkg-config-flags="--static" \
  --extra-cflags="-I$HOME/ffmpeg_build/include" \
  --extra-ldflags="-L$HOME/ffmpeg_build/lib" \
  --bindir="$HOME/bin" \
  --enable-gpl \
  --enable-libass \
  --enable-libfdk-aac \
  --enable-libfreetype \
  --enable-libmp3lame \
  --enable-libopus \
  --enable-libtheora \
  --enable-libvorbis \
  --enable-libvpx \
  --enable-libx264 \
  --enable-libx265 \
  --enable-nonfree
PATH="$HOME/bin:$PATH" make
make install
make distclean
hash -r

Now when I startup my bot I'm getting this error:

checkplys:~/workspace $ cd MusicBot-1.9.5rc7
checkplys:~/workspace/MusicBot-1.9.5rc7 $ python3.5 run.py
Connected!

Bot:   163398429555425280/Servidor
Owner: 96609345684406272/CheckPlys

Server List:
 - Magitech Discord

Not bound to any channels

Command prefix is !
Whitelist check is disabled
Skip threshold at 4 votes or 50%
Now Playing message @mentions are enabled
Autosummon is enabled
Auto-playlist is enabled
Downloaded songs will be deleted after playback

Deleting old audio cache
Attempting to autosummon...
Done!
Starting auto-playlist

[Download] Started: https://www.youtube.com/watch?v=VAo-t6bmGbo
[Download] Complete: https://www.youtube.com/watch?v=VAo-t6bmGbo
Task exception was never retrieved
future: <Task finished coro=<MusicPlayer._play() done, defined at /home/ubuntu/workspace/MusicBot-1.9.5rc7/musicbot/player.py:154> exception=ClientException('ffmpeg/avconv was not found in your PATH environment variable',)>
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/discord/voice_client.py", line 430, in create_ffmpeg_player
    p = subprocess.Popen(args, stdin=stdin, stdout=subprocess.PIPE)
  File "/usr/lib/python3.5/subprocess.py", line 950, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.5/subprocess.py", line 1544, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/home/ubuntu/workspace/MusicBot-1.9.5rc7/musicbot/player.py", line 184, in _play
    after=lambda: self.loop.call_soon_threadsafe(self._playback_finished)
  File "/usr/local/lib/python3.5/dist-packages/discord/voice_client.py", line 433, in create_ffmpeg_player
    raise ClientException('ffmpeg/avconv was not found in your PATH environment variable') from e
discord.errors.ClientException: ffmpeg/avconv was not found in your PATH environment variable

Anyone have some tutorial to install FFmpeg correctly?

junhui-f commented 8 years ago

sudo apt-get install ffmpeg -y

As recommended by the Wiki?

deansheather commented 8 years ago

The tutorial shows you how to install FFmpeg correctly for Ubuntu 14.04. If it didn't work, you need to compile it yourself, and it looks like you've tried that. I hope you maked with sudo...

What's the output of ffmpeg -version?

deansheather commented 8 years ago

Also, @Grift, it's:

sudo add-apt-repository ppa:mc3man/trusty-media -y
sudo apt-get install ffmpeg -y

Gotta have the apt-repo from ppa first. :joy:

junhui-f commented 8 years ago

😅👌