I am trying to play a radio station WETA FM from a systemd service. I think the problem is that the URL source goes through port 80 and therefore the radio doesn't play after reboot.
It plays fine with systemctl commands below, but not after reboot:
sudo systemctl daemon-reload
sudo systemctl enable weta_stream.service
sudo systemctl start weta_stream.service
Here is the basic command:
ffplay -hide_banner -loglevel error http://26283.live.streamtheworld.com:80/WETAFMAAC -autoexit -nodisp
Here is my calling python script, works fine <streamweta.py>:
import os
import sys
cmdline = 'ffplay -hide_banner -loglevel error http://26283.live.streamtheworld.com:80/WETAFMAAC -autoexit -nodisp'
os.system(cmdline)
Here is my <weta_stream.service>
[Unit]
Description=WETA Stream
Wants=network-online.target
After=network-online.target nss-lookup.target
After=multi-user.target
[Service]
ExecStart=/usr/bin/python3 /home/larry/pi/aetv/weta/streamweta.py
User=larry
[Install]
WantedBy=multi-user.target
What am I missing? I tried various things based on searches but none worked and all were related to a Pi web server listening to port 80 which is not applicable.
systemctl status weta_stream
after a reboot and before you try to run it manually.