* The GStreamer 0.10 library and [[Special:myLanguage/Amarok/Manual/Various/Moodbar#Supported Filetypes|plugins]] for the formats you want '''Moodbar''' to be able to analyse.

+

* The GStreamer 0.10 library and [[Special:myLanguage/Amarok/Manual/Various/Moodbar#Supported Filetypes|plugins]] for the formats you want '''Moodbar''' to be able to analyse. A GStreamer 1.0 based fork is also available, see [[Special:myLanguage/Amarok/Manual/Various/Moodbar#Source Downloads|below]].

<!--T:11-->

<!--T:11-->

Line 55:

Line 55:

<!--T:19-->

<!--T:19-->

:Latest release: [http://pwsp.net/~qbob/moodbar-0.1.2.tar.gz moodbar-0.1.2.tar.gz] &mdash; 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 [[Special:myLanguage/Amarok/Manual/Various/Moodbar#Supported Filetypes|various plugins]]. Be sure to install the Moodbar package into the ''same prefix'' as GStreamer &mdash; follow the instructions in the INSTALL file.

:Latest release: [http://pwsp.net/~qbob/moodbar-0.1.2.tar.gz moodbar-0.1.2.tar.gz] &mdash; 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 [[Special:myLanguage/Amarok/Manual/Various/Moodbar#Supported Filetypes|various plugins]]. Be sure to install the Moodbar package into the ''same prefix'' as GStreamer &mdash; follow the instructions in the INSTALL file.

+

+

As the Moodbar version above uses nowadays obsolete GStreamer 0.10 and the original source code link is dead, sources have been uploaded to [https://github.com/Mazhoon/moodbar GitHub] and a forked version supporting GStreamer 1.0 has been developed.

The Moodbar

The Moodbar 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 display moodbars for your music, 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 Supported filetypes). You will not need the phonon-backend-gstreamer package to create .mood files.

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. Without the Moodbar package, Amarok cannot generate the moodbars for your music.

As an alternative, there is a new script which will create moodbar files for tracks in an Amarok playlist; this is an exception to the above. The script needs nothing but Amarok to work, but it only creates the .mood files as they are played in the Playlist.

The Moodbar is due to the work of Gavin Wood and Simon O'Keefe, who designed the algorithms; their original paper is here.

Summary of 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. A GStreamer 1.0 based fork is also available, see below.

The Fastest Fourier Transform In The West (fftw.org) FFTW library version 3.0 or above (at least single-precision floating point version - libfftw3f) — If your platform does not provide this for you or you need to compile your own version, remember to configure the FFTW package with

./configure --enable-single

A version of Amarok with a Use moods option in the General section of the configuration screen. This means 1.4.4 or higher in the 1.4 series or 2.2.2 or higher in the 2.x series.

Information

Systems with package managers should automatically install the GStreamer plugins and FFTW along with the Moodbar package; this information is provided mostly for people who want or need to compile from source or manually install packages.

Usage

Currently .mood files must be generated manually. Amarok cannot do it for you. To do this for your entire collection, use the Moodbar File Generation Script described below.

To enable the display of moodbars in Amarok, activate it in the configuration: Settings -> Configure Amarok -> General -> Show Moodbar in Progress Slider. Moodbars should now appear in the track sliders in the player window and Playlist; there will also be a mood field that you may add to your playlist layouts.

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.

As the Moodbar version above uses nowadays obsolete GStreamer 0.10 and the original source code link is dead, sources have been uploaded to GitHub and a forked version supporting GStreamer 1.0 has been developed.

Debian packages

. You will likely also want to install gstreamer0.10-plugins-ugly, gstreamer0.10-plugins-good, and gstreamer0.10-plugins-bad for format support.

Kubuntu and Ubuntu 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 preferred package manager (Kpackagekit, Aptitude, 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.

FreeBSD

Moodbar File Generation Script

Here is a simple bash script that will add .mood files to your entire collection. It adds mood files for all files matching the extensions in the current directory and all subdirectories, so it's best run from the base of your music directory.

Copy and paste the above into a text file named moodbar.sh in your music directory and run the following commands:

cd /path/to/music
bash moodbar.sh

Alternatively if the above does not work, you may try:

chmod +x moodbar.sh
./moodbar.sh

This may take a very long time for large collections! Note that the moodbars will not appear in Amarok until Amarok rescans the collection. The generated mood files will be dotfiles (i.e., prefixed with a full stop), or hidden files - so keep this in mind if you can't find any generated mood files.

The links are not available anymore. I don't know if it should be updated or deleted

There is another script at Github, which shows previews of the generated mood files on the command line while they are being generated. Read more about it at the author's blog.

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.

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: