SinusBot youtube-dl Installation Guide

person ssamjhfolder_openTutorialslocal_offer, , , access_time 06/07/2017

This is just a short guide on how to install youtube-dl and set it up to work with SinusBot.

You may also want to read my SinusBot Installation Guide or my SinusBot Bootscript Installation Guide.
But anyway enough blah blah lets get into it!

 

First install curl so we can download youtube-dl

apt-get update && apt-get install curl python -y

 

Next we need to download youtube-dl and change it’s permissions. You can install it anywhere you want, but if you use the commands below you can run youtube-dl from anywhere on your server and it will work.

curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
chmod a+rx /usr/local/bin/youtube-dl

Done, you just installed youtube-dl! If you need to upgrade it, just re-run the commands above. And if SinusBot stops playing videos, youtube-dl probably needs upgrading 😛

 

Now time to tell SinusBot where the file is. So change to the directory that you installed it in, if you followed my installation guide it will be in /home/sinusbot.

cd /home/sinusbot

 

Next, open the config.ini file in your favorite editor, I use nano.

nano config.ini

 

And change the line

YoutubeDLPath = ""

to (this is where we installed it to if you installed youtube-dl to a different directory just change it below)

YoutubeDLPath = "/usr/local/bin/youtube-dl"

and then exit and save the file (press Ctrl+x, then enter and then y).

 

And then restart SinusBot, if you followed my Bootscript guide, just type

service sinusbot restart

 

If you run into issues with youtube-dl not working at all, you might find that YouTube has blocked your IP. I have noticed this happens on mainly OVH servers or people who re-sell OVH etc. You can solve this issue by running this single command below.

echo '--force-ipv4' > /etc/youtube-dl.conf

 

And that is it! Good luck with your SinusBotting 😉