Lyrics ID3

Amarok 1.x Scripts

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

1
Score 58.0%
Description:

Die deutsche Übersetzung der Skriptbeschreibung:
http://www.gansinger.net/lyricsID3/README.de.xhtml

Français:
http://www.gansinger.net/lyricsID3/README.fr.xhtml

Italiano:
http://www.gansinger.net/lyricsID3/README.it.xhtml

Available Languages
The script is available in:
- English
- German
- French
- Italian
- Czech
Read Lyrics from ID3
his is a lyrics script for Amarok. In contrast to many other lyrics scripts, it fetches the lyrics not from the Internet. It uses the possibility to store lyrics in the ID3 tag of mp3 files (USLT frame). So if there are lyrics stored in file and this script is running, Amarok will display the lyrics.
ID3v2 allows to store multiple lyrics in one file. They are separated by different language codes and/or comments. In this case the script let you choose between the different lyrics by a simple click.

Additionally there is a rudimentary support for Vorbis Comments and FLAC Comments. It is possible to specify a key value (the default is LYRICS). The first comment containg the keyword will be read out and displayed as lyrics in Amarok.

As for Ogg Vorbis there is a feature for reading lyrics in m4a (mp4 (AAC)).

Many lyrics contain characters, which are not in the range of ASCII. In order to handle these characters, you should use a appropriate standard out encoding, like UTF-8 or Latin1.

There is no configuration required by the script.

Save Lyrics to ID3
With this script you can save the lyrics of a song in the ID3v2.4 tag of a mp3-file. If you use a mp3-player which can read this tag (USLT frame in ID3), it will display the lyrics.
To store the lyrics, two options have to be specified: a three letter language code (ISO 839-2) and a comment or description of the lyrics. This script provide to modes on how to save the lyrics. These modes are Automatic Mode and Manual Mode. Additionally you can delete already stored lyrics.
All lyrics are stored in UTF-8, which require ID3v2.4. So all tags with versions 2.x will be updated to v2.4. If there is only a ID3v1.1 in the file, an additional tag will be created. If there is no tag at all, no lyrics will be stored.
Many lyrics contain characters, which are not in the range of ASCII. In order to handle these characters, you should use a appropriate standard out encoding, like UTF-8 or Latin1.

Automatic Mode
In this mode the lyrics are stored automatically. Every time Amarok starts a new song the scripts waits a specified time then it fetches the lyrics and stores them in the file. For a successful use of this mode, you have to configure some stuff. First of all you need the specify a language code and a description which will be used. Second you have to specify a waiting time. This represents the time between a track change and the start of the storing process. The amount of seconds is calculated by the song length divided by waitTime. Thus a bigger the value of waitTime leads to a shorter time between a track change and the storing process.
All these configurations can easily be done with the configuration dialog provided by the script. To use this, mark the script in the script manager in Amarok and click on configure (the script has to be in running mode).
If you to disable the Automatic Mode you can easily do this during the configuration process.

Manual Mode
- Saving Lyrics -
You can also save the lyrics manually. For this you can use the context menu entry: saveLyrics. The action is always based on the selcted songs in the playlist. If you click on saveLyrics, you will get a dialog where you can specify the language code, description and lyrics.
If there are already lyrics and the file, the dialog will show the language code and the description of the lyrics in the file. The displayed lyrics are always the ones, which Amarok displays in the context browser. To overwrite the lyrics just acknowledge the dialog. If you specify new options, the lyrics will be stored additionally except Change Comment is not checked. If this is checked, the lyrics will not be stored additionally. The lyrics will be stored with the same language key and a different comment. So the previous lyrics will be deleted in the file. If there are more than one lyrics with the selected language key in the file, just one will be overwritten.
- Deleting Lyrics -
This works like the saving process. If you use the context menu entry removeLyrics a dialog will show up. In this dialog you can specify the language code and the description of the lyrics which should be deleted.


