[KDE Dot News]
 faq
 flatforty
 contribute
 subscribe
 configure
 search
 rdf

 main


  Ripping Audio CDs Made Child's Play
Multimedia Posted by Dre on Monday 12/Mar/2001, @15:51
from the how-do-they-come-up-with-this-stuff dept.
Last week, Michael Matz contributed some code to the audiocd:/ IO slave in KDE CVS to make ripping audio CDs child's play. When you browse an audio CD with this new code (using, for example, 'audiocd:/' in Konqueror), you will find two subdirectories: MP3 and Ogg Vorbis. Each subdirectory will list all the tracks on the audio CD with the appropriate extension (.mp3 and .ogg). Each track can then be dragged to any KDE drop location and be converted automatically into the MP3 or OGG compressed formats. In addition, if the track has a CDDB entry, the file is automatically named for you and the .MP3/.OGG tags are set appropriately. The obligatory screenies are linked in the text above. Expect rollout for KDE 2.2, currently scheduled for beta release on April 2. How's that for simplicity? A more complete explanation from Michael is available below.

 

Michael Matz explains how audioCD ripping works:

Audiocd:/ creates a virtual view (or better multiple views) of the content of audio CDs. These multiple views are collected in virtual directories which all (besides one exception) are subdirectories of the root directory. The actual set of views available to the user depends on how kio_audiocd was compiled, and if a network connection was possible (for the CDDB request). Most of these views consist of one file for each audio track. The difference inthe views is only the actual name of these files, and the content, when those (up to then virtual) files are read:

  1. There is one view listing the tracks by number in "By Track/"; the files are named "Track XX.wav" with XX being a number. When read they are normal .wav files.
  2. One view lists the track by track-name; in "By Name/". The files are called "XX .wav", where 'name' is the track title as it comes from CDDB. The content of these files are identical to those from (1), just the name is different. This view only exists if a network connection exists for CDDB lookups.
  3. Another view has the same content as (2) (same name and content of the .wav files) but is located in the directory "", where ToD is the Title of the Disc coming from CDDB. If there was no CDDB query this view nevertheless exists, in which case the title is "No Title" and the track names are "Track XX.wav" (so the content is identical to (1)).
  4. If libmp3lame was available when compiling kio_audiocd, there is a view in the directory "MP3/" (screenshot). The names of the files there are the same as used by (3), except the extension is ".mp3" instead of ".wav". When read, those files are normal mp3 files (they are coded on the fly, while ripping the track/reading the file).
  5. If libvorbis was available when compiling kio_audiocd, there is a view in the directory "Ogg Vorbis/" (screenshot). The names are the same as in (3), except now the extension is ".ogg". When read those files are Vorbis Ogg files (created the same way as (4).
  6. The root directory itself has a view. The files are in the form "trackXX.cda" (screenshot), which contain the raw headerless data of this track (the exact same info as the .wav files, without the 44 Bytes header).
  7. The are two other directories which should be ignored for now: "Information" and "dev").
  8. It might be good to know, that some of the strings above are i18n()'d (internationalized). These include the "Track XX", "By Name", "By Track", "No Title" and "Information" strings. The files in the "MP3", "Ogg Vorbis" and "dev" directories and the "trackXX.cda" files are not i18n()'d.

    As should now be clear, the existance of certain directories depends on compile time environment and runtime environment and is not changeable by the user (except the CDDB information depends on a network connection). The files in most subdirectories are virtual, because they don't exist, similar to e.g. the pop3 slave which also looks as if it provides "files" although these are messages on some mail-server. But the virtuality makes no difference, as no user of audiocd:/ could tell if this or that particular URL now is a file, or not, which of course is true for all URLs, not only the audiocd:/ ones).

    When a URL from one of the "MP3" or "Ogg Vorbis" directories is dropped, its content is copied to the destination. For (1)-(3) this results in .WAV files, for (4) and (5) in some compressed audio files (corresponding to .MP3 and .OGG, respectively), which additionally have encoded the CD-title, author and trackname if CDDB was available at the time (those file formats provide a means to encode such auxilliary information).



    <  |  >

     

  Related Links
 ·   Articles on Multimedia
 ·   Also by Dre
 ·   Contact author

Thread Threshold:

The Fine Print: The following comments are owned by whomever posted them.
( Reply )

Over 40 comments listed. Printing out index only.
Re: Ripping Audio CDs Made Child's Play
by Christian A Strømmen [Number1/NumeroUno] on Monday 12/Mar/2001, @16:50

This is sooooo cool :)

I've been using this for some time now (since the day the commited it to the cvs), and it works like a charm! Ripping audiocds have NEVER been easier...

KEEP IT COMING!!!............


[ Reply To This | View ]
Re: Ripping Audio CDs Made Child's Play
by Michael Matz on Monday 12/Mar/2001, @17:14
I should add, that the code for wiring mp3 and ogg encoding to the grabbing was developed by Carsten Duvenhorst.
[ Reply To This | View ]
Re: Ripping Audio CDs Made Child's Play
by Craig black on Monday 12/Mar/2001, @17:30
The hits just keep on coming!! Glad i'm not one of the xiamian investers. Thats what happens when you believe to much press and to much slashdork hype. Craig
[ Reply To This | View ]
Re: Ripping Audio CDs Made Child's Play
by Dr_LHA on Monday 12/Mar/2001, @17:48

This is a great feature.

However, I have one question to ask: I'm not sure how the kioslave stuff works - but I would expect it's pretty modular and plugin like.

In this case would it be possible to distribute updates of this kind as small files (rpm or tar.gz whatever) so we don't have to wait for an entire update of KDE to get it and test it? I'd like to add this functionality to my KDE now without going to CVS.


[ Reply To This | View ]
Re: Ripping Audio CDs Made Child's Play
by Geoff Lane on Monday 12/Mar/2001, @17:50
Hey, that's pretty slick!
I'm not a KDE user, but I've got to say 'Way to go KDE team'. That's a real nice feature.
[ Reply To This | View ]
audiocd:/Ogg Vorbis ?
by KDE User on Monday 12/Mar/2001, @18:01
Are you allowed to have spaces in the URL? Shouldn't that be audiocd:/Ogg%20Vorbis ? I dunno if it causes problems, but it probably does look nicer as it is.

Otherwise, rock on!
[ Reply To This | View ]
Re: Ripping Audio CDs Made Child's Play
by Harvey London on Monday 12/Mar/2001, @18:01
This is very cool. One question, will this take an MP3 and write it back to wav format, so it can be burned to an audio CD? If not, I'd like to add this to a wish list of features.
[ Reply To This | View ]
Re: Ripping Audio CDs Made Child's Play
by David Walser on Monday 12/Mar/2001, @18:07
um, excuse me, but holy ****! This is too awesome.

One thing though, I wanna know how it's supposed to get the album/song names too, now that someone bought and commercialized CDDB and KDE isn't allowed to use it anymore.

and I wanna know how they mixed the marble and beos themes in that audiocd screenshot :o)

What I wouldn't give to be able to use kioslaves from the console!
[ Reply To This | View ]
virtual directory
by pos on Monday 12/Mar/2001, @18:11

Looks great!

This leads me to a UI issue: Could we get some "virtual directory" icons in there? It would be good to convey to the user that the icons don't represent actual data yet but instead a process that will create that data.

The usual paradigm is one where you select the verb first (open the tool you are going to use to do your work) and then the noun (select the files to work on). An verb-noun order example would be opening a word processor then opening a file to edit. An example of noun-verb order is the microsoft "open with..." right click popup menu. Noun-verb seems more natural. Does anyone have a link to some good methods of representing this on the desktop?

KDE is taking steps toward a unique UI experience that I think will differentiate it. Perhaps we could add something that will indicate the verb a little better.

Anyways, congradulations on helping KDE move beyond the current paradigms. :)

-pos


[ Reply To This | View ]
Re: Ripping Audio CDs Made Child's Play
by friartux on Monday 12/Mar/2001, @18:19

Cool. But now, can I do the reverse? For example, insert a disc of MP3's, and reconstitute them as WAV files on the hard drive -- complete with a total time/size listing in the target?

This would make it quite easy to create audio discs for the car from MP3 collections...

[ Reply To This | View ]
Re: Ripping Audio CDs Made Child's Play
by John Coleman on Monday 12/Mar/2001, @20:11
Pretty cool! I didn't know that the audiocd:/ interface was present in 2.1. I've gotten a little impatient and really don't want to toy with CVS so I tried to implement this using MIME types and have had partial success so far. Maybe someone can help me out, here's what I did:

In Konqueror select Go->Applications

In the Applications directory right click and Create New->Link To Application and name it Ogg Vorbis Encode.desktop.

Under the Execute tab in the Command box enter
oggenc -o /home/john/mm/mp3/%f.ogg %f
and select Run in terminal.

Under the Application tab highlight audio/x-wav and click the << button. Click OK.

Now, when you right click on a .wav file you'll see Ogg Vorbis Encode as an "Open with" option.

Here's the problem, when KDE executes the above command it's not replacing the %f with the name of the file you're trying to encode and the encoded file ends up being named ".ogg"

Can anyone point out what I've missed here? It seems like %f worked in KDE 1.0, but it's not working here.

Thanks
[ Reply To This | View ]
Re: Ripping Audio CDs Made Child's Play
by FnordLord on Monday 12/Mar/2001, @22:01
Well, you know, the BeOS already does something like this; in other words, it does the ripping but not the automatic encoding.
Cool to get it on GNU, though!
[ Reply To This | View ]
mixed-mode cds
by Onni Kumpunen on Tuesday 13/Mar/2001, @13:05
(I haven't test audiocd:/ system yet)
This looks very cool for audio cds, but what about mixed-mode and data-cds?
is it bad idea to add in future example cdfs:/ -file system to konqueror
which opens a tracks for anykind of cdroms just like cdfs-filesystem patch?
( http://www.elis.rug.ac.be/~ronsse/cdfs/ )
It just makes possible to make iso-images and audio-tracks
ripping (and maybe cdrdao images)for drag and drop style.
[ Reply To This | View ]
Re: Ripping Audio CDs Made Child's Play
by Wanthalf on Tuesday 13/Mar/2001, @13:52
I have a few questions:

What about the bitrate? Is it fix? Can I change it?

Can I edit the CDDB/ID3TAG info myself as well?

And one more question: I think you said it uses paranoia library for ripping? I know that there might be difference in quality of ripping the same song when doing this more times. Esp. when the disc is scratched, dirty, etc, it can be ripped badly (with more or less successfully corrected errors). Will then KDE tell me about such problems?

Thank you,
Wanthalf
[ Reply To This | View ]
Misplaced functionality
by Johan Veenstra on Wednesday 14/Mar/2001, @02:11
First of all I want to thank you for contributing to the kde project, but I have a few remarks.

I seems to me that not al the functionality should be implemented in the IO slave.

It is a good idea to have different views concerning renaming of "TrackXX.cda" to "<Artist> - <songname>", but the views concerning the virtual .wav, .mp3, .ogg files are out of place.

The proposed (and implemented) method provides (an interface to) the functionality of converting .cda files to .wav/.mp3/.ogg formats. BUT this functionality is only provided when you're copying from a CD (audiocd:/).

A different interface has to be implemented to provide he same functionality when copying/converting .cda/.wav files from a normal directory (file:/). This is the tell tale sign of functionaly implemented in the wrong place.

When a file is moved you get a little popup menu that lets you choose between 'copy here', 'move here' and 'link here'. This popup menu could be extended in such a way that conversions can be done on the fly AND from any kind of url.

So when one drags a .cda file the popup menu should give a choose to 'copy here', 'move here', 'link here', 'convert to wav here', 'convert to mp3 here' and 'convert to ogg here'. Similar options could be provided for the .wav, .mp3 and .ogg file formats.

The right click popup menu should provide similar options.

I hope you find my comments usefull, if you have any questions, just e-mail me or reply, I'll be happy to clarify my comments.

Johan Veenstra.
[ Reply To This | View ]
Re: Ripping Audio CDs Made Child's Play
by Mark Hillary on Wednesday 14/Mar/2001, @08:39
I think that this is great.

Will this be able to send info to CDDB, like grip.
Also will it fill out ID3 info for mp3s, and the same for oggs.
Can you name the files before you rip them.

I think that this should be possible to do to any wav file on your harddrive.

Maybe something like this. When you right click on a wav file, it has an option for extend veiw, an extra panel will open in konquerer where these options are aviable.
[ Reply To This | View ]
Re: Ripping Audio CDs Made Child's Play
by Jon Doud on Wednesday 14/Mar/2001, @09:21
This is so exciting!

Just one question, a little off topic ...

We are getting so many new tags for konqueror -- smb:/, audiocd:/, floppy:/, etc.

Does anyone know what the entire list is? Is it posted somewhere?

Jon
[ Reply To This | View ]
Re: Ripping Audio CDs Made Child's Play
by Carsten Duvenhorst on Thursday 15/Mar/2001, @02:35
Not mentioned:

You will need the latest libmp3lame ( > lame 3.88a) from the CVS to be able to encode to MP3.
lame 3.87 will NOT work.

lame is available at www.mp3dev.org;

Lame CVS Tarballs at http://cvs.sourceforge.net/cvstarballs/lame-cvsroot.tar.gz
[ Reply To This | View ]
Re: Ripping Audio CDs Made Child's Play
by Jose Andres Martinez S. on Saturday 28/Apr/2001, @18:18
I can't wait for the next release (2.2) with this GREAT, AMAZING, WONDERFULL, fetaure. Great work!
[ Reply To This | View ]
Re: Ripping Audio CDs Made Child's Play
by Jose Andres Martinez S. on Saturday 28/Apr/2001, @18:18
I can't wait for the next release (2.2) with this GREAT, AMAZING, feature. Great work!
[ Reply To This | View ]
Re: Ripping Audio CDs Made Child's Play
by Nick on Wednesday 06/Jun/2001, @11:58
wouldn't it be a lot easier if there would be an option somehow on selecting a kioslave to use, because the amount is growing rapidly. (e.g. I even read that someone is developing a diamond rio kioslave.) . maybe you could have an option just like network and root etc, named kioslaves or something, and there list them so everybody knows what is available.
[ Reply To This | View ]
Which MP3 library?
by Roger Oberholtzer on Monday 17/Sep/2001, @13:07
When compiling KDE2.2, I have trouble linking the audiocd files.
The various MP3 libraries do not contain functions like:

lame_set_VBR

I have these versions available, and I don't see the functions:

lame-3.13 lame-3.89 lame3.50 lame3.70 lame3.87

So, which lame is the code to be compiled against? I know that
you prefer Ogg Vorbis, but portable Ogg Vorbis players are
rather rare.
[ Reply To This | View ]
Hmmmm....
by ebbah on Thursday 14/Oct/2004, @11:43
Its kool. ond quetchion tho, when u rip files from a cd, does it reck the original copy?
[ Reply To This | View ]
Setting MP3/OGG Bitrate and Other Options...
by Stuart Morrison on Sunday 25/Sep/2005, @06:09
KMenu->Settings->Control Center->Sound and Multimedia->Audio CDs
[ Reply To This | View ]
The Fine Print: The previous comments are owned by whomever posted them.
( Reply )

  "Ok, maybe my approach is over-engineered." -- Simon Hausmann
KDE®, "K Desktop Environment", "KDE Dot News", "got the dot?" and the KDE Logo® are trademarks or registered trademarks of KDE e.V. in the European Union, the United States and other countries. All other trademarks and copyrights on this page are owned by their respective owners. Comments are owned by the poster. The rest: Copyright © 2000-2008 KDE e.V. for The KDE Project. For further information or comments on this site, please contact the Webmaster.
[ home | post article | flat forty | subscribe | search | rdf ]