tags:

views:

1432

answers:

4

We're working on a project that requires the ripping of audio tracks from CDs to MP3s (ideally also retrieving the track information from CDDB or similar).

More background information: Various music labels send us CDs of music which we then deliver to people via an online delivery system. We're looking at automating the process of converting those CDs into MP3s with full track information where possible. We want to produce a simple desktop application that allows a member of editorial staff to setup the information about the new music we receive. To streamline the process we'd like to include the ripping of the audio and retrieval of the track information.

A: 

I can't comment on ripping the CD.

Once you have the audio data ripped you could encode it using LAME

Declan Shanaghy
Encoding isn't really the issue so much we already do that bit - it's the ripping process. But thanks for the feedback :)
+6  A: 

You can do all of this via access to the Windows Media Player control library through COM interop (the IWMPCdromRip interface covers CD ripping, for example). It's not pretty and doesn't look to be very controllable (you give it a list of tracks to rip, tell it to rip, it rips them and puts them in the WMP library - which you can then automate and get the tracks out of) but it would work end-to-end including querying track data and album art. Have a look at http://msdn.microsoft.com/en-us/library/bb262437(VS.85).aspx to get started.

A quick Google also found a reference to a CodeProject article where the authors have created a CD ripping library by interop into the low-level IOCTL APIs, interacting with the CD drive directly. This might be a good starting point to build you own - find that at http://www.codeproject.com/KB/cs/csharpripper.aspx.

The same author has put together a C# encoder using LAME, although you could just chain into LAME.EXE which might be simpler. See http://www.codeproject.com/KB/audio-video/MP3Compressor.aspx.

Querying CDDB (or more likely FREEDB) is not rocket science, it's a simple-ish HTTP interface (although curiously no Web service that I could find). Easy to do with a WebRequest.

You'd think someone would have put together a simple C# library for this by now but it seems like an uncommon request. Maybe time for a side project...

DotNetGuy
While the CDDB/FREEDB stuff is straightforward, if they're getting discs from the artists for review, they're probably not in the databases yet.
J Wynia
A: 

To see how to access freedb Find the CD it also shows how to get at the TOC and build a finger print for the disc. As to the best way to work with CDs directly - who knows! Microsoft have made so many false starts on creating some sort of multimedia API its a complete mess - You could go via the driver IOCTL, directx, MCI or new DVD burning API. Personally I use the MCI - its old, but works with nearly everything and does what I want to do. I also use LAME as a compressor and it also works fine.

mikej
A: 

Perhaps few people know the author of the worldwide used www.exactaudiocopy.de is licensing his software to developers. He claims his software is able to create always the same copy while others libraries are less accurate. There are developer licenses and redistribution licenses. They are not cheap but when you want to have the best there is, its an absolute pick.

Willem Luijk