RSS

HOW-TO grab streaming last.fm audio data, write it to a file and listen to it at the same time

12 Feb

shell-fm, tee and vlc are just good enough:

man shell-fm-config:

extern = command
On some platforms, Shell.FM is still unable to play streams properly. This option enables you to use Shell.FM for stream control, but use another player for the playback. The stream will
be written to STDIN of the external player.

OK then, let’s edit our .shell-fm/shell-fm.rc:


extern = tee last.fm.mp3 | vlc -

in order to tell it to send its mp3 output tee which takes the data, writes it to the file last.fm.mp3 and passes a copy of the data to the STDIN which is then grabbed by vlc and played through (to stop the system I prefer to stop vlc first and then shell-fm):


$ shell-fm lastfm://artist/Brad+Mehldau/similarartists

Shell.FM v0.4, (C) 2007 by Jonas Kramer
Published under the terms of the GNU General Public License (GPL)

Press ? for help.

Receiving .
Now playing "Ron's Place" by Brad Mehldau.
VLC media player 0.8.6e Janus
libdvdnav: Using dvdnav version 0.1.10 from http://dvd.sf.net
libdvdread: Encrypted DVD support unavailable.
libdvdread: Can't stat -
No such file or directory
libdvdnav: vm: faild to open/read the DVD
[00000283] main playlist: stopping playback

$ ls -l last.fm.mp3
-rw-r--r-- 1 cas cas 800K 2009-02-12 20:08 last.fm.mp3

Thanks to Jonas Kramer for the wonderful shell-fm utility (and thanks to vlc and tee programmers). Thanks to Brad Mehldau for the nice jazz as usual.

PS: Don’t forget to check Emacs mode for shell-fm.

Advertisements
 
Leave a comment

Posted by on February 12, 2009 in General, Linux

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: