KDE-Apps.org Applications for the KDE-Desktop 
 GTK-Apps.org Applications using the GTK Toolkit 
 GnomeFiles.org Applications for GNOME 
 MeeGo-Central.org Applications for MeeGo 
 CLI-Apps.org Command Line Applications 
 Qt-Apps.org Free Qt Applications 
 Qt-Prop.org Proprietary Qt Applications 
 Maemo-Apps.org Applications for the Maemo Plattform 
 Java-Apps.org Free Java Applications 
 eyeOS-Apps.org Free eyeOS Applications 
 Wine-Apps.org Wine Applications 
 Server-Apps.org Server Applications 
 apps.ownCloud.com ownCloud Applications 
 KDE-Look.org Artwork for the KDE-Desktop 
 GNOME-Look.org Artwork for the GNOME-Desktop 
 Xfce-Look.org Artwork for the Xfce-Desktop 
 Box-Look.org Artwork for your Windowmanager 
 E17-Stuff.org Artwork for Enlightenment 
 Beryl-Themes.org Artwork for the Beryl Windowmanager 
 Compiz-Themes.org Artwork for the Compiz Windowmanager 
 EDE-Look.org Themes for your EDE Desktop 
 Debian-Art.org Stuff for Debian 
 Gentoo-Art.org Artwork for Gentoo Linux 
 SUSE-Art.org Artwork for openSUSE 
 Ubuntu-Art.org Artwork for Ubuntu 
 Kubuntu-Art.org Artwork for Kubuntu 
 LinuxMint-Art.org Artwork for Linux Mint 
 Arch-Stuff.org Art And Stuff for Arch Linux 
 Frugalware-Art.org Themes for Frugalware 
 Fedora-Art.org Artwork for Fedora Linux 
 Mandriva-Art.org Artwork for Mandriva Linux 
 KDE-Files.org Files for KDE Applications 
 OpenTemplate.org Documents for OpenOffice.org
 GIMPStuff.org Files for GIMP
 InkscapeStuff.org Files for Inkscape
 ScribusStuff.org Files for Scribus
 BlenderStuff.org Textures and Objects for Blender
 VLC-Addons.org Themes and Extensions for VLC
 KDE-Help.org Support for your KDE Desktop 
 GNOME-Help.org Support for your GNOME Desktop 
 Xfce-Help.org Support for your Xfce Desktop 
openDesktop.orgopenDesktop.org:   Applications   Artwork   Linux Distributions   Documents    Linux42.org    OpenSkillz.com   


- Content .- Fans (2) .- Knowledge Base  . 



Amarok Script

Score 82%


Link:  http://
Downloads:  17669
Submitted:  Jul 3 2005
Updated:  Oct 20 2007


amaroK replaygain
v1.0.0-beta5 by Miguel Angel Alvarez (maacruz at gmail.com)
October 20, 2007

An amaroK script to normalize volume using the replaygain method
Now on your language: english, spanish, german, hungarian, french, russian, slovak, finnish, polish, portuguesse, italian, turkish, swedish
(more translators wanted!!!)

Using replaygain will make all your songs have the same perceived volume, making unnecesary to adjust the volume on each song change (specially if they are from different albums/artists)

