From Amarok Wiki
|
| More moodbar screenshots |
Contents |
The Moodbar
The moodbar officially returns as of Amarok 1.4.4! It shows you the "mood" of a track, which you can then use to figure out when something interesting happens in the song.
In order for Amarok to analyze your music files to create moodbars, you will need the moodbar program (see below for downloads and binary packages). The moodbar package requires gstreamer and various plugins depending on the filetypes you use (see moodbar #Supported Filetypes). You will not need the Amarok gstreamer-engine.
The Moodbar of Amarok 1.4.0 has been entirely rewritten. There are two parts to the new moodbar implementation: the moodbar package, which contains a program that takes a music file and generates a .mood file, and support code in the Amarok source, which runs the binary and displays the moodbar. The moodbar package depends on the GStreamer libraries (not the Amarok GStreamer engine). Without the moodbar package, Amarok cannot generate the moodbars for your music.
There is also a small ruby script for managing your .mood files (e.g., for calculating all moodbars), which can be downloaded below.
The moodbar is as always originally due to Gavin Wood and Simon O'Keefe, who designed the algorithms; their original paper is here. This reimplementation is by QBob. Thanks to gruen0 for good ideas, code, and maintaining the ebuild. Huge props go to dangle for help troubleshooting.
Summary of Requirements
- A version of Amarok with a "Use moods" option in the General section of the configuration screen. You should tick this after you have met the other requirements.
- The Moodbar binary, in your PATH ( it should be listed upon running "which moodbar" from a console) -- Remember to configure the moodbar package with './configure --prefix=`pkg-config --variable=prefix gstreamer-0.10`'
- The GStreamer 0.10 library and plugins for the formats you want moodbar to be able to analyse
- The "Fastest Fourier Transform In The West" (http://www.fftw.org) FFTW library version 3.0 or above (at least single-precision floating point version - libfftw3f) -- Remember to configure the FFTW package with './configure --enable-single'
Usage
To enable the moodbar in Amarok, activate it in the Configuration (Settings -> Configure Amarok -> General -> Components -> Use Moods). There is no need to calculate the moods by hand, as Amarok automatically calculates moods when they are needed for display. Moodbars should now appear in the track sliders in the player window and the playlist window; there will also be a "Mood" column that you may add to your playlist.
Recently added to SVN: Amarok now displays moodbar in the systray tooltip if you have the moodbar column enabled, and optionally in the On Screen Display.
- Tip: if you want Amarok to calculate moods for all files in your collection, add your entire collection to the playlist, and scroll the playlist slowly enough to (briefly) show every track. If you change your mind, you can always clear the playlist; the mood calculations will be canceled.
- Alternatively, you can use the #Moodbar File Management Utility below to calculate all .mood files, as well as rename all of your .mood files from any old naming schemes.
Installation
Source Downloads
- Latest release: moodbar-0.1.2.tar.gz -- this is the moodbar source package, which contains the moodbar program (which generates .mood files from music files), and a GStreamer plugin that does the work. The moodbar package needs GStreamer 0.10.* installed, plus the 0.10.* version of various plugins. Be sure to install the moodbar package into the same prefix as GStreamer -- follow the instructions in the INSTALL file.
Please find QBob or gruen0 on IRC and send us a screenshot! If you find any bugs, please submit a bug report at http://bugs.kde.org.
Debian packages
A package for moodbar is now available in Debian unstable. Simply run apt-get install moodbar. You will likely also want to install gstreamer0.10-plugins-ugly, gstreamer0.10-plugins-good, and gstreamer0.10-plugins-bad for format support.
Kubuntu packages
A package for moodbar is available in the official package repository, just ensure the universe section is activated (which should be default anyway). Just install the package 'moodbar' with your prefered package manager (Adept, Synaptic). You will likely also want to install gstreamer0.10-plugins-ugly, gstreamer0.10-plugins-good, and gstreamer0.10-plugins-bad for format support.
Gentoo ebuilds
Moodbar is current available in Portage (for now as ~amd64 and ~x86). Unofficial ebuilds are no longer required.
RPM builds
If you are a rpm-based distro user, you can build a .rpm using `rpmbuild` with latest gstreamer-plugins-moodbar.spec. The binary package will be soon available for PLD-linux distro.
Contact vip for help with building rpm.
Fedora Core 6 (ZOD)
In order to build rpm for Fedora Core 6 distro, you must have rpm-build-macros installed. You can find it in PLD-linux distribution, it works fine with Fedora Core 6. Be sure to have all the libraries mentioned installed before proceeding to build and usage.
- Edit spec file. Delete lines from %banner to EOF i.e. lines 64-73 (ver. 1.6). This is because of error message while installing built rpm into system.
- Put edited .spec file into SPECS directory (e.g. /usr/src/redhat/SPECS)
- Put source.tar.gz into SOURCES directory (e.g. /usr/src/redhat/SOURCES)
- Run rpmbuild -bb (moodbar).spec in SPECS directory
Your newly built rpm can be located in RPMS directory (e.g. /usr/src/redhat/RPMS) Install gstreamer-moodbar-*.rpm.
openSUSE packages
If you are using openSUSE you can use the packages available in the repository located at http://software.opensuse.org/download/home:/d7/
To install, add the correct repository for your version of openSUSE to YaST (eg. if you are using openSUSE 10.2, add http://software.opensuse.org/download/home:/d7/openSUSE_10.2/ to the Install Sources in YaST) then make sure the following packages are installed:
- gstreamer010-plugins-ugly
- gstreamer10-plugins-moodbar
- mad
For details on how to add repositories, see the openSUSE wiki.
If you are using the Smart software management tool, add the channel by entering the following at the command line, remember to change the URL to match your version of openSUSE: "smart channel --add http://software.opensuse.org/download/home:/d7/openSUSE_10.2/home:d7.repo". Then enter "smart update home:d7". You can now install the required packages by "smart install gstreamer10-plugins-moodbar". Dependencies are resolved automatically.
FreeBSD
There is a port audio/gstreamer-plugins-moodbar.
To install the port: cd /usr/ports/audio/gstreamer-plugins-moodbar/ && make install clean
To add the package: pkg_add -r gstreamer-plugins-moodbar
Moodbar File Management Utility
QBob has written a ruby script for managing your .mood files. This is a standalone script that you run from the command line. It does two things:
- Calculates all your (uncalculated) .mood files, saving them in your home directory or with your music files, depending on your preferences
- Renames all your .mood files from any out-dated moodbar file naming schemes. This only applies to .mood files stored in your home directory.
Now you can moodbar your whole collection overnight! Unless you have a gigantic collection, in which case you can kill it and re-start it (I recommend killall moodbar_util.rb as opposed to control-C -- you'll see why if you try the latter).
You can download the script here: moodbar_util.rb
Troubleshooting
- If the moodbar executable gives you a "bus error", that almost always means it can't decode (or can't find) your file. Take a look at the supported file types below for ideas on which GStreamer plugins to install. You can also try the command below to test whether GStreamer can decode your file:
gst-launch filesrc location=[file] ! decodebin ! fakesink
- If you are using the ffmpeg plugin to decode mp3s, you may also receive mysterious bus errors. The solution is to stop using the ffmpeg plugin, as it is extremely buggy -- use mad instead.
- If the moodbar executable tells you that it can't find an element -- i.e, it gives an error message like "Could not create element of type fftwspectrum, please install it." -- that usually means that you either don't have the required plugins installed (see the plugin list here), or that you didn't install the moodbar package in the same prefix as GStreamer. If libmoodbar.so and libgstdecodebin.so are not in the same directory, then moodbar is not installed in the same prefix as GStreamer. Please read the INSTALL file for instructions on how to configure the moodbar package correctly. Alternatively, if you know what you're doing, it may be easier for you to take a look at the GST_PLUGIN_PATH environment variable.
- If you're wondering why the moodbar isn't working, either not working at all or not working for a particular file, run the command below, where [file] is a music file:
moodbar -o test.mood [file]
- If you have multiple versions of GStreamer installed, make sure all of the required plugins are installed for version 0.10.* -- different versions cannot use each other's plugins.
- In Gentoo, the plugin gst-plugins-mad-0.10.3 appears to be broken, which results in a Moodbar which cannot analyze your MP3 files. Emerge gst-plugins-mad-0.10.4 instead to make it work.
Supported Filetypes
You will need various gstreamer plugins to enable moodbar to analyze your files. Here is a list of the plugins you will need; make sure to install the 0.10.* version of each plugin:
- (everything)
- gstreamer-0.10.*, gst-plugins-base, and gst-plugins-good
- mp3
- gst-plugins-mad (in gst-plugins-ugly) -- the ffmpeg plugin has problems, so do not use it for mp3s
- ogg
- gst-plugins-vorbis and gst-plugins-ogg
- flac
- gst-plugins-flac
- mp4
- gst-plugins-faad and gst-plugins-bad
- musepack
- gst-plugins-musepack
- wma
- gst-plugins-ffmpeg
Please correct this list or ping gruen0 if you find this list is incorrect.
Screenshots
- dangle's systray tooltip - Yep, moodbar again :)
- dangle's OSD showing moodbar - These moods are popping up all over the place!
- Eean playing some Mozart - moodbar works well with classical
- QBob's moodbar (Frozen in the Arctic or Happy like a Rainbow) -- when the moodbar isn't loaded, the Mood column says "Queued..." or "Calculating..."; on a streaming source, the Mood column is blank
- dangle's moodbar (Happy Like a Rainbow) -- note that it handles very short and very long files correctly
- lfranchi's moodbar (Frozen in the Arctic)
- gruen0's moodbar: gonzo (note the sort-by-moodbar feature and the multiple music codecs used) and player window (pictured above)
- hurra's moodbar (Happy Like a Rainbow)
- vmlemon's moodbar (Happy Like a Rainbow)
- Mazoon's moodbar, the first screenshot after the svn merge
- Neverther's moodbar (Frozen in the Arctic)
- Mdx's moodbar Frozen in the Arctic on Amarok 1.4.3, baghira themed, Polish locale
