Contents
Album Tree
Detached Audio
With the detached audio plugin it is possible to play music in the background and leave the music menu in order to do something else, while the music keeps playing. For example you can have a look at the tv guide or play a game, or something similar...
To activate this plugin you just have to put the following in local_conf.py:
plugin.activate('audio.detach')
Now, if you press DISPLAY while a song is playing, the "song playing page" is hidden, and the song information is shown in the idlebar instead (if you have it activated and there is enough free place). You can then navigate in the usual way through your freevo menus, while the music keeps playing in the background. If you want to issue a command to the music playing application, you can reach it via a extra entry in your music menu, which is called show player. Selecting this entry brings up again the "song playing page".
NOTE: you can watch tv and videos while playing detached audio but you won't hear their audio.
Playlist
This plugin allows you to create playlists for all your media files. To activate it, simply add the following line in your local.conf.py:
plugin.activate( ‘audio.playlist’, args=( ‘/Path/To/Playlists’, ‘Naming_Scheme %m%d’ ) ) PLAYLIST_SUFFIX = [ ‘m3u’ ]
Now, from within Freevo, when you navigate to a particular file or directory you want to make a playlist, or playlist member, press the ENTER button on your remote (e on your keyboard) and select the option to Enqueue this Music in Playlist. Freevo will then, if necessary, create a file in your /Path/To/Playlists called Naming_Scheme 0311 (if you created the playlist on March 11th, for example), and add the highlighted file/directory as the first member of the playlist. You can continue to add files and directories to your newly created playlist by enqueueing more files/directories.
Afterward, you can create a new playlist by pressing the ENTER button on your remote (e on your keyboard) and selecting the ‘'Make a new Audio Playlist’'; however, the new playlist WILL OVERWRITE YOUR PREVIOUS ONE IF YOUR NAMING SCHEME DOESN’T TAKE THIS INTO CONSIDERATION!
Once your playlist is established, the only way to change the name of your playlist is to manually rename the playlist file: mv “Naming_Scheme 0311” “Rock & Roll”
You can also manually edit your playlist later by simply opening the file up in any text processor and changing its contents. Be aware, though, that a blank line in your playlist will make the plugin fail to parse the file.
xmms
If you want to use xmms for playing music instead of mplayer, you need this plugin.
1) Install xmms. Verify it operates correctly.
2) Install pyxmms. (under debian it is called python-xmms)
- Note: Make sure that you install pyxmms under the same version of python you use to run Freevo.
3) add this to your local_conf.py
plugin.activate('audio.fxmms') FXMMS_CMD = '/usr/bin/xmms'
4) additional setup (optional):
# Tell freevo to prefer fxmms for playing most audio # generally most people who want fxmms also want this, but it is not required. # Not setting this will force fxmms to take a back seat to audio.mplayer if it is active # generally i set this and still keep mplayer active since it supports net radio streams and many more formats. AUDIO_PREFERED_PLAYER = 'fxmms' # an optional parameter to tell freevo not to use FXMMS to play netradio (it doesn't support most of the formats) FXMMS_NETRADIO = 0 # an optional parameter, tells freevo that FXMMS can play the following files with those extensions. below is the # default but you can simply add more if you have xmms plugins that play other formats. FXMMS_SUFFIX = ['mp3','wav','ogg', 'mod']
Audio CD backup
Freevo can backup your audio CD's in mp3, ogg or wav format. To activate the plugin, add the following to local_conf.py
plugin.activate('audio.cdbackup')} }} The following variables also need to be added : Directory that you want to backup your audio CD to. {{{ AUDIO_BACKUP_DIR = '/music/MP3'
You can use any combination of the 4 variables below to create subdirectories, and filename of songs. The four variables are: genre, artist, album, and song. Whatever follows the last slash indicates how to create the filename. Everything before the last slash indicates the directory structure you would like to use -which will be appended to AUDIO_BACKUP_DIR.
CD_RIP_PN_PREF= '%(genre)s/%(artist)s/%(album)s/%(song)s'
This would give you something like: /music/MP3/metal/Metallica/And Justice For All/Blackened.mp3 (or Blackened.wav, Blackened.ogg) Here is another example which includes the artist and album in the filename:
CD_RIP_PN_PREF = '%(artist)s/%(artist)s - %(album)s - %(song)s'
This would give you something like: /music/MP3/Metallica/Metallica - And Justice For All - Blackened.mp3 cdparanoia is used to rip the CD to your hard drive. The actual command that will be executed is stored in CDPAR_CMD.
CDPAR_CMD = 'cdparanoia'
Lame is used for .mp3 encoding. The actual command that will be executed is stored in LAME_CMD
LAME_CMD = 'lame'
For ripping to .mp3 you can provide your own Lame encoder parameters for bitrate, algorithm, and various other lame options. Add your custom parameters in CD_RIP_LAME_OPTS.
CD_RIP_LAME_OPTS = '--vbr-new'
Likewise for Ogg format, the command is as below, and you can add your own custom ogg encoding options.
OGGENC_CMD ='oggenc' CD_RIP_OGG_OPTS = ' '
And for creating flac files it would be as below.
FLAC_CMD ='flac' FLAC_OPTS ='-8'
Finally, to actually backup an audio CD within Freeevo, when you are in the Music menu, highlight/choose a CD, then hit 'e' on keyboard or 'enter' on your remote control and you will be able to access the rip/backup menu.
Here is a list of all the above mentioned parameters for simple cutting and pasting:
#To activate the cdbackup plugin: plugin.activate('audio.cdbackup') #The following are for configuring the CD Audio backup plugin: AUDIO_BACKUP_DIR = '/music/MP3' CD_RIP_PN_PREF= '%(genre)s/%(artist)s/%(album)s/%(song)s' CDPAR_CMD = 'cdparanoia' LAME_CMD = 'lame' CD_RIP_LAME_OPTS = '--vbr-new' #You can leave this out if you never use ogg and it won't show up in the backup menu OGGENC_CMD ='oggenc' CD_RIP_OGG_OPTS = ' ' #You can leave this out if you never use flac and it won't show up in the backup menu FLAC_CMD ='flac' FLAC_OPTS ='-8'
Cover Search
This plugin will allow you to search for CD Covers for your albums. To do that just go to an audio item (e.g. Album) and press 'e' (on your keyboard) or 'ENTER' on your remote control. That will present you a list of options with Find a cover for this music as one item, just select it press 'enter' (on your keyboard) or 'PLAY' on your remote control and then it will search the cover in amazon.com.
Please Notice that this plugin use the Amazon.com web services and you will need an Amazon developer key. You can get your at: http://www.amazon.com/webservices, get that key and put it in a file named ~/.amazonkey or pass it as an argument to this plugin.
To activate this plugin, put the following in your local_conf.py.
If you have the key in ~/.amazonkey
plugin.activate( 'audio.coversearch' )
Or this one if you want to pass the key to the plugin directly:
plugin.activate( 'audio.coversearch', args=('YOUR_KEY',) )
Webradio
Previous versions of Freevo contained a webradio plugin, but now it's gone. It has been replaced by a fxd-file with container and audio tags. This fxd-file needs to be added to the list of AUDIO_ITEMS in your local_conf.py:
AUDIO_ITEMS = [ ('MP3 Audio', '/home/freevo/MP3'), ('WebRadio', '/home/freevo/fxd/webradio.fxd') ]
The webradio shows up as an option after your own Music Dirs and before your cdroms in the audio menu.
The fxd-file contains information on the available radio stations. An example of such a file can be found in the cvs repository.
A small excerpt from this file:
<?xml version="1.0" ?> <freevo> <container title="Web Radio" type="webradio"> <container title="Alternative"> <audio title="KQRX 95x"> <url>mms://media.apex2000.net/KQRX</url> </audio> <audio title="WBER 90.5 FM"> <url>rtsp://media.monroe.edu/encoder/live2.ra</url> </audio> <audio title="Heavy Metal Radio"> <url>http://war.str3am.com:7080</url> <info> <description>HeavyMetalRadio.com - The Loudest Site On The Internet!!!</description> <link>http://www.heavymetalradio.com</link> <bitrate>128</bitrate> </info> </audio> </container> </container> </freevo>
PleaseUpdate Add information on supported formats and links to existing fxd files
FM Radio
This is a plugin for the FM radio that is built into numerous TV capture cards. The plugin works by calling the radio application that is bundled with xawtv OR ivtv.
To activate the plugin add the following to your local_conf.py:
plugin.activate('audio.radioplayer') plugin.activate('audio.radio') RADIO_CMD='/usr/bin/radio' # for bttv cards OR RADIO_CMD = '/usr/bin/ivtv-radio -i /dev/video24' # for ivtv cards
Set radio stations in local_conf.py using the RADIO_STATIONS setting eg:
RADIO_STATIONS = [ ('Mai FM', '88.6'), ('1ZB', '89.4'), ('91', '91'), ('Channel Z', '94.2'), ('BFM', '95'), ('Hauraki', '99'), ('Life FM', '99.8') ]
You should then have a radio icon under your Audio section. This is all you should need to do (as of Freevo 1.6.3) to make FM radio work. If you are having issues try referring to the appropriate sections below.
DVB Radio
DVB radio can be played via the webradio plugin, yust add an entry like you would for a stream.
Edit webradio.fxd and add you station following this example:
<audio title="Kink FM"> <cover-img>/srv/freevo/data/covers/kink_fm.jpg</cover-img> <url>dvb://KINK_FM</url> <mplayer_options>-dvbin card=2 </mplayer_options> <info> <link>http://www.kinkfm.com</link> <bitrate>256</bitrate> <description>Kink FM - The Alternative.</description> </info> </audio>
The <url> entry contains the channel as found in four ~/.mplayer/channels.conf and the <mplayer_options> line contains the card number which should be used, the rest of the lines are like any other webradio.fxd
bttv card specifics (may be outdated)
(this is for bttv cards?)
Note: the use of btaudio for tuner audio (or any other alternative dsp device) is not supported at the moment.
However, it is possible to get btaudio to work by making minor modifications to radioplayer.py. In the play command add an extra os.system call after the radio call, this is an external call to sox which will copy the audio from /dev/dsp2 to /dev/dsp at the specified rate:
os.system('/usr/bin/sox -r 32000 -w -t ossdsp /dev/dsp2 -t ossdsp %s &')
In the stop command add an extra os.system call after the radio call:
os.system('killall -9 sox')
Obviously the above is a hack and could be made cleaner, but ideally a sox call would not be required.
ivtv card specifics (may be outdated)
The option for ivtv based cards like the WinTV PVR 350 would look like this.
Change the command line in the radioplayer.py to
os.system('%s -f %s &' % (config.RADIO_CMD, self.item.station))
and further down
os.system('killall -9 aplay')
Change the RADIO_CMD in your local_conf.py to
RADIO_CMD = '/usr/bin/ivtv-radio -d /dev/v4l/radio0 -i /dev/v4l/video24'
Be sure to substitute the above devices with yours. It depends on working with udev or devfs and on different tuners and ivtv versions. Play with it on the command line first. It's ugly and keeps filling my logs with "Radio Player IS PLAYING?" but it works.
MPD plugins
MPD http://www.musicpd.org/ or music player daemon allows remote access for playing music and managing playlists. Users with large music collections may prefer this system for their music.
MPD can be used in Freevo in two ways.
The older, simpler, plugin requires mpd and mpc installed, with mpd on "localhost:6600".
Put this in your local_conf.py to use this plugin (in all current versions as of 2008/01/12).
plugin.activate('mpd.py')
Another mpd plugin with more features and options is now in svn (2008/01/12). Use this code in local_conf.py to use this plugin.
MPD_SERVER_HOST='localhost' # the host running the mpd server MPD_SERVER_PORT=6600 # the port the server is listening on MPD_SERVER_PASSWORD=None # the password to access the mpd server MPD_MUSIC_BASE_PATH='/mnt/music/' # the local path to where the music is stored, must have trailing slash MPD_EXTERNAL_CLIENT='/usr/bin/pympd' # the location of the external client you want to use, or None # MPD_EXTERNAL_CLIENT_ARGS='' # arguments to be passed to the external client, or None [not in use yet] plugin.activate('audio.mpd_playlist') plugin.activate('audio.mpd_status')
For use on a network edit /etc/mpd.conf from localhost to your machine address. Using the same file, point mpd to your music directory.
Run this code to create the mpd database.
mpd --create-db
Install any other mpd client, either on your Freevo box or elsewhere on the network. MPD will tolerate up to 5 simultaneous client connections. Pympd http://pympd.sourceforge.net/ is an example of a standalone python based client. You can call a client installed on your Freevo box from within Freevo. Other music management systems eg Jinzora and Amarok have mpd client plugins.
3rd Party plugins
Most modules are now shipped with the core distribution. If not, add them there...