LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Reading an audio CD. Do I mount? (https://www.linuxquestions.org/questions/linux-newbie-8/reading-an-audio-cd-do-i-mount-795487/)

stf92 03-15-2010 05:48 AM

Reading an audio CD. Do I mount?
 
Hi:
Under some circumstance, and with an audio cd in the drive, 'ls /mnt/cdrom0' should output

TRACK01
TRACK02
.......
TRACKNN

But what are the circumstances. Should I mount the cd? And with what type (option -t)? Thanks for reading.

portamenteff 03-15-2010 06:09 AM

mount cd
 
That ould be correct. If your unsure of the filesystem's type, just use the -a option.(-a = all types)
On my system CDs mount at /cdrom so I would type 'ls /cdrom'

Quote:

Originally Posted by ENRIQUESTEFANINI (Post 3898836)
Hi:
Under some circumstance, and with an audio cd in the drive, 'ls /mnt/cdrom0' should output

TRACK01
TRACK02
.......
TRACKNN

But what are the circumstances. Should I mount the cd? And with what type (option -t)? Thanks for reading.


Simon Bridge 03-15-2010 06:11 AM

You do not mount an audio CD - it does not have a file system.
Some audio CDs also have a data section - they are mounted iso9660.

It is pretty unusual to find cdrom0 in /mnt, it is normally in /media.

However - things can get quite cool with the abstraction layers...

When I load an audio CD, I get a CD icon on my desktop. I can rt-click this icon and select "browse folder", which opens the filebrowser to a location called cdda://sr0 full of files called track*.wav

This has been pseudo-mounted through fuse by the gnome virtual file system.
http://en.wikipedia.org/wiki/GVFS

This is controlled by gvfs-mount, the mountpoints are created in ~/.gvfs
Code:

$ ls ~/.gvfs
cdda mount on sr0

That's only one mount-point.

gvfs-mount --help

to see the options and short usage.

There is a good discussion on accessing gvfs mounts using gvfs-mount, and mount.

Naturally, searching LQ also works.

stf92 03-17-2010 05:20 PM

I perfectly knew an audio-cd has no fs asociated with it. But it has some structure, some kind of directory. Otherwise, we could not specify "play track #4".

Thank you for your kind information. I got confused by ms-dos command dir outputing a directory listing.

------------------------------------
Motto: multimedia are a curse to computing. If you like computing, make a program to emulate particle collision, write a compiler, find out every group of order 10 disregarding isomorphisms.

Simon Bridge 03-18-2010 11:01 AM

Quote:

Originally Posted by ENRIQUESTEFANINI (Post 3902413)
I perfectly knew an audio-cd has no fs asociated with it.

Well I can only respond to the questions actually ask, vis:
Quote:

Should I mount the cd? And with what type (option -t)?
... with the information you actually supply.

There are two questions - the first one is answered: "no" and the second is thus rendered moot. The reason: no file system to mount or specify ... which is something you now tell me you knew already.
Quote:

But it has some structure, some kind of directory. Otherwise, we could not specify "play track #4".
Sure it has a structure: it has cdda structure to allow HW playback.
Quote:

I got confused by ms-dos command dir outputing a directory listing.
MS-DOS had a different abstraction system to Unix/Linux. For example - HW devices are handled explicitly. DIR does different things depending on the device and media.

For *nix:

You can also access the tracks with CD ripping copying backup software.

These days audio CDs are accessed through fuse. I gave you a link and some background - the rest is up to you.

There used to be a driver which abstracted cdda as a regular file system.

stf92 03-19-2010 06:22 AM

Most kind of you. Your information will be put to work.
Enrique.

i92guboj 03-19-2010 06:41 AM

Quote:

Originally Posted by Simon Bridge (Post 3903326)
There used to be a driver which abstracted cdda as a regular file system.

There has been several of these toys around in the past. "cdfs" should still work, I think.

KDE does it's own with kio-slaves, which presents any audiocd as a virtual fs with mp3/ogg/flac/wav files inside of it, which is quite convenient (at least it used in 3.x, haven't tested 4.x lately). Surely gnome will do something similar.

There might be some kind of similar generic audiocd fs using fuse, though I am not personally aware of such a thing. I guess I could find an use or two for that, though I really see no problem in using cdda2wav once to add the disk to my media library so I can later store it in my shelves forever.


All times are GMT -5. The time now is 06:31 PM.