Use this Python app to play Youtube audio on your Sonos speaker.
Working principle:
- grab the audio for the specified video link
- store it on a local shared network location
- instruct the Sonos speaker to play music from a local network storage
Use it over the command line:
python playYoutube.py https://www.youtube.com/watch?v=xxx
Use the gui:
python gui.py
The app relies on multiple libraries, the most important being:
To install them all, execute the command below.
sudo ./requirementsInstall.sh
Create a publicly accessible network share via SAMBA named "music" pointing to:
/srv/music
Create a directory named "youtube2sonos" inside the "music" directory. If this directory is missing, app will try to create it.
/srv/music/youtube2sonos
Create an application shortcut in Xubuntu:
- edit the file icon/youtube2sonos.desktop, by setting up the paths of the icon and the executable
- copy the file youtube2sonos.desktop to /usr/share/applications/
The music will be played on the first speaker the app finds.