download youtube mp3 song from terminal or with GUI [debian, ubuntu]

for my pc:
install youtube-dl:
sudo apt-get install -y youtube-dl

download a song:
cd ~/Music/
youtube-dl --extract-audio --audio-format mp3 video_URL

for my pi:
sudo apt-get install -y youtube-dl

then update it with:
sudo pip install --upgrade youtube_dl

cd /var/lib/mpd/music
mkdir ytsongs
cd ytsongs/
youtube-dl --extract-audio --audio-format mp3 video_URL
mpc add ytsongs/songname.mp3

install gui:
based on:
https://github.com/MrS0m30n3/youtube-dl-gui
sudo apt-get install python-wxgtk3.0
sudo pip install youtube-dlg
#youtube download gui

start gui:
youtube-dl-gui

create starter / launcher:
cd ~/.local/share/icons
wget https://raw.githubusercontent.com/MrS0m30n3/youtube-dl-gui/master/youtube_dl_gui/icons/youtube-dl-gui_128x128.png
cd ~/.local/share/applications
nano youtube-dl-gui.desktop

[Desktop Entry]
Name=youtube-dl-gui
Comment=start youtube-dl-gui
Exec=youtube-dl-gui
Icon=/home/xxfreddyxx/.local/share/icons/youtube-dl-gui_128x128.png
Terminal=false
Type=Application
Categories=Application;Network;
StartupNotify=true
X-Desktop-File-Install-Version=3.0

update:
sudo pip install -U youtube-dlg
or
sudo pip install --upgrade youtube-dlg

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s