Sunday, June 22, 2008

Linux mplayer

bash command to generate a valid playlist file

find /myth/music/direcoryname -name "*.mp3" -print > my.playlist

Now add this to your ~/.lircrc file

begin
remote = grayHauppauge
prog = irexec
button = green
repeat = 3
config = killall mplayer; mplayer -shuffle -quiet -playlist /myth/music/favorite.playlist
config = killall mplayer; mplayer -shuffle -quiet -playlist /myth/music/all.playlist
end

Every time the green button is pressed lirc runs the “config”ed command. This ineffect switches the playlists.

The playlist and gallery respond to the same button presses, i.e. next, prev, stop, etc. controlling one but not the other is troublesome. Maybe defining the number keys to do next/prev song would work.

Note that for the irexec to connect to lirc it must be running. The knoppmyth (and maybe other) start script is

/usr/local/bin/launch_irx.sh

* -playlist * -shuffle * -quiet

Forum Post for info on setting the mplayer command line to mplayer -fs -zoom -ao alsa -quiet -vo xv $s

Adding the -ao alsa line significantly boosted the volume.

No comments: