Tuesday, July 26, 2011

MP3 player with Jack output

When we're rehearsing a (new) cover-song with the band we sometimes need to listen to the song while rehearsing it (but only on the rear occasions -cough!- that one of us did not find the time to do his homework ;-)
We have our mixer and speakers set up, my laptop connected, so whats the problem ?  Just play the darn MP3 !  Well, no...

With the band we use Hydrogen for a number of songs.  Obviously Hydrogen uses the Jack audio server, but my default music player (Banshee) does not.  And even though there are options to connect Banshee to Jack with a little hacking, I wanted a plain and simple solution.
After giving up on the Banshee hack i took a look at the other obvious choices, but they all needed the same hack to get to work (most use the same gstreamer backend).
At some point i got VLC to work with Jack, but the problem with VLC is that it only enables it's jack outputs when a song is actually playing.  As soon as the song stops, the jack outputs are gone.

Finally i stumbled upon a very simple player that has been around for a while and does just what i need it to do. Alsaplayer is the name.

Alsaplayer has a number of 'output modules' that allow it to be connected to several audio systems, including Jack.  Installing the 'alsaplayer-jack' package automatically installed everything i need :-)

I added a shortcut on my desktop that starts up Alsaplayer with some extra options :

   alsaplayer -o jack -d system:playback_1,system:playback_2 -s MY-AlsaPlayer

-o jack makes sure that alsaserver starts with the Jack output module
The -d option specifies the outputs that it has to connect to (in my case this is system:playback_1 and _2 : the main system outputs)
-s MY-AlsaPlayer just gives alsaplayer a decent name in Jack.
(There are lots of other options that can come in handy > check the man pages)

After installing alsaplayer and creating the shortcut I launched alsaplayer and created a playlist containing all the songs we need for rehearsals.  As a nice bonus alsaplayer seems to remembers the last openen playlist and reopens it automatically whenever you launch alsaplayer :-)

I like simple apps like alsaplayer.  

1 comment:

  1. Hi I am reacting on this because I would like to see it work on Banshee Media Player that Jack Ctrl Server starts and then recognises the application of the media player Banshee. Have you tried with rhtyhmbox player yet? because it seems to work with stand alone players that don't carry the feature of plugins for large database directly reading. so only players that have the option to add manually a self-created playlist by hand and saved into a file, those will strangely only react with jackserver to play sound. that is a little not opensource. anyway I used to know before that rhythmbox seemed to work with jack. just I will let you know I will soon try it again, and then let you know, I am also having this problem but I am a stubborn person with wanting to work something so I am gonna try to look togehter with you to this problem. hopefully jack will soon learn the existence of banshee and automatic playlist players. gonna help you find out cause its frustrating. Kind Regards