LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   I have an image file (.iso) made from an audio CD. How can I listen to the music? (https://www.linuxquestions.org/questions/linux-software-2/i-have-an-image-file-iso-made-from-an-audio-cd-how-can-i-listen-to-the-music-681705/)

lawrence_lee_lee 11-07-2008 12:10 AM

I have an image file (.iso) made from an audio CD. How can I listen to the music?
 
I have an image file (.iso) made from an audio CD. How can I listen to the music in the image?

Simon Bridge 11-07-2008 12:40 AM

burn it to a CD and play it.

how did you get the iso?
what happens if you try to mount the iso?

Have a look through:
http://lalists.stanford.edu/lau/2002/12/0144.html

Stéphane Ascoët 11-07-2008 01:16 AM

Quote:

Originally Posted by lawrence_lee_lee (Post 3334185)
I have an image file (.iso) made from an audio CD. How can I listen to the music in the image?

I don't think it possible, unless you find a CD-Player software able to read directly from disc images.

jschiwal 11-07-2008 03:32 AM

An audio CD doesn't have a real filesystem. So you can't mount it. I would expect that an audio cd image would have an .img extension. Look at the file with "file <filename>". If it says that is is an iso9660 image, then maybe your ripping software converted the cd to an iso9660 image made up of cda or wav files. If that is the case, you can mount the file:
sudo mount -t iso9660 <filename> <mountpoint> -o ro,loop

lawrence_lee_lee 11-07-2008 04:55 AM

I use the command "file" to look at the image. It said that it is "data"

I cannot mount it. There is no filesystem in the image... What should I do? By the way, I cannot believe that there is no way listen to the music in an CD image. Even MS Windows has software to do this! How come there is no way for Linux?

By the way, the image extension ".iso" is added by me. So it does not mean that the image contain a ISO9660 file system...

FredGSanford 11-07-2008 04:58 AM

When you created it, did you choose 'data' or 'image' during the process? Have you tried burning it to a cd disc as Simon Bridge mention?

Also see if the program xarchiver will let you extract the songs.

Shadow_7 11-07-2008 08:55 AM

a few options.

Burn it to a cdrom

mount it (might not work these days, but used to iirc)

cdda2wav -device file.iso

xmms file.iso

In theory most media apps should be able to treat the file like a device. And read it accordingly. You might have to enable digital extraction since there's no audio cable connecting the file to the soundcard. Although a lot of modern computers don't have that cable anymore anyway.

CD audio is 2 channels of 16 bit 44.1kHz audio. The format on the cd is big endian. The playable wav version is little endian. AFAIK, the file format is the same, except for the byte order.

i92guboj 11-07-2008 01:02 PM

Quote:

Originally Posted by Shadow_7 (Post 3334480)
a few options.

Burn it to a cdrom

mount it (might not work these days, but used to iirc)

No, it didn't use to, at least with a stock kernel (unless that feature existed in 2.2 or early 2.4 and it was removed at a later stage, which I highly doubt). As said, audio cds lack a file system, and the only fs's that I know of that are supported for a cdrom in a stock kernel are iso9660 and udf, none of which is related to audio cds. The cdda format as described in the handbook doesn't have any fs-like structure behind it. There are external projects that might help you though. Try cdfs.

http://users.elis.ugent.be/~mronsse/cdfs/

You might be able to use cdfs to mount your iso in loopback mode. It's long since the last time I tested cdfs and I don't know if it's still maintained and if it will work against the newer kernels. But it's worth a try.

There was also an audiofs project, but I can't seem to find it anymore. I think it just died.

Some players might as well be able to play it without problems. Mplayer might play it. However I don't think you can change tracks and things like that unless there's some specific support that allows treating the file as a device as you said.

Shadow_7 11-07-2008 03:06 PM

Quote:

Originally Posted by i92guboj (Post 3334692)
No, it didn't use to, at least with a stock kernel (unless that feature existed in 2.2 or early 2.4 and it was removed at a later stage, which I highly doubt).

It was a 2.4.x kernel. Custom compile, but shouldn't be that different from most stock kernels. Back in the 2.4.14-ish days. It used to mount, I swear it did, and used to show some sort of track01.cda type files. This was long before DRM measures and other man made limits. And is no longer an option afaik. It's all bits and bytes, so there has to be some sort of implied filesystem. Otherwise CD-Text and stuff would be handled very oddly. It's all bits and bytes to some degree. But that doesn't mean that it's an iso9660 filesystem.

i92guboj 11-07-2008 04:24 PM

Quote:

Originally Posted by Shadow_7 (Post 3334806)
It was a 2.4.x kernel. Custom compile, but shouldn't be that different from most stock kernels. Back in the 2.4.14-ish days. It used to mount, I swear it did, and used to show some sort of track01.cda type files. This was long before DRM measures and other man made limits. And is no longer an option afaik.

Well, that's possible. By the time of 2.4 I rarely built a kernel since I was not that knowledgeable about linux by that time, and compiling a kernel was nothing that could be done in a breeze in a classic 133mhz pentium cpu. It could take a lot of hours to do so. It's perfectly possible that I bypassed that option, though it seems odd to me that such capability existed on a stock kernel and was then removed (admittedly, it's not impossible).

It's also possible that it was your distro adding the audiofs patch or something like that... Some distros add patches to the vanilla kernel so we can't discard that. I am more inclined to think that this was the case, because, in first place, if there were builtin support in the kernel to do this, then why would anyone design a 3rd party patch to do the same?

In any case, the cdfs seems as the way to go right now.

Quote:

It's all bits and bytes, so there has to be some sort of implied filesystem. Otherwise CD-Text and stuff would be handled very oddly. It's all bits and bytes to some degree. But that doesn't mean that it's an iso9660 filesystem.
Well, the affirmation that an audio cd doesn't have a fs has more to do with the fact that the red book (which defines this standard) has nothing on it specifying such a thing like a file system. However, as you say, it's all bits and bytes. If you have a driver to handle it on an fs-like fashion, then, to all effects you can consider that you have a file system. cds certainly can be accessed on a random fashion, and you know where a track begins and end, so, it's perfectly possible to manage this like if they were files. It's just a matter of interfacing it correctly using a driver, which is what the cdfs does.

As you see, the line about what has a fs and what hasn't is very thin. Conceptually, you can do an fs-like handler for almost anything, from databases to remote shares or even the whole web if we wanted.

Simon Bridge 11-09-2008 03:28 AM

Quote:

Originally Posted by lawrence_lee_lee (Post 3334347)
I use the command "file" to look at the image. It said that it is "data"

I cannot mount it. There is no filesystem in the image... What should I do? By the way, I cannot believe that there is no way listen to the music in an CD image. Even MS Windows has software to do this! How come there is no way for Linux?

By the way, the image extension ".iso" is added by me. So it does not mean that the image contain a ISO9660 file system...

Well - you didn't answer my questions. How did you make the image?

MS can play CUE/BIN images - I don't thing they can just play a bitwise captured datastream. Which is why the type of image is important. Which software are you thinking of?

Note - your on-disk collection will benifit from being converted from raw images to a collection on FLAC files. No quality loss, and smaller size. Same portability.

lawrence_lee_lee 11-10-2008 08:52 AM

The way I made the image is like the following,

Quote:

cdrdao read-cd --read-raw --datafile /home/image.iso --device /dev/hdb -v 2 /home/image.iso.toc
So, what is the next thing to do in order to play the music in the image?

i92guboj 11-10-2008 09:35 AM

Did you try cdfs already?

teckk 11-11-2008 11:47 AM

Saved this from a couple years back. Is this what you are trying to do?

Code:

So, the first thing you need to do is read the CD to a temporary file on the hard drive. To do that, pop the "protected" cd in your drive, and run this command (all on one line):

cdrdao read-cd --source-device /dev/sg0 --device /dev/sg0 --driver generic-mmc --datafile /tmp/my_cd.dat /tmp/my_cd.toc

This will read the disc from device /dev/sg0 and create two files: /tmp/my_cd.dat and /tmp/my_cd.toc.

The next step is to create a new CD from your temp files. Run this command (all on one line):

cdrdao write --device /dev/sg0 --driver generic-mmc /tmp/my_cd.toc

With luck, you will now have a copy of your disc, minus the annoying copy protection. Use grip to rip the newly created disc.

Occasionally, this will result in a disc with tracks that have blank space at the beginning/end. You can either edit the blank space after ripping, or tell grip to adjust the start/end sectors.

Substitute your own drive parameters.


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