Ripping a CD to mp3 in C# - third party component or api out there? [closed]
Asked Answered
O

1

6

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.

Oolite answered 8/10, 2008 at 22:43 Comment(0)
F
8

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...

Furious answered 8/10, 2008 at 23:17 Comment(1)
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.Nippers

© 2022 - 2024 — McMap. All rights reserved.