Summary: | Please consider adding support for detecting and optionally removing Lyrics3v2 tags from MP3 files. | ||
---|---|---|---|
Product: | [Applications] kid3 | Reporter: | homomisanthropus |
Component: | general | Assignee: | Urs Fleisch <ufleisch> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version First Reported In: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Manjaro | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | attachment-4045091-0.html |
Description
homomisanthropus
2025-07-08 18:45:40 UTC
Thanks for the suggestion. Kid3 itself does not parse or render tags, it uses 3rd party libraries to do that. For MP3 files, there are two options: id3lib (using the Id3libMetadata plugin) and TagLib (using the TaglibMetadata plugin). id3lib has support for parsing Lyrics3v2. I have not used it because it offers little control. As I can see from the source code, it would convert the Lyrics3v2 data to COMM, USLT and SYLT ID3v2 frames. But it does not have a function to remove such tags. Besides this, id3lib is no longer maintained since many years, so it is disabled by default, and TagLib is used, because it has more features, supports also ID3v2.4.0 (and many other formats) and is still actively maintained. However, it does not support Lyrics3v2. Therefore, it is not possible to nicely integrate Lyrics3v2 support into Kid3's UI using the existing metadata plugins with the requested features, namely removing such tags. What would be possible is to add a user action which calls an external tool such as the mentioned rmlyrics3 (https://github.com/Moonbase59/rmlyrics3). Another idea would be using the QML API, it has script.readFile() and script.writeFile(). However, there is probably no way to strip the Lyrics3v2 data (bytes between LYRICSBEGIN and the ID3v1 tag) using QML. At least I could not see a way to access the returned QByteArray as a JavaScript ArrayBuffer. Created attachment 183100 [details] attachment-4045091-0.html Thank you very much for the quick response. I must confess that I am a little disappointed by the difficulty of the task. In any case, adding a user action that calls an external tool like rmyrics3 or other might be a good idea. Perhaps you could implement it in the near future? Even if this is not the case, I reiterate my gratitude for your time and your response. Best regards. El 9/7/25 a las 18:27, Urs Fleisch escribió: > https://bugs.kde.org/show_bug.cgi?id=506771 > > --- Comment #1 from Urs Fleisch<ufleisch@users.sourceforge.net> --- > Thanks for the suggestion. Kid3 itself does not parse or render tags, it uses > 3rd party libraries to do that. For MP3 files, there are two options: id3lib > (using the Id3libMetadata plugin) and TagLib (using the TaglibMetadata plugin). > id3lib has support for parsing Lyrics3v2. I have not used it because it offers > little control. As I can see from the source code, it would convert the > Lyrics3v2 data to COMM, USLT and SYLT ID3v2 frames. But it does not have a > function to remove such tags. Besides this, id3lib is no longer maintained > since many years, so it is disabled by default, and TagLib is used, because it > has more features, supports also ID3v2.4.0 (and many other formats) and is > still actively maintained. However, it does not support Lyrics3v2. Therefore, > it is not possible to nicely integrate Lyrics3v2 support into Kid3's UI using > the existing metadata plugins with the requested features, namely removing such > tags. > > What would be possible is to add a user action which calls an external tool > such as the mentioned rmlyrics3 (https://github.com/Moonbase59/rmlyrics3). > Another idea would be using the QML API, it has script.readFile() and > script.writeFile(). However, there is probably no way to strip the Lyrics3v2 > data (bytes between LYRICSBEGIN and the ID3v1 tag) using QML. At least I could > not see a way to access the returned QByteArray as a JavaScript ArrayBuffer. > Please add the following file somewhere in your file system, e.g. as RemoveLyrics3.qml (text between the dashed lines): ---- import Kid3 1.1 Kid3Script { onRun: { function doWork() { console.log("Processing %1".arg(app.selectionInfo.fileName)); const [rc, stdout, stderr] = script.system("rmlyrics3", [app.selectionInfo.filePath]); if (rc === undefined) { console.error("Please download\n" + "https://raw.githubusercontent.com/Moonbase59/rmlyrics3/refs/heads/master/rmlyrics3\n" + "to folder in PATH and make it executable!") Qt.quit(); return; } if (rc != 0) { console.error("Returned %1".arg(rc)); } if (stdout) { console.log(stdout.trim()); } if (stderr) { console.error(stderr.trim()); } if (!nextFile()) { Qt.quit(); } else { setTimeout(doWork, 1); } } app.saveDirectory(); firstFile(); doWork(); } } ---- Then add a new user action ("User Actions" in the preferences) with Ouput=x, Name=Remove Lyrics3, Command=@qml /path/to/your/script/RemoveLyrics3.qml If this is OK for you, I could add it to the scripts provided with Kid3. Hello, maybe I have done something wrong, but it has not worked for me. It returns the following message: file:///home/misanthropus/.local/bin/RemoveLyrics3.qml:35:1: Syntax error. Thank you for the time you are taking. Best regards. Hi again. However, having the rmlyrics3 script, with the rmlyrics3 %f command it works for a song. I don't know if this helps. Best regards. Strange that the script does not work for you, I tested it both with Qt 5 and Qt 6. But your are right, using a QML script is not needed, you can just use "rmlyrics3 %f " as the command of a user action, or event better "rmlyrics3 %F", this will work with multiple files. So it is almost certain that this is my mistake. I am sorry. I'll try to find out what I've done wrong. You can therefore add it to the scripts provided with kid3 if you see fit. Thanks again. Best regards. As you noticed correclty, using "rmlyrics3 %F" is enough, a QML script seems to be overkill. As you see fit. Anyway, I found the error. It was simply a hidden line break. My apologies. Best regards |