Dependencies
[li]Python 2.2, 2.3, 2.4 or 2.6[/li][li]Python Mutagen (http://code.google.com/p/mutagen/)[/li][li]pyhton-qt3[/li][li]Python Minidom[/li][li]Python urllib[/li][li]kdialog[/li]

Warning
The lyrics are stored in the mp3-File. I can not guaranty that the file is not damaged after the writing process.
The file type is only verified by extension.

Translators wanted
I am looking for translators. So if you want to contribute, translate the script in your favorite language and send me the result. I will release your translation with the script.
If you have experience with translation and gettext you can use messages.pot provided with the script. Otherwise you can contact me and I'll explain how to do the translation.

Previous Versions
Previous Versions of the script can be found at:
http://stifi.st.ohost.de/scripts/

Save Lyrics to ID3 Button
By applying this patch to the Amarok source code you will get an additional button in the lyrics tab. By pressing this button you can save the lyrics directly into the mp3 file. This button avoids the inconvenient context menu approach.
http://gansinger.net/lyricsID3/savebuttonpatch.html

Feedback is appreciated and please report any bugs.

Finally, thanks to every contributer!
Last changelog:

7 years ago

Version 1.8-beta
[li]Bug fix in XML processing by madli *thanks*[/li]
Version 1.8-alpha (cs)
[li]Czech translation from Pavel Fric *thanks*[/li]
Version 1.8-alpha
[li]KApplication and kdialog is not needed anymore (-->Script should now work with newer versions of python and kde)[/li][li]Removed automatic installer for python-mutagen[/li]
Version 1.7
[li]corrected link in README to French translation[/li][li]Italian translation and some spell checks from Marco Poletti *thanks!*[/li]
Version 1.6a
[li]small bug fix version[/li]
Version 1.6
[li]french translation by pgraber *thanks!*[/li][li]set STD_ENCODING to ASCII as default[/li]
Version 1.5
[li]some unicode fixes on notifiactions[/li][li]disabled debug output by default[/li]
Version 1.4
[li]new Icon[/li][li]fixed character sets errors in mass tagging[/li]
Version 1.3
[li]support for FLAC[/li][li]configurable key name for FLAC/Vorbis[/li][li]added Mass Tagging Feature[/li][li]the action is now based on the selected songs in the playlist[/li][li]Configuration Dialog[/li]
Version 1.2a
[li]removed popup if no lyrics are found[/li]
Version 1.2
[li]removed debug(lyrics)[/li][li]reading support for m4a[/li][li]using mutagen for Ogg Vorbis[/li][li]Timer for Automatic Mode is stopped, if Amarok stops playing the song.[/li]
Version 1.1
[li]started with translation (gettext)[/li][li]If mutagen is not installed, the scripts tries to install it.[/li][li]READMEs are in well formated XHTML[/li][li]Automatic Mode can be disabled[/li][li]changing comments is now possible[/li][li]some structural changes in the code[/li][li]very small bug fixes[/li][li]all dialogs are now in front by default[/li]
Version 1.0
[li]error message on wrong language code was always shown after configuring the script[/li]
Version 0.9
[li]spec-file[/li][li]better description of the script behaviour[/li][li]politer messages[/li][li]non-ASCII characters in comments are handled[/li][li]small bug fixes[/li]
Version 0.8
[li]exit gracefully on stop[/li][li]automatic mode did not work[/li]
Version 0.7
[li]removed dependency of dcop lib (which caused many problems for python2.5 users)[/li][li]saving in vorbis is deactived by default, because I have no time to maintain this script[/li]
Version 0.6
[li]many encoding fixes (thanks to aeternos)[/li]
Version 0.5
[li]GUI for configuration[/li][li]improved the dialog for saving the lyrics[/li][li]you can now edit the lyrics before saving[/li][li]better dialog for deleting the lyrics[/li]
Version 0.4
[li]added non ISO language codes[/li][li]waiting time is now configurable[/li][li](click on 'configure' to initialize your configuration-file)[/li][li]new configure option: comment[/li][li]cleaned up code[/li]
Version 0.3
[li]removed pause option[/li][li]small bug fixes[/li]
Version 0.3alpha
[li]initial release with python-mutagen[/li]

ZeroUser

7 years ago

I've not found any installation manual. Please, explain, hot to setup this wonderful script to Amarok. Thanks in advance.

Report

C

stifi

7 years ago

Just download the script and install it by using Amarok's script manager.

For detailed questions, write me an E-Mail. I'll try to answer them.

Report

jmmzon

8 years ago

Sorry for my bad Engilsh. I have a question. Does this script will run once in Amarok 2 or not? Without this script Amarok is useless.

Report

C

stifi

8 years ago

No, the script is incompatible with Amarok 2.

Options:
- Stay at Amarok 1.4
- Vote at: http://code.google.com/p/clementine-player/issues/detail?id=1110 and hope that the developers implement this feature soon
- Switch to Guyadeque

Report

etechnophile

7 years ago

Unfortunately it turns out that it's quite impossible to accomplish with an Amarok 2 script due to limitations of the api. See http://forum.kde.org/viewtopic.php?f=117&t=90708

Instead, you can use:
https://github.com/HaMF/amarok_id3lyrics

Report

NioS

10 years ago

Hello ! I've still Amarok 1.4.10 on my Kubuntu-KDE4.3.2 but I can't get this script working. I used to use it before, even with KDE 4.2.4, but now it's not working anymore.
Maybe I haven't got the good version of Python (the latest is 2.6, whereas Lyrics ID3 works with 2.4 max)

When I launch the "Save" script in a shell, I get : "sh: Syntax error: Unterminated quoted string"

Yet, I think I've installed all the required packages...
Please help !

Report

wpeaton

9 years ago

I know a lot of time has passed since this post. But it is still true that Amarok 1.4 is the best music player. And it is still true that the ID3 scripts are really great.

Unfortunately, they don't run on Python 2.6. If I could figure out the offending lines, I could maybe fix them. I don't even know where to start.

Has anyone found a solution?

Report

C

stifi

9 years ago

I am the author of the scripts. Maybe I am able to help to get the scripts running. The problem is that I have no KDE and Amarok on my system. You can write me an E-Mail with some error messages and system stats. I see what I can do. As I remember was there a bug in the python-qt libraries causing a segmentation fault. In that case I am not able to help you. But just give it a shot. Maybe we find a suitable solution for you.

Report

bugmenot1234

9 years ago

Hallo Stefan,
funktioniert ja wieder prächtig! Vielen Dank dafür und schöne Grüße aus Vienna,
Flow

Report

C

stifi

10 years ago

It seems that you discovered a bug in my script. Unfortunately I stopped using KDE and Amarok. I think there are some complications with some libraries. If you want you can write me an E-Mail and I'll help you to debug the script. Anyway my advise is to look for an alternative music player with lyrics support because Amarok 1.x (with Scripts) and KDE 4.x isn't a good combination in my opinion.

Report

sacrediou

10 years ago

First of all, thanks a lot for this great script !

I've seen "support for FLAC" in version 1.3 on the online changelog of this tool but the feature seems to be absent of version 1.7 that I'm using... and in its changelog too !

Did you take the decision to drop this feature, or is it a mistake ?

Hope to see a fix/workaround, because I love this script for mp3 and it would be wonderful if it's possible to do the same with flac.

It's a shame that there's still no standard for embedded lyrics in ogg vorbis and flac. Hope to have one someday...

Keep the good work :-)

