How to create mp3 snippets with a 5sec fadeout from a cd including id3 tags as batch process in linux

2

1

I want to:

  1. Rip a CD
  2. Set ID3 tags
  3. Create snippets (45 seconds)
  4. Add a 5sec fadeout at the end (40s-45s)
  5. Convert to mp3

I've tried several tools now (Goobox, Grip, lame, ecasound, vorbis-tools, abcde...) but i couldnt find a way to achieve all those points.

The problem is: ID3 tags are lost during conversion in ecasound.

Any idea how to solve this?

user18591

Posted 2009-11-17T23:03:27.610

Reputation: 21

Answers

1

If you already have a process that's close to working, all you need to do is find a commandline tagger that can "copy" tags from one file to another. id3cp from the id3lib package might be what you need.

If I were to do this, I'd rip the CD to WAV files (in EAC, because I've never seen anything compare to its accuracy with a good drive), then run a script that does the following pseudocode. I'd probably select the clips manually, because programmatically grabbing 45 useful seconds out of an arbitrarily-long track won't always work. But here's the basic process:

for each *.WAV:
   1. convert <name>.wav to <name>.mp3
   2. create a 45-second <name>.snippet.wav from <name>.wav
   3. apply fade-out to <name>.snippet.wav
   4. convert <name>.snippet.wav to <name>.snippet.mp3
   5. apply id3 tags to both <name>.mp3 and <name>.snippet.mp3

Steps 1 and 4 can be accomplished with the lame commandline encoder.

Steps 2 and 3 can be done with sox or ecasound (you might be able to combine them into a single command).

Step 5 can be done with id3v2, mid3v2 (from the excellent mutagen python tagging library), mp3info (if you just want ID3v1 tags), or some other commandline tagger -- essentially your script would call the tagger twice, once for each MP3 created in this pass of the for-loop.

This process has the advantage of not creating transcoded snippets, since you haven't encoded to MP3, then decoded and re-encoded during the trim-and-apply-fadeout process.

quack quixote

Posted 2009-11-17T23:03:27.610

Reputation: 37 382

0

From the sound of your question, youre not trying to create a program to accomplish this. That being said, I would suggest this post be moved to superuser.com where others more familiar with this type of software could be of assistance.

If you are looking to do this programmaticlly, please let us know and we would be happy to help.

What distro are you running, some people have been able to get media monkey to work in deb/ubuntu.

DataPimp

Posted 2009-11-17T23:03:27.610

Reputation: 373