[mythtv-users] working slimclient for myth - WAS mythmusic alternatives

Nick Rout nick at rout.co.nz
Sun Jul 8 02:11:49 UTC 2007


Phill Edwards wrote:
>> Any of you guys seen this post I put up last year, where I fiddled with the
>> transporter skin to make the softsqueeze client look a little more like
>> myth. slimserver is a great companion to myth for piping music around the
>> lan.
>>     
>
> Yes, I saw that and used it for a while - it was good. Unfortunately
> I've pretty much stopped using slimserver on MythTV now because I had
> bad window focus issues with the client. I think it may be related to
> running MythWelcome but to be honest I haven't really investigated.
>   

I have successfully integrated slimp3slave into mythtv as follows:

1. slimp3slave is an ncurses program that emulates the first generation 
slim players (the slimp3). It is a pretty simple program and pipes the 
mp3 stream to a player of your choice. By default it is madplay, which 
is a pretty good choice.       http://ex-parrot.com/~pdw/slimp3slave/

NB: It says on that home page that slimp3slave uses mpg123 by default, 
but the version available for download there (0.4) uses madplay.

2. My basic scheme is to fire up an xterminal (konsole actually) and run 
slimp3slave in there under remote control. slimp3slave normally operates 
from keyboard input which means that it is simple to make it work with 
lirc.

3. Firstly you obviously need a slimserver, which most distros now 
package I believe. Set that up and then try slimp3slave on the command 
line on your desktop. Run it like this:

slimp3slave -l -s storage

-l operates in lcd mode (emulating a slimp3 screen) while -s is the 
address of the computer that has the slimserver running (defaults to 
localhost if not specified). Play around with the controls and get 
familiar with it. the key bindings can be seen by running slimp3slave -h

Also you need to ensure madplay is installed and properly plays mp3's.

4. I found that the keybindings did not line up with what my remote was 
pumping out. The easiest solution for me was to hack the slimp3slave 
code to change the keycodes used. At the foot of this email is a diff at 
the point I am at with this now. You may need to fiddle with this to 
make it logical for your remote. Its very easy to compile, and only 
links against three libraries.

5. I used konsole as the terminal program as it is easy to set to use a 
big font so it fills the screen. (The slimp3 client LCD output is only 
40x2, so you might as well make it big and readable). I used a mouse and 
keyboard on my mythbox to make a konsole window full screen, set it to a 
nice colour scheme, made the font large, got rid of the menus, scrolbar 
and status line, then saved it as "default" settings. (NB I don't use 
this box as a desktop, so the fact that konsole is now set to dreadful 
defaults for daily use doesn't worry me). One option here might be to 
set konsole's background to be something from your favourite myth theme).

6. Add a menu entry for Slim Client to your menu system. If you copy 
/usr/share/mythtv/library.xml to the .mythtv directory in the home 
directory of the user that runs mythtv then the local version will be 
used instead of the /usr/share/mythtv version - and will survive 
upgrades. ie cp /usr/share/mythtv/library.xml ~/.mythtv/ Then add an 
entry like this:

   <button>
        <type>SLIM_CLIENT</type>
        <text>Slim Client</text>
        <action>EXEC konsole  -e /home/mythtv/slimp3slave -l -s 
storage</action>
    </button>

7. It should now work. OK its a bit ugly, but it has the advantage of 
working.

EXTRA - for spdif out.

I found you don't seem to be able to direct which alsa device madplay 
outputs to. I found that this command line worked:

<action>EXEC konsole  -e /home/mythtv/slimp3slave -l -s storage -c 
"madplay -R 48000 -Q - -o wave:- |aplay  -q  -
Dspdif2"</action>

slimp3slave options:
---------------------------
-c sets a different player than the default (which is "madplay -Q -"

madplay options:
----------------------
-R 48000 tells madplay to resample to 48000 Hz, otherwise it speeds up 
your 44100 Hz mp3's to chipmunk speed.

-o wave:- tells madplay to output a wave file to stdout

-Q quiet

- play stdin


aplay options:
------------------

-q  quiet

-Dspdif2 use alsa device spdif2 (which is peculiar to my system)

- play from stdin

diff of slimp3slave.c to change keybindings:
----------------------------------------------------------
nick at sf ~/tmp $ diff -Naur slimp3slave-0.4/slimp3slave.c 
slimp3slave-myth-0.4/slimp3slave.c
--- slimp3slave-0.4/slimp3slave.c       2004-02-16 07:51:45.000000000 +1300
+++ slimp3slave-myth-0.4/slimp3slave.c  2007-07-08 13:24:22.000000000 +1200
@@ -419,16 +419,16 @@
     //case KEY_PPAGE: ir = 0x7689807f; break; /* volup */
     case '!': ir = 0x768940bf; break; /* power */
     case '[': ir = 0x7689c03f; break; /* rew */
-    case ' ': ir = 0x768920df; break; /* pause */
+    case 'p': ir = 0x768920df; break; /* pause */
     case ']': ir = 0x7689a05f; break; /* fwd */
-    case KEY_IC: ir = 0x7689609f; break; /* add */
-    case KEY_DC: ir = 0x7689609f; break; /* add */
-    case '\r': ir = 0x768910ef; break; /* play */
+    case 'z': ir = 0x7689609f; break; /* add */
+    //case KEY_DC: ir = 0x7689609f; break; /* add */
+    case ' ': ir = 0x768910ef; break; /* play */
     case '/': ir = 0x768958a7; break; /* search */
     case '?': ir = 0x7689d827; break; /* shuffle */
     case 'r': ir = 0x768938c7; break; /* repeat */
     case 's': ir = 0x7689b847; break; /* sleep */
-    case KEY_HOME: ir = 0x76897887; break; /* now_playing */
+    case 'i': ir = 0x76897887; break; /* now_playing */
     case '+': ir = 0x7689f807; break; /* size */
     //case '*': ir = 0x768904fb; break; /* brightness */

@@ -839,11 +839,10 @@
 "\n"
 "Special Keys:\n"
 "    !                  Power\n"
-"    Enter              Play\n"
-"    Space              Pause\n"
-"    Insert             Add\n"
-"    Delete             Add\n"
-"    Home               Now Playing\n"
+"    Space              Play\n"
+"    p                  Pause\n"
+"    z                  Add\n"
+"    i                  Now Playing\n"
 "    [                  Rewind\n"
 "    ]                  Forward\n"
 "    /                  Search\n"



More information about the mythtv-users mailing list