Sacrediou

Report

C

stifi

10 years ago

Sorry, but FLAC is only supported in a rudimentary way. If lyrics are stored in a FLAC file with comment 'LYRICS' they are read out and shown in Amarok. As you already mentioned, is there no standard on how to store lyrics in FLAC. So it is very unlikely that you have FLAC files with lyrics stored with the comment LYRICS. Writing lyrics with my script in FLAC files is not supported. Since I am not using FLAC I will not implement that feature because testing would be insufficient. Sorry, for any confusion caused by my Change-log.

Report

sacrediou

10 years ago

OK, I understand. I'll try writing lyrics with other tool and use Lyrics ID3 to see it in Amarok.

Thank you for your answer... and your very good script :-)

Report

vinci

10 years ago

One advice : under debian/ubuntu you need the following packages :

python (obvious) python-kde3 python-urljr python-xml python-mutagen

It took me some time to guess that python-kde4 was not the required one ;) The message was quite cryptic :
sh: Syntax error: Unterminated quoted string


Report

C

stifi

10 years ago

Thnx for the bug report. Unfortunately, there are many changes in package names since KDE4 was released. Additionally, is Gnome the standard desktop in Ubuntu which results in some missing packages (eg kdialog is not available by default, at least at my desktop). I'll try to find a way to solve the package clutter.
Anyway, I'm happy that you solved the problem on your own and sorry for any inconvenience.

Report

arvenil

11 years ago

Great script! Thanks for it!
Two questions:
1. Are there any tools for linux which can also edit those lyrics tags in id3?
2. Are there other players which use lyrics tags?

Report

compulsechris

10 years ago

2) Songbird does with add-ons. Also has an add on for batch tagging with lyrics. (But get fasterbird first.)

Report

v6lur

11 years ago

