simple script to stream my favourite artists from youtube --no-audio --no-browser --no-player
Python script to fetch music videos from my favourite aritists and play them in background. Its a wrapper around youtube-dl and googlesearch python library.
- Reads configurations from conf.json and does a boolean search to generate links.
- Youtube-dl converts them to a link which can be streamed.
- mpc queue the links to mpd playlist
Any linux machine .
- mpd (music player daemon) & mpc
sudo apt install mpd mpc -y
- youtube-dl
sudo apt install curl -y sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl sudo chmod a+rx /usr/local/bin/youtube-dl
- python
- googlesearch
pip install google
- googlesearch
- ncmpcpp(optional) : n curses musicplayer client ++
- clone the repository
- edit conf.json to add your favourite artists
- change permissions of scripts
chmod 755 que_music.sh get_music.py
- run the bash script
./queu_music
Note that the scripts just queue the links - play with your favourite client - say ncmpcpp or just open another terminal after a few seconds and typempc toggle
- adding mashups in conf file may result in songs of various artists
- running this mutliple times may not work depending upon the number of artists and pause you are giving in between the searches .
you can increase the pause parameter in the get_music.py to avoid this.
Using fifo instead of files to get faster first songs