LinHES Forums
http://forum.linhes.org/

Possible to start a shoutcast stream from remote.
http://forum.linhes.org/viewtopic.php?f=17&t=16252
Page 1 of 1

Author:  Gibble [ Tue Aug 28, 2007 8:46 am ]
Post subject:  Possible to start a shoutcast stream from remote.

Hi,

I have an odd request, not sure if there's a way to make it work or not. When I listen to internet streams I almost always listen to the same shoutcast stream. But it takes too long to find the stream through the menus. I would love it if I could setup a button on my remote, to automatically switch to Internet streams, and start playing a specific stream. It would also allow me to not have to turn on the TV just to find the stream. I could just push the button, and it would be playing.

Is there any way I can hack this into working?

Thanks.

Author:  cecil [ Tue Aug 28, 2007 12:29 pm ]
Post subject: 

Well, I suppose mplayer can play the stream so a script like:
Code:
#!/bin/bash
mplayer http://shoutcast.com/blahblah/playlist.pls
Or something like that... I'd have a start stream and stop stream on the menu. If you search the forum, you'll find info on making a menu entry. To stop the stream, simply kill mplayer.

Author:  Gibble [ Tue Aug 28, 2007 12:44 pm ]
Post subject: 

That would work...not ideal, but it would work.

Thanks.

Author:  Gibble [ Sat Oct 27, 2007 12:11 am ]
Post subject: 

So I whipped up a little script and bound it to a button on my remote.

Code:
#!/bin/bash

pidfile=~/playChronix.pid

if [ ! -e "$pidfile" ]
then
        prog="mplayer http://www.chronixradio.com/chronixaggression/listen/listen.pls"
        $prog &
        PID=$!
        echo $PID > "$pidfile"
else
        pid2kill=`cat $pidfile`
        kill -9 $pid2kill
        rm $pidfile
fi

exit 0


added it to /home/mythtv/scripts/.lircrc as
Code:
# Play Shoutcast Stream
begin
prog = mythtv
button = blue
config = /home/mythtv/scripts/playChronix.sh
end


...but it doesn't work, if I just run the script on the command line, it's perfect. Not sure where to look to see what's wrong.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/