Here's a little program that allows you to play songs (or anything) from YT via CLI
- I wanted to do it.
- I just needed to get rid of Spotify and Youtube at work for listen to music.
- Need something minimalist that just do the work without a fatty GUI.
- Need something that (please) DO NOT DOWNLOAD the damn whole video.
- I wanted to do it.
Maybe its not the best implementation of the idea, but works for me, and I hope it works for you too.
Any new idea or request, just ask me please :D
-
Dependencies:
vlc player
bs4 (BeautifulSoup)
requests
colorama
youtube-dl
-
Clone & run
git clone https://github.com/jcatala/youtipy
cd youtipy
- for vlc:
sudo pacman -S vlc
archapt install vlc
debian
pip3 install -r requeriments.txt --user
python3 main.py
- start the program:
python3 main.py
- search for song:
$ >> search rick astley
- add a song to the queue (From previusly searched term):
$ >> add song_id
- add song just with the name:
$ >> play rick astley never gonna give you up
- print the current queue:
$ >> queue # or $ >> q
- skip the current song:
$ >> next
- pause / resume the current song:
$ >> pause $ >> resume
- Quit:
$ >> quit
- My music is not being played, This thing sucks! :
-
Try to check if cvlc lets you to stream any video, sometimes the lua script is outdated and crash with larger streams, if that is the case, do the following:
- copy the content of this file in to:
/usr/lib64/vlc/lua/playlist/youtube.luac (arch)
/usr/lib/i386-linux-gnu/vlc/lua/playlist/youtube.luac (ubuntu x86)
Then, try again :D !
-