Over the past few weeks, I’ve been working on a script that downloads files from youtube, and then extracts the audio from them. Well, it dosn’t actualy, it just acts as a wrapper for several different programs that actualy do the work. It adds several fetures though:
Interactive execution
Search function
Tagging
Previews
Renaming and moving files
Its dependencies are:
youtube-dl – actual downloads the .flv files
pacpl – encodes the files
id3 – tags the files
All of these can be install via one command on archlinux systems:
sudo pacman -S id3 youtube-d; yaourt -S pacpl
once you have done that, you need to get the actual script. For this, we use git (pacman -S git) to download it. Once that is installed, we can fetch an up to date copy with the following comand.
git clone git://github.com/bluepeppers/Youtube-audio.git
Once that has been done, you will have a new folder called Youtube-audio in your current directory. Inside that will be another file called youtube-audio. That is the actual script. You can copy that to your personal bin directory, or if you want it to be acceseible globaly, to /usr/bin. Just remeber to make it executable with chmod 755.
Once that has been done, we can actual use the program. To execute it, just type youtube-audio into a comand line (Gui coming later). You will be asked if you want to enter the url of the video you want, or want to search for it. I suggest searching. You will be prompted to enter your search queary, and a list of the top 5 results will apear. After that you will go though a dialoug that will let you tag the file, rename it, and move it to some where apropriate. The program is still very immature, so let me know if any finds any problems.