General > Developers

Embedding tags when ripping CDs

(1/3) > >>

PeteK:
Hi-

I'd like to use LinuxMCE to rip my CDs to flac.  I tried a few, and it looks like LinuxMCE uses the ripDiskWrapper.sh script to manage the ripping and encoding of CD audio. From digging into this file, it looks like it calls cdparanoia and pipes the output directly to the chosen encoder (in my case the flac encoder).  Unfortunately, this method doesn't tag the files with artist, album information, etc. LinuxMCE obviously does access cddb to get the information to generate file names and to load the database. I would like to use that information to tag the  files as well.  This would avoid having to re-rip if I wanted to reload LinuxMCE or use the files elsewhere.

I was wondering if anyone understands and could explain the exact sequence of events in getting CD information.  I was thinking of using a tool like xmcd to get cddb information, but I would like to use the same source of information that is used for populating the database. I'll keep digging until I can understand it, but I'd appreciate any advice.
 
Thanks!

-Pete

PeteK:
Hey gang.  I was able to get LinuxMCE to embed Artist/Album/Track/Genre/Date information into the music files when ripping a CD.  You can now see the information on the Squeezebox when playing back ripped files from the core.  After digging around inside LinuxMCE, I've modified the shell file that performs the ripping.  I modified ripDiskWrapper.sh to include calls to abcde's cd-id utilities to identify disc information and pass it to the encoder.  I used the cddb_id.sh script in the src/CDDB_Identifier directory as a guide.  So far I've got it working for the Ogg and Flac encoders.  I hope to get it working for WAV and MP3 files shortly. 

I'd appreciate it if anyone was interested in trying it out and letting me know how it works for them.  I'm not a scripting expert by any means, so any input would be appreciated.  I don't think this is the ideal solution, as it requires another CDDB lookup in addition to the one perfomed by UpdateMedia, but it works for now while I try to understand exactly the process the Pluto gang put in place for ripping a CD.  I hope to move on to getting Pluto to work with a more modern (6.5.x) version of Slimserver next.

The following file goes in your /usr/pluto/bin directory.  Please remember to save the existing ripDiskWrapper.sh to a different name first, so you can go back if it gets screwy.

This is my first time actually contributing to Open Source Software, so I'm kind of (nerdily) excited.

Thanks everyone,
-Pete

PeteK:
Hmm.  After playing with ripping to .mp3, it looks like UpdateMedia is
writing .id3 tags for MP3 files. My script modifications write Title,
Artist, Album, Year, Track Number and Genre information.  UpdateMedia
writes Title, Artist, Album and Composter information, but doesn't
include Track Number or Genre information, which I think is worth
having.  I'm guessing UpdateMedia is where all tag information should
be written.  I should be able to get it to use Metaflac to edit the
tag for .flac files, and obviously UpdateMedia can edit .id3 tags, but
I don't know of a good simple ogg comment editor.  Does anyone know of
one?

Incidentally, the ripping script doesn't use the quality settings for
MP3 or Ogg rips.  I don't know if a Mantis report has been filed, but
I'm guessing it was on the Pluto guy's todo list. I recommend ripping to Flac (no options) until that gets fixed.  That way you know what you're getting.

In any case, the script should now work correctly for MP3, FLAC, and Ogg rips.  Again, paste the
included ripDiskWrapper.sh in your /pluto/bin directory.  Save your
existing copy.

Also, make sure you set the execute permissions correctly. If you
don't know what I'm talking about, after copying type chmod a+x
ripDiskWrapper.sh Please let me know if you have any issues.

On another note, Lame wasn't installed by default, so ripping to MP3
failed outright. I'm surprised it wasn't installed by default by
LinuxMCE.  Can anyone else confirm this?

Zaerc:

--- Quote from: PeteK on June 05, 2007, 07:34:18 am ---...
On another note, Lame wasn't installed by default, so ripping to MP3
failed outright. I'm surprised it wasn't installed by default by
LinuxMCE.  Can anyone else confirm this?

--- End quote ---

I haven't tried using MP3s, but this is what's installed on my Kubuntu-7.04 + LMCE-1.1B2 machine:

zaerc@dcerouter:~$ dpkg -l | grep -i lame
ii  liblame0                                3.96.1-2ubuntu1                                                   LAME Ain't an MP3 Encoder

I hope that answers your question.  Thanks for the updated script, I was wondering why that seemed messed up a bit so I'll give it a spin.

1audio:
Where would the revised script go?

Navigation

[0] Message Index

[#] Next page

Sitemap 
Go to full version