Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Hello, I was just wondering how to access cd audio data on cds. I know you can directly read the device file for data cds, but not for audio cds (it makes sense, since they are divided into seperate tracks, not one contiguous filesystem).
On some Linux systems, the audio cd will be mounted automatically and you can play the audio cd easily. You can also view the audio files from the cd. Check your /etc/fstab file to see what mount options you have.
Care to elaborate? Is this a generic question or for programming purposes, or what? Are you talking about the actual audio data, or a data track on a "mixed" cd?
For the former, you simply use cdparanoia, cdd2wav, or any of the available music ripping programs to copy the tracks to .wav files (and most of these use one of the above as a backend anyway). Or just play them directly with any multimedia program, of course. In any case, I believe access to the disc itself is generally done through the kernel's ioctl drivers.
For the latter, you should be able to simply mount the data portion of the disc, just as with any other data cd.
There's also a cdfs filesystem available, which turns the audio into virtual data tracks, which can then be mounted and read as if they were files. Finally, the kde kio-multimedia-plugin does something similar, allowing you to access the tracks through konqueror or dolphin as if they were files of various formats, converting them on the fly as necessary.
@jiobo: audio CD's can't be "mounted", because they don't have computer-style filesystems. But they can be virtualized, as with cdfs or the kde plugin above. And certainly the major desktops do automatically detect discs and automate access for you.
Care to elaborate? Is this a generic question or for programming purposes, or what? Are you talking about the actual audio data, or a data track on a "mixed" cd?
I was talking about actual audio data. I'm interested mostly for educational purposes, but I was thinking about possibly writing my own ripper. I know you can use a cd ripping program, but I would like to know how the ripper gets the audio data in the first place. Any insight would be helpful.
On some Linux systems, the audio cd will be mounted automatically and you can play the audio cd easily.
Not usually, what you see in your desktop is a feature based on virtual file systems. Frontends provided by kde, gnome and other desktops to make something seem different than it is. An audio cd is never mounted opposite to what it might seem. Not with a stock kernel anyway (it can be done with cdfs and alikes as someone said above though).
Quote:
You can also view the audio files from the cd. Check your /etc/fstab file to see what mount options you have.
By convention, we say there're not files inside a cdaudio disk. Anything you see in your graphical explorer is just an abstraction. However this is most a convention than anything else, and there's a place to argue about it. What's a file anyway? A collection of bytes that can be accessed using some kind of index. So, in that sense, a track fits the definition of file just as well. What's a file and what's not a file is only defined by the underlying fs driver, really. If every single OS over the Earth threated cdaudio disks on a regular fs-like fashion, then the convention will quite differ from the actual one. It's just how the history has developed.
The only thing we can say for sure is that there's no iso9660 fs on a cdaudio disk, that's true.
Quote:
Originally Posted by hda7
I was talking about actual audio data. I'm interested mostly for educational purposes, but I was thinking about possibly writing my own ripper. I know you can use a cd ripping program, but I would like to know how the ripper gets the audio data in the first place. Any insight would be helpful.
If you are interested in the internals, you should rather be checking the cdda2wav or cdparanoia sources yourself.
Quote:
Originally Posted by David the H.
Well, as I said, most gui rippers use cdparanoia to do the actual data extraction.
I couldn't say what's the most broadly extended tool. However *today* I am inclined to think that cdda2wav is usually a better option, becase cdparanoia is fitting the definition of abandonware since a long time ago.
I don't really know what the "better" option should be, all I know is that just about every ripper frontend I've ever seen uses cdparanoia to do the actual ripping. Of course this will certainly change in the future if it ever stops being usable. Either that or else someone will take over the cdparanoia code and bring it up to date.
I don't really know what the "better" option should be, all I know is that just about every ripper frontend I've ever seen uses cdparanoia to do the actual ripping. Of course this will certainly change in the future if it ever stops being usable.
cdparanoia lacks like 10 years of weird anticopy mechanisms and updates that are useful for normal disks as well. It will probably work the same for a cd that's clean, lean and doesn't have any real problem, but a lot of people that care about the audio have had real problems with cdparanoia.
I was at that point a few months ago when I needed to create some master disks for a professional studio edition. cdparanoia results were sub-optimal to say the least.
Someone using grip to compress the audio to mp3 won't probably notice unless there's a glitch or some skipping in the soundtrack though, so for the casual user it's all about the same.
You are right in one thing: it's difficult to know what a frontend does, and that's why I don't use frontends unless I don't care about the final results. However, in this case, I think it is more about configuration than about cdparanoia being really mandatory. In Gentoo we can USE="-cdparanoia", the effect of this flag however will depend on the concrete package.
About cdparanoia vs. cdda2wav, all the development in the latest years seems to happen only in cdda2wav, it's all in the link I posted, explained by the dev himself so I won't repeat it again. If the OP is concerned about quality, I urge him to read that info and then do his own research around the net (by no means should he blindly trust me or anyone else), and ask the authors themselves. If he is not concerned about quality, then he can use whatever. But it's only fair to inform him so he can decide by himself
Quote:
Either that or else someone will take over the cdparanoia code and bring it up to date.
I don't think that will happen. That would be a "solution looking for a problem". Back in time, cdparanoia was born as a fork of cdda2wav, an improved version of cdda2wav that could rip what cdda2wav couldn't. That was back in 1997, and it has remain untouched since 99 or so, except for a mainteinance release that didn't change any code as far as I know.
Nowadays it's the other way around, and there's really no need for a separate cdparanoia since cdda2wav is -in fact- better, and can read almost any cdaudio that is in any way readable. So, doing a new fork or updating the old would be a nonsense, since in fact, there's no problem to solve in first place, there's nothing that cdda2wav can't do in which regards reading audio cds.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.