SlackwareThis Forum is for the discussion of Slackware Linux.
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, i have recently switched to audacious.. actually I've never been too into storing tons of music on my computers until i started playing w/audacious. now I have learned a bit about cdparanoia and lame.
i have written a simple script:
Code:
#!/bin/bash
cd $HOME/.WAVtmp
# rip fast (-Z) and whole disk (-B)
cdparanoia -Z -B
# convert to .mp3 as long as .wav are present
for file in track*.cdda.wav
do
# -vbr-new> var bitrate
# -b32> bitrate =32 (saw this somewhere)
# -q2> recommended man lame
lame -vbr-new -b32 -mj -q2 $file $(echo $file | sed 's/track\(..\).cdda.wav/\1.mp3/')
rm $file
done
it doesnt do much, just rip the cd and convert to .mp3. I then cp and move to a unique directory (/music/<artist>/album)
things I'm still missing: id3 tags? what exactly are these things and how to i 'get' them attached to my songs? there are some options (man lame) but these seem to require a file to input? can I automate this step too?
steps would really be appreciated. I could pass these as #1 and #2 args to the script but then what? i suppose it'd be nice to error check (existing directory) and integrate the mp3 tags to song title=>filename.mp3
Sorry if this is obvious I'm very new to scripting and completely clueless about the tags stuff, googling returns information overload... where to start?
I'm not exactly sure what you're trying to do in the "automation" part. If you could be more specific, it would help.
Also, here's a great bash scripting guide (it says advanced, but that should not be taken to mean "for advanced bash scripters only", instead it should be "this guide will make you an advanced bash scripter, when you finish reading it and practice a lot")
what I'm really _hoping_ I can figure out is how to add the tags while ripping/encoding the CD. like add to my script something that gets the correct tags and applies them to the correct file as they're being encoded.
id3ren is used to rename batches of MP3 files by reading the ID3 tag of MP3 files which contains song name, artists, album, year, and a comment. The secondary function of id3ren is a tagger, which can create, modify, or remove ID3 tags. The id3 fields fields can be set on the command line, entered interactively, or "guessed" from the path and filename.
i'm interested in both functions (renaming and creating) but for the creating part does anyone know if there is an automagic way to get the tag info?
I don't want to sit around typing names of songs all day..
{perhaps thats what i'm not understanding - do all id3 tags _have_ to be generated by typing? or is there some place that can scan the files and recognize the artist/album/song?}
Most people rip CDs with a program already written that performs CDDB lookups (usually using the FreeDB database). This rips and tags automatically. You can also pass tag information along to your encoder, like
That way you can just pass things like artists and albums just once and only specify each track title or what have you. I wanted to have a program for ripping and tagging that didn't use CDDB, so wrote a shell script with cdparanoia, oggenc, lame and an optional gui with gtkdialog. I ain't gonna post my crap spaghetti code, but those are just some examples/ideas. CDDB lookup is what you want, anyway, I think.
Last edited by slakmagik; 04-25-2007 at 11:09 PM.
Reason: s/ripper/encoder/
steps would really be appreciated. I could pass these as #1 and #2 args to the script but then what? i suppose it'd be nice to error check (existing directory) and integrate the mp3 tags to song title=>filename.mp3
Sorry if this is obvious I'm very new to scripting and completely clueless about the tags stuff, googling returns information overload... where to start?
many thanks!
This part just hit my brain - as far as moving them, I store them in places based on their tag info - you'd pass in the tag info and then pass that through a function to make the proper filenames
wow, great help all. excellent pointers for writing the script. CDDB is what I'm looking for?
I'll google that.
another thing came to mind -> musicbrainz? I find libmusicbrainz in /var/log/packages and seem to recall reading it does something for id3 tags? i'll google that one too...
another thread, another reason to love the slackware community!
id3tag is what your after. That's what libmusicbrainz links against anyway for it's id3 usage. The id3tag binary is a part of id3lib... I forget if it comes with Slack or not. It probably does since libmusicbrainz is in Pat's repo.
The first and last script there implement id3tags along with others I believe... It's not hard at all to make a script to do everything you want. Kind of a 'must' on Linux to make a script unless you use something like soundjuicer...
I reckon you could integrate lltag into what you're trying to do without too much hassle. I've not found any pure shell scripts that deal with the CDDB lookup, but I have no doubt that with enough regular expressions you could make something that worked!
While I think that writing things from scratch is fantastic, I feel i would be remiss in my duty as semi-regular LQ poster without saying such a blindingly obvious thing as "It's ok to use someone elses program to do what you need, there's no shame in not writing everything from scratch".
With that said, keep us (that's the royal us, I mean me ...) posted on the ups and downs of this script!
I've been a bit neglectful of this project due to other problems (with WINE)
@piete - those are great links. I've downloaded the ripit/lltag sources and will start playing... I have a book on perl and needed a reason to learn that anyway
thank you all!
I will try to make something that is CLI and fully vanilla slack compatible, then post my results for all.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.