vagalume-wiki

home - vagalume - wiki

last update: Dec 28 2008

Contents:

  • 01. Compile & Install the patched Vagalume
  • 02. even more Patches
  • 03. Gstreamer & PulseAudio configuration
  • 04. Configure new Vagalume features
  • 05. FAQ
  • 06. Credits & License

01. Compile & Install Vagalume

Prerequirements:

This Howto was done on ubuntu intrepid, but it should also work on any other debian "sid" derivate (package names might be different). It is assumed that a basic build system is installed (build-essential, g++ compilers, ect). Now enable the ubuntu "universe" and "multiverse" & the Source Repositories (deb-src) and reload your Package index.

Download Source:

Obtain the latest Vagalume Source package from here, and unpack it to a working director under your home. You should end up with minimum a .dsc and a tar.gz file (there might be also a .changes and a .diff.gz in the archive)

Install Build Dependencies:

sudo apt-get install pkg-config libtool automake autoconf libgtk2.0-dev libgnome2-dev libgnomeui-dev libgstreamer0.10-dev libcurl4-gnutls-dev libxml2-dev libnotify-dev libglib2.0-dev libgnome-media-dev libart-2.0-dev libgconf2-dev libglade2-dev libgnomecanvas2-dev libbonoboui2-dev

Prepare the Sources:

dpkg-source -x vagalume_*.dsc

cd vagalume*

Build the Binary package:

fakeroot debian/rules binary

## ... or full unsigned package (source & binary)

dpkg-buildpackage -rfakeroot -us -uc -sa

Install Vagalume:

The easiest way is to install the Package via gdebi (the package manager that will open if you click on a .deb file inside Nautilus) to get the dependencies resolved automatically. If you want to install it from the terminal, just install the package (it will print out a error), and let apt-get fix the Dependencies:

sudo dpkg -i /path/to/vagalume_*.deb

sudo apt-get install -f

02. Patches

Extend / Tweak Vagalume:

If you want to use more patches for your version, you can copy them into the debian/patches folder and rebuild the binary with fakeroot debian/rules binary. The patches will get applied during build automatically.

But there is one thing to note: They must apply to the sources! The automatic patching will only work if the patches are good!

Patches for Vagalume-0.7:

Contribute Patches:

Send new / updated Patches to mtron*a1*net

Thanks :)

03. Gstreamer & PulseAudio

Gstreamer:

Before we start: PLEASE READ THIS . It's an excellent Summary that shows you how gstreamer works, what a gst-pipeline is and how to use them.

If you want to test your gst-install , you will need some extra gstreamer tools from the Repositories:

sudo apt-get install gstreamer-tools

For Vagalume you must install these needed gstreamer plugins (& external encoders) :

sudo apt-get install librsvg2-common libglib2.0-0 lame faac flac vorbis-tools vorbisgain mp3gain gstreamer0.10-plugins-base gstreamer0.10-plugins-base-apps gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse gstreamer0.10-alsa gstreamer0.10-esd gstreamer0.10-ffmpeg gstreamer0.10-gnomevfs

One way to check if you have the correct plugin installed is to open a terminal window and enter

gst-inspect | grep mp3

ffmpeg: ffdemux_mp3: FFMPEG MPEG audio demuxer

ffmpeg: ffdec_mp3on4: FFMPEG MP3ON4 decoder

ffmpeg: ffdec_mp3adu: FFMPEG ADU-formatted MPEG-1 layer 3 audio decoder

ffmpeg: ffdec_mp3: FFMPEG MPEG-1 layer 3 audio decoder

ffmpeg: ffenc_libmp3lame: FFMPEG MPEG-1 layer 3 audio encoder

typefindfunctions: audio/mpeg: mpga, mp1, mp2, mp3

typefindfunctions: application/x-id3v1: tta, flac, ogg, mpga, mp1, mp2, mp3

typefindfunctions: application/x-id3v2: tta, flac, ogg, mpga, mp1, mp2, mp3

mad: mad: mad mp3 decoder

lame: lame: L.A.M.E. mp3 encoder

mpegaudioparse: mp3parse: MPEG1 Audio Parser

Your output should be similar. if not, you are missing some plugins. Go and install them.