1 - Kid3: http://kde-apps.org/content/show.php/Kid3?content=10415
(2 - don't know)

Report

sodrian

11 years ago

Thanks for such a great script! But I want to ask one question. When flac support will be implemented? There is already a lot of tag editors that support writing and reading flac lyrics. Why not adding this feature to your script?
Thanks.

Report

edybsd

11 years ago

In file read_lyrics_from_id3.py,
method lyrics2xml
the following line:

artist = kwargs['title']

should be

artist = kwargs['artist']

By the way, great script...

Report

C

stifi

11 years ago

Thanks for the report. I'll change that for the next release.

Report

sefrot

11 years ago

I have this error and I don't know what packages install in debian

Report

C

stifi

11 years ago

You need: python-kde3

Report

mortenwendelboe

11 years ago

I have made a few changes to save_lyrics_to_id3.py i order to make the script save the lyrics i a ogg-file. As I only save lyrics (and don't remove lyrics), I just made the changes to the saving part. I can send you the changed file if you are interested.

/Morten Wendelboe

Report

C

stifi

11 years ago

Yes please send it to me and I'll have a look on it. If you have time and you'll feel in mood please add the "deleting-feature" to round out the feature list. Thanks for your efforts.

Report

7 years ago

Version 1.8-beta
[li]Bug fix in XML processing by madli *thanks*[/li]
Version 1.8-alpha (cs)
[li]Czech translation from Pavel Fric *thanks*[/li]
Version 1.8-alpha
[li]KApplication and kdialog is not needed anymore (-->Script should now work with newer versions of python and kde)[/li][li]Removed automatic installer for python-mutagen[/li]
Version 1.7
[li]corrected link in README to French translation[/li][li]Italian translation and some spell checks from Marco Poletti *thanks!*[/li]
Version 1.6a
[li]small bug fix version[/li]
Version 1.6
[li]french translation by pgraber *thanks!*[/li][li]set STD_ENCODING to ASCII as default[/li]
Version 1.5
[li]some unicode fixes on notifiactions[/li][li]disabled debug output by default[/li]
Version 1.4
[li]new Icon[/li][li]fixed character sets errors in mass tagging[/li]
Version 1.3
[li]support for FLAC[/li][li]configurable key name for FLAC/Vorbis[/li][li]added Mass Tagging Feature[/li][li]the action is now based on the selected songs in the playlist[/li][li]Configuration Dialog[/li]
Version 1.2a
[li]removed popup if no lyrics are found[/li]
Version 1.2
[li]removed debug(lyrics)[/li][li]reading support for m4a[/li][li]using mutagen for Ogg Vorbis[/li][li]Timer for Automatic Mode is stopped, if Amarok stops playing the song.[/li]
Version 1.1
[li]started with translation (gettext)[/li][li]If mutagen is not installed, the scripts tries to install it.[/li][li]READMEs are in well formated XHTML[/li][li]Automatic Mode can be disabled[/li][li]changing comments is now possible[/li][li]some structural changes in the code[/li][li]very small bug fixes[/li][li]all dialogs are now in front by default[/li]
Version 1.0
[li]error message on wrong language code was always shown after configuring the script[/li]
Version 0.9
[li]spec-file[/li][li]better description of the script behaviour[/li][li]politer messages[/li][li]non-ASCII characters in comments are handled[/li][li]small bug fixes[/li]
Version 0.8
[li]exit gracefully on stop[/li][li]automatic mode did not work[/li]
Version 0.7
[li]removed dependency of dcop lib (which caused many problems for python2.5 users)[/li][li]saving in vorbis is deactived by default, because I have no time to maintain this script[/li]
Version 0.6
[li]many encoding fixes (thanks to aeternos)[/li]
Version 0.5
[li]GUI for configuration[/li][li]improved the dialog for saving the lyrics[/li][li]you can now edit the lyrics before saving[/li][li]better dialog for deleting the lyrics[/li]
Version 0.4
[li]added non ISO language codes[/li][li]waiting time is now configurable[/li][li](click on 'configure' to initialize your configuration-file)[/li][li]new configure option: comment[/li][li]cleaned up code[/li]
Version 0.3
[li]removed pause option[/li][li]small bug fixes[/li]
Version 0.3alpha
[li]initial release with python-mutagen[/li]

12345678910
1
product-maker posixru May 29 2012 9 excellent
product-maker Base: 4 x 5.0 Ratings
aspotashev
Aug 18 2011
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
1.8-beta
updated May 28 2012
added Nov 27 2006
downloads 24h
0
pageviews 24h 5
System Tags addon