Hack:Streamup
From Music Player Daemon Community Wiki
streamup.sh was made because I wanted my wife to be able to stream from our MPD server, with a no muss, no fuss type player, so I created a tiny script to call ogg123 or kill it, and bound it to CTRL-ALT-S. The only modification you should need is to change the stream.
#!/bin/bash if [[ -f /tmp/stream_playing && `pidof ogg123` ]] then # You may want to put MPD_HOST="remote_host" mpc pause or mpc stop here kill `cat /tmp/stream_playing` rm -f /tmp/stream_playing else # You may want to put MPD_HOST="remote_host" mpc play here ogg123 -q http://shapeshifter:8000/mpd-10.ogg & echo $! > /tmp/stream_playing fi
Yet another way of doing it is to replace the ogg line with:
screen -D -m ogg123 -q http://shapeshifter:8000/mpd-10.ogg &
This will make it where if X exits for one reason or another the music will continue.
- Author: avuton
