View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 7 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Fri Jan 07, 2005 9:29 am 
Offline
Joined: Sat Jan 01, 2005 7:24 pm
Posts: 5
Seattle is home to one of the world's great public radio stations- KEXP. Outside of NPR, it's the only radio my wife or I listen to. I tried mythstream, but it was difficult for my wife to use. So, I mapped the "radio" button on my Hauppauge grey remote to launch their streaming feed in mplayer. Once launched, the volume controls work and the stop key kills the stream. I'm not much of a programmer, so please critique and/or improve upon my little script- it's simply a derivative of the "wife friendly" reboot solution.

Here's my /home/mythtv/.mythtv/lircrc (still a work in progress)
Code:
# lircrc.example.HauppaugeGrey-nativelirc
# 2003-09-17, Robert Kulagowski
# mailto:rkulagow@rocketmail.com
# Save this file in ~/.mythtv/lircrc

# Wife Friendly Feature
# needs work
# Power Button
begin
        prog = irexec
        button = POWER
        repeat = 4
        config = /usr/local/bin/mythpowerbutton.sh
end

# stream kexp
begin
    prog = irexec
    button = Radio
    config = /usr/local/bin/kexpbutton.sh
    repeat = 0
end

# jumpoints
begin
    prog = mythtv
    button = TV
# switch to live tv
    config = F5
end

begin
    prog = mythtv
    button = Blue
    config = F6
# mythweather module
end

begin
    prog = mythtv
    button = Pictures
    config = F7
# mythgallery module
end

begin
    prog = mythtv
    button = Music
    config = F8
# mythmuisc module
end

begin
    prog = mythtv
    button = Videos
    config = F12
# mythvideo module
end

# display help dialog
begin
    prog = mythtv
    button = Go
    config = F1 
end

begin
    prog = mythtv
    button = 1
    config = 1 
end

begin
    prog = mythtv
    button = 2
    config = 2 
end

begin
    prog = mythtv
    button = 3
    config = 3 
end

begin
    prog = mythtv
    button = 4
    config = 4 
end

begin
    prog = mythtv
    button = 5
    config = 5 
end

begin
    prog = mythtv
    button = 6
    config = 6 
end

begin
    prog = mythtv
    button = 7
    config = 7 
end

begin
    prog = mythtv
    button = 8
    config = 8 
end

begin
    prog = mythtv
    button = 9
    config = 9 
end

begin
    prog = mythtv
    button = Back/Exit
    config = Esc
end

begin
    prog = mythtv
    button = 0
    config = 0 
end

begin
    prog = mythtv
    button = Guide
    config = M 
end

# Below are keys used with the Hauppauge Grey remote

begin
   prog = mythtv
# This is the Red key
# We'll use it for "Delete"
   button = Red
   config = D 
end

begin
   prog = mythtv
# We'll use it for "Information"
   button = Menu/i
   config = I 
end

# Note the "repeat =" strings in the volume and channel.
# This means that if you hold down the key, every nth instance will be
# passed.  This depends on your system, so you may want to increase or
# decrease this and see what happens.  repeat = 1 is probably too
# fast.

begin
  prog = mythtv
  button = Vol-
  repeat = 3
  config = F10 
end

begin
  prog = mythtv
  button = Vol+
  repeat = 3
  config = F11 
end

begin
    prog = mythtv
    button = Up
# This is the "up" on the central diamond
    repeat = 3
    config = Up
end

begin
    prog = mythtv
    button = Down
# This is the "down" on the central diamond
    repeat = 3
    config = Down
end

begin
    prog = mythtv
    button = Left
# This is the "left" on the central diamond
    repeat = 3
    config = Left
end

begin
    prog = mythtv
    button = Right
# This is the "right" on the central diamond
    repeat = 3
    config = Right
end

begin
    prog = mythtv
# Middle button on the diamond
    button = Ok
    config = Return
end

begin
    prog = mythtv
    button = Mute
    config = F9 
end

# NA
begin
   prog = mythtv
# Change focus for PiP (to change channel in the other window)
   button = Blank
   config = B 
end

# NA
begin
   prog = mythtv
# Toggle PiP on/off
   button = Full
   config = V 
end

begin
    prog = mythtv
    button = Rewind
    config = < 
end

begin
    prog = mythtv
    button = Play
    config = P 
end

begin
    prog = mythtv
    button = Forward
    config = > 
end

begin
  prog = mythtv
  button = Record
  config = R 
end

# NA
begin
   prog = mythtv
# Teletext
   button = blank
   config = T 
end

begin
    prog = mythtv
    button = pause
    config = P 
end

begin
   prog = mythtv
   button = Replay/SkipBackward
# Use for backwards commercial skip
    config = Q 
end

begin
   prog = mythtv
   button = SkipForward
# Use for forward commercial skip
    config = Z 
end

#MPlayer
begin
   prog = mplayer
   button = BACK/EXIT
   config = quit
end
                   
begin
   prog = mplayer
   button = Stop
   config = quit