Now you can directly pipe a file through gstreamer (without the need of a gui) with your desired gst-pipeline. Test it for mp3. As you could have imagined mp3 support is crucial for vagalume

gst-launch-0.10 playbin uri=file:///path/to/test.mp3

Setting pipeline to PAUSED ...

Pipeline is PREROLLING ...

Pipeline is PREROLLED ...

Setting pipeline to PLAYING ...

New clock: GstAudioSinkClock

And the file should start playing. If it does, Go to PulseAudio

If the mp3 file above does not play, we must dig in deeper in the gstreamer config.

Did you install the necessary gst-plugins and did you run apt-get install -f if you ran vagalume install with dpkg from a console? If you did both, we will use gst-inspect to find out which plugins are installed:

You will need: (output is cut to the relevant gst-plugins):

gst-inspect-0.10

typefindfunctions: audio/x-wav: wav

typefindfunctions: audio/x-m4a: m4a

typefindfunctions: audio/mpeg: mpga, mp1, mp2, mp3

typefindfunctions: application/x-id3v1: tta, flac, ogg, mpga, mp1, mp2, mp3

typefindfunctions: application/x-id3v2: tta, flac, ogg, mpga, mp1, mp2, mp3

ogg: oggaviparse: Ogg AVI parser

ogg: oggparse: Ogg parser

ogg: ogmtextparse: OGM text stream parser

ogg: ogmvideoparse: OGM video stream parser

ogg: ogmaudioparse: OGM audio stream parser

ogg: oggmux: Ogg muxer

ogg: oggdemux: Ogg demuxer

audioresample: audioresample: Audio scaler

gnomevfs: gnomevfssink: GnomeVFS Sink

gnomevfs: gnomevfssrc: GnomeVFS Source

audioconvert: audioconvert: Audio converter

vorbis: vorbistag: VorbisTag

vorbis: vorbisparse: VorbisParse

vorbis: vorbisdec: Vorbis audio decoder

vorbis: vorbisenc: Vorbis audio encoder

gio: giostreamsrc: GIO stream source

gio: giostreamsink: GIO stream sink

gio: giosrc: GIO source

gio: giosink: GIO sink

alsa: alsasink: Audio sink (ALSA)

alsa: alsasrc: Audio source (ALSA)

alsa: alsamixer: Alsa mixer

mad: id3mux: id3 tag muxer

mad: mad: mad mp3 decoder

alsaspdif: alsaspdifsink: S/PDIF ALSA audiosink

lame: lame: L.A.M.E. mp3 encoder

mpegaudioparse: mp3parse: MPEG1 Audio Parser

faad: faad: AAC audio decoder

...

If you are missing some of those, re-install all the gst-plugins* packages you can find via synaptic.

To go a bit deeper into a plugins config (e.g. lame mp3) run:

gst-inspect-0.10 lame

Factory Details:

Long name: L.A.M.E. mp3 encoder

Class: Codec/Encoder/Audio

Description: High-quality free MP3 encoder

Author(s): Erik Walthinsen <omega@cse.ogi.edu>, Wim Taymans <wim@fluendo.com>

Rank: none (0)

Plugin Details:

Name: lame

Description: Encode MP3s with LAME

Filename: /usr/lib/gstreamer-0.10/libgstlame.so

Version: 0.10.7

License: LGPL

Source module: gst-plugins-ugly

Binary package: GStreamer Ugly Multiverse Plugins (Ubuntu)

Origin URL: https://launchpad.net/distros/ubuntu/+source/gst-plugins-ugly-multiverse0.10

Still not enough?

If you are sure that you have all plugins installed but still can't play a file, set a higher gstreamer debug level:

GST_DEBUG=3 gst-launch-0.10 playbin uri=file:///path/to/test.mp3

this will output massive amounts of gstreamer info messages to the terminal, which should help you to identify the error.

You can also start Vagalume with extended gstreamer logging by:

GST_DEBUG=3 vagalume

PulseAudio

Install the PulseAudio control tools:

sudo apt-get install libasound2-plugins "pulseaudio-*" paman padevchooser paprefs pavucontrol pavumeter

I did not need to change any alsa configuration file on ubuntu intrepid (as described in the ubuntu PulseAudio wiki page. You might need to do this for older ubuntu versions).

Set the default gstreamer sink to use the PulseAudio Sound Server:

