Stream high quality audio from YouTube
- Python 3.13.2
- VLC
- FFMPEG
- Edit
playnow.txt - Run:
python3 play.py
sudo apt install python3
sudo apt install pip
sudo apt install python3-psutil
sudo apt install python3-requestssudo apt install apache2 php libapache2-mod-php php-sqlite3 php-pdo-sqlite
cd /Jukebox
php -S 0.0.0.0:8080
python3 play.pyThen browse to: http://localhost:8080/play.html
chmod +x play.sh
./playInstall OpenAI dependencies:
pip install openai
export OPENAI_API_KEY="your_key"
sudo apt install pipx
pipx install openaiOr alternatively:
pip install openai --break-system-packagessudo apt install icecast2
sudo nano /etc/icecast2/icecast.xmlAdd the following configuration:
<listen-socket>
<port>8000</port>
<bind-address>0.0.0.0</bind-address>
</listen-socket>Optional: open it like http://jukebox:8080/play.html
# sudo hostnamectl set-hostname Jukebox
Add jukebox to your /etc/hosts file:
#sudo nano /etc/hosts
Add this line (or edit an existing one):
127.0.0.1 jukebox
Then you can open http://jukebox:8080/play.html locally
sudo apt update
sudo apt install avahi-daemon
sudo systemctl enable avahi-daemon
sudo chmod +x update-dns.sh
sudo ./update-dns.shsudo nano /etc/avahi/avahi-daemon.confAdd:
[server]
host-name=Jukebox
domain-name=local
[publish]
publish-addresses=yes
publish-hinfo=yes
publish-workstation=yessudo systemctl start avahi-daemon
sudo systemctl restart icecast2For advanced YouTube downloading capabilities, see: https://github.com/yt-dlp/yt-dlp
Enjoy streaming high-quality audio from YouTube with Jukebox!