end

begin
   prog = mplayer
   button = Menu/i
   config = osd
end
                             
begin
   prog = mplayer
   button = Rewind
   config = seek -10
   repeat = 1
end
                                                             
begin
   prog = mplayer
   button = Forward
   config = seek +10
   repeat = 1
end

begin
   prog = mplayer
   button = Replay/SkipBackward
   config = seek -60
   repeat = 1
end

begin
   prog = mplayer
   button = SkipForward
   config = seek +60
   repeat = 1
end

begin
    prog = mplayer
    button = Pause
    config = pause
end

begin
   prog = mplayer
   button = VOL+
   config = volume +1
   repeat = 1
end

begin
   prog = mplayer
   button = VOL-
   config = volume -1
   repeat = 1
end

begin
   prog=mplayer
   button=Mute
   config=mute
end


And, here's the bash script /usr/local/bin/kexpbutton.sh
Code:
#!/bin/sh

i=`ps aux | grep mplayer | sed -e 's/.*grep.*//'`

if [ -n "$i" ]
then
        killall mplayer
else
        mplayer http://kexp-mp3-2.cac.washington.edu:8000
fi


Then, tell fvwm to launch irexec on login by adding this line to the bottom of /home/mythtv/.fvwm/.fvwm2rc
Code:
#Remove comment to start motion
#exec motion
#Start irexec for global buttons- KEXP and wife friendly feature
    exec irexec &
exec KnoppMyth-run
#exec mythfrontend
#Enjoy!  Cecil & Dale
#End


Make sure to chmod +x the bash script and set the permissions correct. Also, be aware that mythtv retains the remote's focus so that you can navigate the MythUI while the stream plays- I like to combine listening to KEXP with a gallery slide show.

Happy Friday everyone.
Mark


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 08, 2005 6:48 pm 
Offline
Joined: Thu Jul 08, 2004 9:58 am
Posts: 78
Location: va
this is fascinating, and what i have been looking for.

there is only one net radio station that i listen to.

Http://digitalgunfire.com

i was wondering if i could just swap out the stream address, and run it.

maybe if i feel brave next weekend i might give it a try.


Top
 Profile  
 
 Post subject: Yes Cheers
PostPosted: Wed Jan 19, 2005 3:48 pm 
Offline
Joined: Wed Dec 29, 2004 4:11 pm
Posts: 12
Likewise! I only listen to virgin radio.

It allows you download a .pls (Play list) from it's website, which xmms can then play. Unfortunatly myth doesn't seem to support pls files,

But your solution is excellent, well done!


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 22, 2005 9:48 am 
Offline
Joined: Tue Jan 18, 2005 12:11 pm
Posts: 100
Location: MA, USA
Greetings fellow KEXP fan! KEXP is the business! I used to live in Seattle, and listened on FM, then moved to the UK and now to MA, USA, and KEXP is the only station I can stand to listen to. I've turned many people onto it. Totally non-commercial, good music, good mix of recent and older stuff. In my opinion, the weekend programming (particularly 9am-midday), and many of the 6-9pm weekday evening programs are a bit weak, but the rest is superb. It's my workday background music all the time.

When I get other things set up properly, Ill be trying to get their real audio stream (~280kbit), which is much higher quality than their mp3 or wma streams (96kbit).


Top
 Profile  
 
 Post subject: Some updates
PostPosted: Sat Nov 05, 2005 9:39 pm 
Offline
Joined: Mon Feb 23, 2004 3:11 pm
Posts: 4
Location: Astoria, OR
Thanks for the great script. I also am a big KEXP fan.

I just installed R5A22, and I think they have changed from fvwm to fluxbox. There are two changes required.

Add this line to your /home/mythtv/.fluxbox/apps file towards the top.

Code:
[startup] {irexec  /home/mythtv/.mythtv/lircrc &}


And add the "&" to the mplayer command in /usr/local/bin/kexpbutton.sh like below
Code:
#!/bin/sh

i=`ps aux | grep mplayer | sed -e 's/.*grep.*//'`

if [ -n "$i" ]
then
        killall mplayer
else
        mplayer http://kexp-mp3-2.cac.washington.edu:8000 &
fi


enjoy!
magic


Top
 Profile  
 
PostPosted: Fri Nov 16, 2007 9:52 pm 
Offline
Joined: Mon Mar 27, 2006 7:13 am
Posts: 1
:o
Thanks fellas for the great tips.

KEXP is the best station out there.

Long live the WMPNNIB (Worlds Most Powerfull Non Nuclear Ice Breaker)

DMc


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 17, 2007 11:59 am 
Offline
Joined: Mon Jul 31, 2006 10:41 pm
Posts: 149
KEXP also has an uncompressed stream that could be used in the script. Here's what I have in my /myth/stream/streams.res

[item]
Radio
KEXP Live uncompressed
mms://media-wm.cac.washington.edu/KEXP-Uncompressed
[emptystring]
[emptystring]


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu