Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, everybody.
I've searched high and low on how to add lyrics to an mp3 tag using eyeD3. I want a CLI program so I can use it in GUIs like Rhythmbox or ipod/creative/etc. Or in a non-GUI console. The eyeD3 man page is pretty short on this:
--lyrics=[LANGUAGE]ESCRIPTION:LYRICS
Add (or remove when LYRICS is "") a comment. Note that the argument value MUST always contain exactly two ’:’ char-
acters to delimit the fields even when the default language is being used. The DESCRIPTION string is the lyrics
title. The optional LANGUAGE string MUST be a three-character ISO 639 language code. The default is "eng" for
English.
A tag may not have more than one lyrics frame with the same DESCRIPTION and LANGUAGE values.
Now, when I run
eyeD3 --lyrics=eng:these_lyrics:lyrics_file.txt some_file.mp3
it doesn't work.
eyeD3 -v
does not show the lyrics. I just started using Rhythmbox and it will download lyrics just fine but I'd like to be able to imbed the lyrics in the mp3 tag so I don't have to do this every time. Thanks in advance.
Click here to see the post LQ members have rated as the most helpful post in this thread.
That works. Thank you very much.
I had tried `cat lyrics_file.txt` with the tics, also double quotes but not with the $ and the parentheses. What does the $ do?
Okay I'm going to research the role of "$" elsewhere and go ahead and close this thread as being solved.
For those wondering, there are other id3 tag editors that will do this. Instead of looking up web pages that display lyrics what I do to get these is open Rhythmbox and right click on a file and click on the lyrics tab and it fetches the lyrics. Then I copy and paste to a file in the same directory as the music file and proceed with the aforementioned command in a terminal in that directory.
Last edited by SharpyWarpy; 03-06-2010 at 06:08 PM.
Reason: More info
$() is a newer pattern for command substitution. It does the same thing as the backticks, but better. The use of backticks is discouraged these days. Think of the dollar sign as indicating that it's doing basically the same thing as variable subsitution.
At for why your previous efforts failed, my first guess is a problem was with word splitting. As I mentioned, you need to enclose the entire pattern in double quotes, whether it's straight text or expanded through a variable, backticks, or $(), so that the output is read as a single entity and not as a bunch of separate words.
Finally, I guess I'm just used to using cat, as above, but you can also use bash's built-in file redirector instead: "$(<file)"
An excerpt from the link you provided on command substitution:
"A possible problem with putting a list of files into a single string is that a newline may creep in."
This is what was happening to me, newlines all over the place because of the newlines in the lyrics text. But not with the newer method you explained.
As a recommendation, you could use the "xclip" utility to directly enter the lyrics from the clipboard into the shell. So your command might be something like this:
As a recommendation, you could use the "xclip" utility to directly enter the lyrics from the clipboard into the shell. So your command might be something like this:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.