--Release Notes--
1.0.0beta5: Workaround for amarok saving playlist with non valid utf8 characters, which in turn would cause the script to crash. The internal scanner for wma/asf files is now x10 faster.
1.0.0-beta series:
Major enhancements and new features.
Support for streams: now streams can be scanned. The scan must be manually started in track mode. It will rip 60 seconds and set the gain accordingly, so some variance can be expected. The stream must broadcast normalized somewhat for this to have any sense. Requires mplayer.
Support for wma: Using a new internal scanner (only for wma for now, but soon to be expanded for all filetypes). It is quite experimental but since beta5 it is very fast and will use 3dnow on AMD cpu's. Requires mplayer.
Autoscan mode: now replaygain will autoscan the playlist when it is modified (files are added or removed). The autoscan only can do track mode. Streams are not autoscanned (by now). The autoscan starts after a configurable amount of time once the playlist has changed, to avoid putting the cpu under high load during track change in dynamic playlists. Autoscan runs in a separated thread, so replaygain works while the scan is in progress; beware that the manual scan still runs in the main thread (the script will not work on anything else). Autoscan can be enabled/disabled using the playlist context menu, if you want to stop a running autoscan simply disable it; starting a manual scan will also stop a running autoscan; changing the playlist while autoscan is running will let it finish the current file and start a new autoscan. Requires amarok>=1.4.6 and python-xml
New anti-lag meassure: the script follows the playlist and will guess the next track to be played, avoiding to query amarok. Only works if amarok is not playing in random track mode. Requires amarok>=1.4.6 and python-xml.
Minor improvements:
The scripts keeps you informed while a scan is in progress (previous versions only informed when the scan started and finished).
The configuration dialog now informs you of what's supported and any dependency unmet.
Memory usage has been reduced
Files are checked if writeable before scanning them (many thanks to dAniel hAhler http://daniel.hahler.de/ for suggestion and patch)
Volume is updated if the current playing file hadn't replaygain tags after it is scanned (manually or automatically)
More bugs
--End of notes--

Please report any bug

Files supported:
vorbis (ogg), mp3, aac (mp4/m4a), flac, musepack (mpc), wma/asf


kdebase3 (kdialog and dcop), python 2.3 or later, and UTF8 filesystem character set (to use national characters in the filename).
pygtk (python-gtk) for the advanced configuration interface.
python-xml for easy playlist album scanning, autoscan, lag-reduction
mplayer, oggenc (vorbis-tools), vorbisgain for streams and wma support.
kdebindings3-python for lag-reduction
The following external utilities:
. metaflac (flac): to apply replaygain tags on flac files. This is likely a standard package on your distribution
. vorbisgain: to apply replaygain tags on vorbis ogg files
. aacgain: to apply replaygain tags on mp4/m4a aac files (works for mp3 too)
. mp3gain: to apply replaygain tags on mp3 files. Not needed if you have aacgain
. replaygain (musepack): to apply replaygain info on mpc (musepack) files.
. mplayer plus oggenc (vorbis-tools) and vorbisgain: to apply replaygain tags on wma/asf files and streams.

Where you can get the needed utilities:

Check your distribution's software repositories first.
Guru's page for SuSE Linux has mp3gain and vorbisgain. (http://linux01.gwdg.de/~pbleser/rpm-navigation.php?cat=Sound/)
Packman has musepack packages (they include replaygain) for SuSE Linux (http://packman.links2linux.de/)
Musepack home page (http://www.musepack.net/index.php?pg=lin)
Vorbisgain home page (http://sjeng.org/vorbisgain.html)
mp3gain home page (http://mp3gain.sourceforge.net/download.php)
aacgain home page (http://altosdesign.com/aacgain/).
mplayer home page (http://mplayerhq.hu

How to use
First you need to analyze all your song files using replaygain. The replaygain algorithm calculates a perceptual volume (gain) for each track (track mode) and album (album mode) and uses this information to correct the playback volume so all tracks or albums sound equally loud. In album mode the relative differences between tracks of an album are preserved, so more quiet tracks will sound more quiet, and louder tracks will sound louder. Album mode is better for live recordings and albums meant to be more than a collection of tracks, while track mode is better for heterogeneus mixes and compillations.
This analysis will not change your file's sound data, it will store the information in tags.

You can analyze a stream, file, album or your whole collection from the playlist's context menu:
Apply Replaygain tags->
-- To selected files in track mode: tag one or more files (as selected in playlist) with their respective track gain (track mode).
-- To playlist in album mode: tag all files in the playlist with both album and track gain tags (album mode), as if the playlist is one album.
-- To entire collection using album tags: the script will group the files in the database using their "Album" tag, and scan each group in album mode.
-- Autoscan: if this is activated, files in the playlist will be automatically tagged (track mode tags only).
It is recommended to have python-xml installed for album tagging (if not installed, playlist tagging as such and autoscan will not be available).

Once a file is tagged with replaygain data, the script will be able to read such tags and it will update the volume as needed.

The mode tags used are selected from the playlist context menu:
- Replaygain mode: which mode will use (track or album)

If a file doesn't have replaygain tags or it is of an unsupported type, it will be played at the default gain.

You can configure the script's operation in the configure script dialog. The most important parameters are:
- Pregain: this is the reference gain in dB (from the 0 point set at 55% volume in amarok). The range goes aproximately from 11 dB to -17 dB. Any replaygain volume correction will be relative to this gain, so you should leave enough space in the range for the script to work. The recommended value is 6.0 dB.
- Peak protection: If enabled, the volume may be adjusted to avoid clipping.
- Default gain: this is the assumed gain for files with no replaygain information. A good value could be -6.0 dB.
- Autoscan delay: amount of time in seconds between the playlist change and the autoscan start. Avoids reacting too quickly to manual playlist changes, and most important, clogging the CPU at track change when using dynamic playlists.

Crossfade is supported, so the volume changes slowly when crossfading.
You have also the option of sudden or smooth volume change when crossfade is disabled in amarok.

Lag reducing howto
Some people are affected by large lag between track change and the replaygain volume update
Lag seems caused by amarok itself by taking too much time to return from dcop calls.
This has been related to high cpu load caused by sqllite and cover image rendering.
So, if you are affected, what can you do?
In amarok 1.4.6 and later the script keeps track of playlist changes, to guess what the next song is and tell amarok to adjust volume inmediatly, needs python-xml and only works if track are played secuentially.
The cpu load for using sqllite has been reduced in 1.4.0 and later, and if you are using 1.3.9 you can apply the patch included in the amarok replaygain script package. Install either of those. Using a external database may be a good idea if you have a large collection, too.
Install kdebindings3-python to take advantage of new script's code.
If you are using the script's OSD control (the "Disable OSD during...." option) disable the OSD or uncheck the script option, it couldn't be optimized because of bugs in pykde
To see how cover rendering affects you, you can move your covers elsewere (try with an author or two) so they are not found. Large cover files may have a big impact, if this is the case, use gimp to reduce them.
Run amarok minimized in the tray, it will not update visual elements saving much time.
Resource intensive software affects too (some screensavers, p2p, ...)
During this beta release debug output is enabled. Have a look at your lag (in seconds) by typing in a konsole/xterm:
tail -f ~/.kde/share/apps/amarok/scripts-data/replayggain.log|grep time
As a reference, my lag is well under 0.1 s (usually 0.01-0.05)

Feedback appreciated.

Miguel Angel


Old vorbisgain releases

0.5-beta "Reborn"
Major rewriting, now it is python
Renamed to replaygain
Add Album and peak support
New nice pygtk interface
Thanks to Kevin Radloff and Jocke "Firetech" for their suggestions and testing

Uses the new (since amarok 1.3.2) readConfig dcop calls if available, now the script is aware of amarok configuration changes
Added support for musepack (mpc) files

Added support for AAC (mp4/m4a) files
The script checks for external utilities when closing the configure dialog

0.6 "Clean OSD"
New option to disable osd updates during volume changes solving the annoying quick osd changes
Changed detection of external utilities since mp3gain has different behaviour depending on its version (thanks Jocke for pointing this out)
Settings are reread only when the engine starts playing, not at every song change
Fixed the check for external utilities so it solves the "mp3gain not found" missleading message, and a typo which prevented using aacgain when present.
Fixed flac on latest flac releases (thanks Gary Virta)
Changed the "utility not found" dialog to a less annoying notification
Many optimizations and speedups
Thanks Jocke and Roberto for all your testing

Hotfix: fix script breaking on amarok older than 1.3.2 when osd is disabled

Many new configuration options, not all can be accesed through the kdialog interface
Clipping protection may be disabled so volume doesn't go to 0 on some broken mp3 files
Pregain (volume reference level) may be adjusted by moving the volume slider
Pregain is now adjusted to tenths of dB instead of integer dB
The volume transitions may be smoothed over any specified amount of time when crossfade is disabled
Accurate timing so crossfaded/smoothed volume changes don't take longer than they should
Pygtk interface now has help as tooltips
Changes in script configuration take effect inmediately instead of waiting till next song
Script configuration is saved when amarok stops playing

Added support for mp3 files tagged with foobar (id3v2 tags), it requires id3v2 installed
SIGTERM handler

Added context menu shortcut to change replaygain mode

Internacionalization. Spanish translation.
New option to set the gain (volume) for files without replaygain info (or unsupported files).
Context menu options to apply/delete replaygain tags to playlist/collection. It is recommended to have python-xml installed for almbum tagging.
Some bugfixes

German, french and hungarian translations

Hotfix: do not break while scanning collection if unsupported file has no album tag.

Fix problems with special shell characters in filenames

Fix breaking if enviroment LANG variable is not set (assumes ISO8859-1 charset)

Fix encoding strings headache caused by gettext not returning unicode strings

Couple of small fixes

This release is designed to reduce lag (thanks Stewie for all your testing). Requires installing kdebindings3-python (aka python-kde) to take advantage of new code. Uses pykde for dcop calls if possible
Finnish GUI translation thanks to Samu Voutilainen
Slovak GUI translation thanks to Jozef Říha
Russian translation thanks to Anton Chumak.
Reworked kdialog interface to fix problems caused by X error messages
Corrects collection scanning if using dynamic collection (patch by Frederic Dinh).
Use mutagen-1.4 library (http://www.sacredchao.net/quodlibet/wiki/Development/Mutagen) to read tags, except on mp4/m4a and mpc. Code for mpc and mp4 tag reading thanks to Justus Pendleton and QuodLibet player (needs ctypes python module). Dropped dependency on external utilities for tag reading.
Added support for RVA2 tags (used by QuodLibet and normalize)
Many bugfixes

0.9.1 Add portuguesse and polish GUI translations, updated finnish translation, thanks to Candido Lopes, Jaroslaw Gorny and Samu Voutilainen.

0.9.2: Add italian and turkish GUI translations. Many thanks to Davide "DuffyDac" and Fatih Çiroglu

0.9.3: Add swedish GUI and README translation. Many thanks to Göran Jartin

(replaygain (amaroK Script))
Send to a friend
Other  Apps  from maacruz
Report inappropriate content

goto page: prev  ... 4  5  6  7  8  9  10  11  12  13  14  15  16 



 by browner on: Jan 5 2008
Score 50%

Would it be possible to make 0.9.3 available in addition to this beta release as I preferred it?
In this new beta the volume changes seem nowhere near as smooth as 0.8/9. The volume slider often increases to maximum gain before reducing down to the desired value giving sometimes large volume spikes when changing tracks. It never used to do this. I also notice strange behaviour when pausing the music as the volume seems to adjust when playback is resumed and not always to the same level as before.
In my opinion beta releases should be made available separately on kde-apps with the stable releases available concurrently. Is the stable code available anywhere else?

Reply to this


 Re: 0.9.3

 by maacruz on: Jan 7 2008
Score 50%

Then you would stick with the old version instead of complaining here, and I couldn't find and fix those subtle bugs :-)
I have found the play/pause bug, but the spikes souldn't happen except ocasionally in random album mode when switching albums.
I'm very interested in your replaygain debug log. Please, play a while until the bug happens a few times and send me the file ~/.kde/share/apps/amarok/scripts-data/replaygain.log
Also tell me which amarok release do you use, what play mode (random, random album, dynamic playlist....) do you use that makes the bug happen, and what of the following packages you do have installed: python-xml, python-kde3 (aka pykde aka kdebindings3-python).

Anyway, future releases may have a configuration option to disable the code which causes this particular problem.

Reply to this


 Re: Re: 0.9.3

 by browner on: Jan 7 2008
Score 50%

Sorry i didn't mean to sound like i was complaining it was merely intended as a suggestion. I appreciate the amount of work you have put into this and the difficulty of tracking down such subtle bugs. I will send you a copy of my debug log when i next notice this occurring.

Reply to this


 Re: Re: Re: 0.9.3

 by maacruz on: Jan 8 2008
Score 50%

Don't worry, with "complaining" I was joking where it really means bug reporting ;-)

Reply to this


 album tags

 by aronparsons on: Jan 21 2008
Score 50%

Would it be possible to add an entry to the context menu of albums in the collection view to apply tags? (e.g. right click an album in the left frame and select "Apply RG tags in album mode). Right now my method of doing this is to load the album into the playlist and use that context menu entry. Or is there a better (automatic) way to do this?

Reply to this


 Re: album tags

 by maacruz on: Jan 30 2008
Score 50%


Would it be possible to add an entry to the context menu of albums in the collection view to apply tags? (e.g. right click an album in the left frame and select "Apply RG tags in album mode).

Unfortunately no. Amarok lacks that functionality, that is, it only allows to have submenus in the playlist context menu.

Right now my method of doing this is to load the album into the playlist and use that context menu entry. Or is there a better (automatic) way to do this?

That is the only way if you want to scan just an album. As an alternative you can do a full collection scan (it is quite fast since only albums which lack replaygain data are scanned)

Reply to this


 what's it doing?

 by dgrant on: Feb 11 2008
Score 50%

Why is this script changing the volume of my mp3s in Amarok. Since mp3gain applies the gain directly to the audio frames in the mp3 file why is it adjusting the volume as well?

Reply to this


 Re: what's it doing?

 by maacruz on: Feb 11 2008
Score 50%

You should read this web page more carefully.
Read it again, read it slowly, read it fully; it is here to document what the script does and how to use it. Even this same content is available in several languages, and you can read it just by simply clicking "About" in amarok's script manager.

Reply to this


 Error (Ubuntu Hardy)

 by GregKNicholson on: Feb 27 2008
Score 50%

Using replaygain 1.0.0-beta5 with Amarok 1.4.8 (“using KDE 3.5.9”) on the latest Ubuntu (Gnome) Hardy (8.04 development branch), I get the following error when running the script:

The script 'amarok_replaygain.py' exited with error code: 1

/bin/sh: kdialog: not found
Traceback (most recent call last):
File "/home/greg/.kde/share/apps/amarok/scripts/amarok_replaygain/amarok_replaygain.py", line 615, in <module>
class Scan:
File "/home/greg/.kde/share/apps/amarok/scripts/amarok_replaygain/amarok_replaygain.py", line 616, in Scan
streamdb = shelve.open('streamdb.db')
File "/usr/lib/python2.5/shelve.py", line 225, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/usr/lib/python2.5/shelve.py", line 209, in __init__
Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback)
File "/usr/lib/python2.5/anydbm.py", line 82, in open
mod = __import__(result)
File "/usr/lib/python2.5/dbhash.py", line 5, in <module>
import bsddb
File "/usr/lib/python2.5/bsddb/__init__.py", line 51, in <module>
import _bsddb
ImportError: No module named _bsddb

I believe I have all of the dependencies installed.

It was working fine until a recent update to Hardy, which I think installed Linux kernel 2.6.24-10.

I was wondering if you might know what the problem is.


Reply to this


 Re: Error (Ubuntu Hardy)

 by GregKNicholson on: Feb 28 2008
Score 50%

This seems to have magically fixed itself in an update to Ubuntu.


Reply to this



 by Rouge8 on: Mar 6 2008
Score 50%

Traceback (most recent call last):
File "/home/andy/.kde/share/apps/amarok/scripts/amarok_replaygain/amarok_replaygain.py", line 615, in ?
class Scan:
File "/home/andy/.kde/share/apps/amarok/scripts/amarok_replaygain/amarok_replaygain.py", line 616, in Scan
streamdb = shelve.open('streamdb.db')
File "/usr/lib/python2.4/shelve.py", line 234, in open
return DbfilenameShelf(filename, flag, protocol, writeback, binary)
File "/usr/lib/python2.4/shelve.py", line 215, in __init__
Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback, binary)
File "/usr/lib/python2.4/anydbm.py", line 83, in open
return mod.open(file, flag, mode)
File "/usr/lib/python2.4/dbhash.py", line 16, in open
return bsddb.hashopen(file, flag, mode)
File "/usr/lib/python2.4/bsddb/__init__.py", line 298, in hashopen
d.open(file, db.DB_HASH, flags, mode)
bsddb.db.DBInvalidArgError: (22, 'Invalid argument -- ./streamdb.db: unsupported hash version: 9')

Amarok 1.4.8, KDE 3.5.9, Debian Sid.

Reply to this


 Re: error

 by maacruz on: Mar 6 2008
Score 50%

Not related to the script itself, but to your python installation and/or berkeley db packages.
Try deleting the file ~/.kde/share/apps/amarok/scripts-data/streamdb.db
If that doesn't work, file a bug in debian bugzilla for the python package maintainer.

Reply to this


 Re: Re: error

 by Rouge8 on: Mar 7 2008
Score 50%

Removing that file worked, thanks.

Reply to this


 Re: Re: error

 by tre-ben on: Dec 28 2008
Score 50%

After upgrading to OpenSUSE 11.1 I also ran in to problem using ReplayGain:
bla bla... ImportError: No module named _bsddb

Deleting the streamdb.db file as described solved the problem.

Still love this script !

Reply to this


 Re: error

 by fuchs on: Mar 13 2008
Score 50%

An alternative solution can be found in the related bug report for the debian python package: http://groups.google.com/group/linux.debian.bugs.dist/msg/a15271e2e9679421

Reply to this


 Do not work anymore

 by staudi009 on: Mar 19 2008
Score 50%

So far replaygain ran smoothly. Recently however, I get the error below. I think it has to do with Python, but what?

Regards, Werner


Traceback (most recent call last):
File "/home/ws/.kde/share/apps/amarok/scripts/amarok_replaygain/amarok_replaygain.py", line 615, in ?
class Scan:
File "/home/ws/.kde/share/apps/amarok/scripts/amarok_replaygain/amarok_replaygain.py", line 616, in Scan
streamdb = shelve.open('streamdb.db')
File "/usr/lib/python2.4/shelve.py", line 234, in open
return DbfilenameShelf(filename, flag, protocol, writeback, binary)
File "/usr/lib/python2.4/shelve.py", line 215, in __init__
Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback, binary)
File "/usr/lib/python2.4/anydbm.py", line 83, in open
return mod.open(file, flag, mode)
File "/usr/lib/python2.4/dbhash.py", line 16, in open
return bsddb.hashopen(file, flag, mode)
File "/usr/lib/python2.4/bsddb/__init__.py", line 298, in hashopen
d.open(file, db.DB_HASH, flags, mode)
bsddb.db.DBInvalidArgError: (22, 'Das Argument ist ung\xc3\xbcltig -- ./streamdb.db: unsupported hash version: 9')

Reply to this


 Re: Do not work anym

 by staudi009 on: Mar 19 2008
Score 50%

Sorry! I did not realize the previous talk.

Reply to this

goto page: prev  ... 4  5  6  7  8  9  10  11  12  13  14  15  16 

Add commentBack

How do you like Plasma 5?
 The best KDE Desktop ever.
 Definitely a nice improvement.
 Not decided yet. Haven't tried it yet.
 I do not like some of the changes.
 KDE is taking the wrong way.
 I am still sticking with KDE 3.5.
 I have no opinion, but wanted to vote anyway.

 Who we are
More about us
Frequently Asked Questions
Updates on identi.ca
Updates on Twitter
Content RSS   
Events RSS   

Add App
Public API
About KDE-Apps.org
Legal Notice
Spreadshirt Shop
CafePress Shop
Sponsor us
Report Abuse

Copyright 2003-2016 KDE-Apps.org Team  
All rights reserved. KDE-Apps.org is not liable for any content or goods on this site.
All contributors are responsible for the lawfulness of their uploads.
KDE and K Desktop Environment are trademarks of KDE e.V.