programs:linux:cvlc
Table of Contents
Information
- Headless VLC setup using cvlc
- Plays internet radio
- Remote Actions shortcut
Prerequisites
Dependencies
sudo apt install 'vlc-nox'
Volume
alsamixer
Service
- See Internet Radio Stations for more stations
sudo -e '/etc/systemd/system/vlc-dedi.service' && sudo systemctl daemon-reload && sudo systemctl enable 'vlc-dedi' && sudo systemctl start 'vlc-dedi' && sudo systemctl status 'vlc-dedi' -l
[Unit] Description=VLC Headless Internet Radio Player After=network-online.target pihole-FTL.service Wants=network-online.target [Service] Type=simple User=pi Group=pi Restart=always RestartSec=5 #~~~~~~~~~~ # Big B Radio #KPOP #ExecStart=/usr/bin/cvlc 'http://64.71.79.181:8042' #~~~~~~~~~~ # Blue Heron Radio #ExecStart=/usr/bin/cvlc 'http://sc6.shoutcaststreaming.us:8016' #~~~~~~~~~~ # Gensokyo Radio #ExecStart=/usr/bin/cvlc 'http://stream.gensokyoradio.net:8000/stream' #~~~~~~~~~~ # TRAP.FM ExecStart=/usr/bin/cvlc 'http://stream.trap.fm:6002' #~~~~~~~~~~ # Dubbase.FM #ExecStart=/usr/bin/cvlc 'http://stream.dubbase.fm:7002' #~~~~~~~~~~ # DrumandBass.FM #ExecStart=/usr/bin/cvlc 'http://stream.drumandbass.fm:9002' #~~~~~~~~~~ ProtectSystem=true PrivateTmp=true ProtectKernelTunables=true ProtectKernelModules=true ProtectControlGroups=true RestrictNamespaces=true MemoryDenyWriteExecute=true RestrictRealtime=true NoNewPrivileges=true PrivateUsers=true LockPersonality=true [Install] WantedBy=multi-user.target
Remote Actions
Station Change
ssh 'pi'@'192.168.1.158' -t "sudo -e '/etc/systemd/system/vlc-dedi.service' && sudo systemctl daemon-reload && sudo systemctl restart 'vlc-dedi'"
Stop
ssh 'pi'@'192.168.1.158' -t "sudo systemctl disable 'vlc-dedi' --now"
Start
ssh 'pi'@'192.168.1.158' -t "sudo systemctl enable 'vlc-dedi' --now"
Chromecast Notes
- Both Windows Firewall and firewalld from openSUSE TW actively block this; TODO: Figure out firewall rules
- Create speaker Group (not pair) and add all speakers to it
- Install PyChromecast
- Use it to scan for the speaker group URL and port
pip3 install PyChromecast
python
import pychromecast
chromecasts = pychromecast.get_chromecasts()
chromecasts
vlc.exe "http://198.50.158.92:10212/stream" --sout "#chromecast" --sout-chromecast-ip=192.168.1.231 --demux-filter=demux_chromecast --sout-chromecast-port=32077
1)
this is done to make sure cvlc starts after the DNS is up
C:/www/wiki/data/pages/programs/linux/cvlc.txt · Last modified: by 127.0.0.1