gstreamer-properties

Default Output should be PulseAudio Sound Server.

see http://www.pulseaudio.org/wiki/PerfectSetup if you have problems with other (older) applications that do not support pulseaudio.

04. Configuration

Configure Vagalume via the Download Tab in the "Last.FM - Settings" menu item. Click on the Help button to open the current tab's help page.

Download directory: Base Directory to download audio files.can be extended by a custom Save Pattern

Save Pattern: set dynamic Filename save pattern like {artist}-{album}-{title} or {artist}/{album}/{artist}-{title}

Output Format: choose the used encoding gst-pipline

=>Editor Button: Open Gnome Media Profiles Editor

Create Duplicates: creates a copy if current file already exists

=>Keep Copies: Max. Number of copies to keep from a file

Automatic download: Dump all tracks.

Please Note that the ogg save-option is still buggy. Change the Output Format to mp3 if Vagalume hangs at track changes..

Gnome-Media Profiles

To set your output format choose one of the pre-installed gstreamer pipes.

See Chapter 03 for a brief introduction into gstreamer & pipelines.

You can edit the gst-pipleine from inside Vagalume with a click on the

"Editor" button (in the User Settings - Download Tab)

Note that a new / edited pipline will be used when the next track has

started.

Ubuntu Intrepid ships with a ogg pipeline, which is used as the default in Vagalume.

Please Note that the ogg save-option is still buggy. Change the Output Format to mp3 if Vagalume hangs at track changes..

The default mp3 encoding pipleine in ubuntu intrepid is set to

audio/x-raw-int,rate=44100,channels=2 ! lame name=enc mode=0 vbr-quality=6 ! id3v2mux

You might want to create a new mp3 pipeline for Vagalume because the quality Last.FM streams in is not that high (A CBR 128 Kbit encoding), and it makes no sense to encode it in a higher quality than the original file.

A Vagalume mp3 gst-pipeline could look like:

audio/x-raw-int,rate=44100,channels=2 ! lame name=enc vbr=0 bitrate=128 ! id3v2mux

Available Lame Element Properties to build a pipeline:

Ubuntu Intrepid ships Lame Version 0.10.7 in the package gst-plugins-ugly. Available Lame Options. Run gst-inspect lame to print this info on your Installation. See Chapter 03 for more info about Gstreamer.

05. FAQ

Q: The Volume is different on each Track :(. What's the best way to gain it?

A: I suggest mp3gain / vorbisgain for that. Run this terminal one-liner in the folder where you stored the mp3's and it will gain them without the need to re-encode all the tracks :

find . -type f -iname '*.mp3' -print0 | xargs -0 mp3gain -r -k

Q: I can't find a lastfm:// URL on the Last.FM Website any more :(

A: Since the Last.FM Site upgrade there is no direct way to get the last.fm url until now (they are working on it...) but it's very easy to handle: when you click on a "Listen to XY Radio Now" button, the URL in the Browser is e.g http://www.lastfm.uk/listen/group/Jazz Club which refers to lastfm://group/Jazz Club

Q: i have messed up my gst-pipeline. how do i encode to...

ogg: audio/x-raw-float,rate=44100,channels=2 ! vorbisenc name=enc quality=0.5 ! oggmux

mp3: audio/x-raw-int,rate=44100,channels=2 ! lame name=enc vbr=0 bitrate=128 ! id3v2mux

aac: audio/x-raw-int,rate=44100,channels=2 ! faac ! ffmux_mp4

06. Credits & License

Thanks to:

- FSFfor the GPL

- Berto & all other hackers for writing vagalume

- Robert-Andre Mauchin for the great save-song patch

- Hank for many patches, bugfixing & testing

License:

Vagalume is free software: you can redistribute

them and/or modify them under the terms of the GNU

General Public License version 3 as published by

the Free Software Foundation.

Vagalume is distributed in the hope that it will

be useful, but WITHOUT ANY WARRANTY; without even

the implied warranty of MERCHANTABILITY or FITNESS

FOR A PARTICULAR PURPOSE. See the GNU General

Public License for more details.

You should have received a copy of the GNU General

Public License along with Vagalume. If not, see

http://www.gnu.org/licenses/

Contact: mtron[*at*]a1.net