LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 11-25-2009, 12:05 PM   #1
hda7
Member
 
Registered: May 2009
Distribution: Debian wheezy
Posts: 252

Rep: Reputation: 31
How do you access cd audio data tracks?


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

Any help would be appreciated!
 
Old 11-25-2009, 12:15 PM   #2
jiobo
Member
 
Registered: Nov 2008
Posts: 180

Rep: Reputation: 36
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.
 
Old 11-25-2009, 12:41 PM   #3
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian + kde 4 / 5
Posts: 6,846

Rep: Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007
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.
 
Old 11-25-2009, 02:05 PM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292
You can use 'cdparanoia' to rip either the whole CD or individual tracks.
 
Old 11-26-2009, 09:24 AM   #5
hda7
Member
 
Registered: May 2009
Distribution: Debian wheezy
Posts: 252

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by David the H. View Post
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.
 
Old 11-26-2009, 01:08 PM   #6
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian + kde 4 / 5
Posts: 6,846

Rep: Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007
Well, as I said, most gui rippers use cdparanoia to do the actual data extraction.

If you want to find out how cdparanoia does it, or other programs like mplayer, you can always look at the source code.
 
Old 11-26-2009, 11:08 PM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 403Reputation: 403Reputation: 403Reputation: 403Reputation: 403
Quote:
Originally Posted by jiobo View Post
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 View Post
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. View Post
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.

http://www.gossamer-threads.com/list...hreaded#190556
 
Old 11-27-2009, 08:47 AM   #8
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian + kde 4 / 5
Posts: 6,846

Rep: Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007
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.
 
Old 11-27-2009, 09:17 AM   #9
hda7
Member
 
Registered: May 2009
Distribution: Debian wheezy
Posts: 252

Original Poster
Rep: Reputation: 31
I guess I'll just look at cdparanoia. Thanks anyway!
 
Old 11-27-2009, 10:25 AM   #10
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 403Reputation: 403Reputation: 403Reputation: 403Reputation: 403
Quote:
Originally Posted by David the H. View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Listing the audio tracks on a DVD geekbynature Linux - Software 1 02-14-2009 02:55 PM
Audio players not changing tracks royeo Linux - Newbie 2 08-28-2006 01:22 PM
Mounting an audio CD that has files other than the tracks. Basel Slackware 3 11-11-2005 11:19 AM
xcdroast audio and pad tracks TenEighty Linux - Software 0 06-27-2005 10:29 PM
Error reading CDs containg audio and data tracks A_Thom Linux - Hardware 0 11-13-2004 09:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration